Re: [Sablevm-developer] sablevm hang
Brought to you by:
egagnon
|
From: Joseph P. <pa...@mc...> - 2004-06-17 22:05:47
|
I should also mention that it hangs in the same place at:
(VMObject.java:-1) java/lang/VMObject.wait n
I was curious as to why it references '-1'.
--Joe
On Thu, 17 Jun 2004, Joseph Paris wrote:
> I've done some testing with sablevm and calling methods for awt, and i
> haven't had a problem. For example, instantiating an AWT or Swing class
> from inside another class there were no problems. If i remove that call
> in code, it then hangs on the instantiation of an AWT/Swing class one line
> later. The hang happens every time (and i've tried about 40+ times to
> make sure ;p). I'm really not sure why it would hang there, and i know
> there is no problem using Sun's jvm.
>
> I'm not too familiar on how your vm works. Do you create a thread per
> class that's loaded, etc? I wish i had a more simple test case to work
> with. What are the relevant files i should be looking at? I will
> continue to try and replicate this problem in a more simple case.
>
> --Joe
>
> On Thu, 17 Jun 2004, Chris Pickett wrote:
>
> > Hi Joe,
> >
> > It's obviously a deadlock somewhere, which means a concurrency /
> > threading bug. It could either be in Classpath or in our locking code.
> > AWT is not really something I know about. Greg recently implemented
> > InterruptedException IIRC, and that could be it as well.
> >
> > Can you reproduce the problem without AWT? Is that really the absolute
> > simplest test case you can give us? What happens if you declare the
> > Thread body as a named class? Does it happen every single time?
> >
> > Cheers,
> > Chris
> >
> > Joseph Paris wrote:
> > > Were you able to make any progress on figuring out what the problem is?
> > > If there is anything more you need from me, please don't hesitate to ask.
> > >
> > > --Joe
> > >
> > > On Mon, 14 Jun 2004, Joseph Paris wrote:
> > >
> > >
> > >>no problem. Here it is:
> > >>
> > >>(VMObject.java:-1) java/lang/VMObject.wait n
> > >>(Object.java:431) java/lang/Object.wait
> > >>(GtkMainThread.java:63) gnu/java/awt/peer/gtk/GtkMainThread.<init>
> > >>(GtkToolkit.java:108) gnu/java/awt/peer/gtk/GtkToolkit.<init>
> > >>(Constructor.java:-1) java/lang/reflect/Constructor.constructNative n
> > >>(Constructor.java:408) java/lang/reflect/Constructor.newInstance
> > >>(Class.java:1496) java/lang/Class.newInstance
> > >>(Toolkit.java:522) java/awt/Toolkit.getDefaultToolkit
> > >>(Component.java:695) java/awt/Component.getToolkit
> > >>(Container.java:374) java/awt/Container.addImpl
> > >>(Container.java:268) java/awt/Container.add
> > >>(ConfigDialog.java:329)
> > >>net/jxta/impl/peergroup/ConfigDialog$PagesPanel.<init>
> > >>(ConfigDialog.java:375) net/jxta/impl/peergroup/ConfigDialog.<init>
> > >>(DefaultConfigurator.java:139)
> > >>net/jxta/impl/peergroup/DefaultConfigurator.<init>
> > >>(DefaultConfigurator.java:126)
> > >>net/jxta/impl/peergroup/DefaultConfigurator.<init>
> > >>(Constructor.java:-1) java/lang/reflect/Constructor.constructNative n
> > >>(Constructor.java:408) java/lang/reflect/Constructor.newInstance
> > >>(Class.java:1496) java/lang/Class.newInstance
> > >>(Platform.java:202)
> > >>net/jxta/impl/peergroup/Platform.generateConfigAdvertisement
> > >>(Platform.java:161) net/jxta/impl/peergroup/Platform.initFirst
> > >>(GenericPeerGroup.java:784) net/jxta/impl/peergroup/GenericPeerGroup.init
> > >>(PeerGroupFactory.java:369)
> > >>net/jxta/peergroup/PeerGroupFactory.newPlatform
> > >>(PeerGroupFactory.java:420)
> > >>net/jxta/peergroup/PeerGroupFactory.newNetPeerGroup
> > >>(Server.java:116) Server.startJxta
> > >>(Server.java:108) Server.main
> > >>(VirtualMachine.java:-1) java/lang/VirtualMachine.invokeMain n
> > >>(VirtualMachine.java:92) java/lang/VirtualMachine.main
> > >>
> > >>
> > >>Thanks,
> > >>Joe
> > >>
> > >>
> > >>On Mon, 14 Jun 2004, Etienne Gagnon wrote:
> > >>
> > >>
> > >>>Hi Joe,
> > >>>
> > >>>Could you also type Ctrl-\ [e.g. SIGQUIT], when it hangs? This would
> > >>>dump the Java stack trace.
> > >>>
> > >>>Etienne
> > >>>
> > >>>Joseph Paris wrote:
> > >>>
> > >>>>Heya,
> > >>>>
> > >>>>I'm running into an issue were the sablevm seems to be hanging on what i
> > >>>>think is a threading related issue. I've narrowed down where in code
> > >>>>the hang occurs, but i'm not sure _why_ it occurs. I'm providing the
> > >>>>class and instantiation along with a portion of strace output. if more
> > >>>>strace output would help, please let me know.
> > >>>>
> > >>>>Any help would be greatly appreciated.
> > >>>>
> > >>>>System config:
> > >>>>Suse 9.1 updated; x86
> > >>>>
> > >>>>Thanks,
> > >>>>Joe
> > >>>>
> > >>>>------AwtUtils.java from the JXTA distribution-----
> > >>>>****Executed as AwtUtils.initAsDaemon()****
> > >>>>
> > >>>>
> > >>>>import java.awt.Frame;
> > >>>>
> > >>>>public class AwtUtils {
> > >>>>
> > >>>> public static void initAsDaemon() {
> > >>>> (new Thread() {
> > >>>> public void run() {
> > >>>> try {
> > >>>> Frame f = new Frame();
> > >>>> f.dispose();
> > >>>> } catch (Throwable t) {
> > >>>> }
> > >>>> }
> > >>>> public void doit() {
> > >>>> setDaemon(true);
> > >>>> setName("awt daemon initializer");
> > >>>> start();
> > >>>> try {
> > >>>> join();
> > >>>> } catch (InterruptedException ie) {
> > >>>> }
> > >>>> }
> > >>>> }).doit();
> > >>>> }
> > >>>>}
> > >>>>
> > >>>>
> > >>>>-------------------Strace output---------------------
> > >>>>
> > >>>>open("/usr/local/lib/libfontconfig.so.1", O_RDONLY) = -1 ENOENT (No such
> > >>>>file or directory)
> > >>>>open("tls/i686/sse2/libfontconfig.so.1", O_RDONLY) = -1 ENOENT (No such
> > >>>>file ordirectory)
> > >>>>open("tls/i686/libfontconfig.so.1", O_RDONLY) = -1 ENOENT (No such file or
> > >>>>directory)
> > >>>>open("tls/sse2/libfontconfig.so.1", O_RDONLY) = -1 ENOENT (No such file or
> > >>>>directory)
> > >>>>open("tls/libfontconfig.so.1", O_RDONLY) = -1 ENOENT (No such file or
> > >>>>directory)open("i686/sse2/libfontconfig.so.1", O_RDONLY) = -1 ENOENT (No
> > >>>>such file or directory)
> > >>>>open("i686/libfontconfig.so.1", O_RDONLY) = -1 ENOENT (No such file or
> > >>>>directory)
> > >>>>open("sse2/libfontconfig.so.1", O_RDONLY) = -1 ENOENT (No such file or
> > >>>>directory)
> > >>>>open("libfontconfig.so.1", O_RDONLY) = -1 ENOENT (No such file or
> > >>>>directory)open("/usr/lib/libfontconfig.so.1", O_RDONLY) = 13
> > >>>>read(13, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\300\223"...,
> > >>>>512) = 512
> > >>>>fstat64(13, {st_mode=S_IFREG|0755, st_size=204755, ...}) = 0
> > >>>>old_mmap(NULL, 170408, PROT_READ|PROT_EXEC, MAP_PRIVATE, 13, 0) =
> > >>>>0x41f97000
> > >>>>madvise(0x41f97000, 170408, MADV_SEQUENTIAL|0x1) = 0
> > >>>>old_mmap(0x41fbc000, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED,
> > >>>>13, 0x25000) = 0x41fbc000
> > >>>>old_mmap(0x41fc0000, 2472, PROT_READ|PROT_WRITE,
> > >>>>MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x41fc0000
> > >>>>close(13) = 0
> > >>>>open("/usr/local/lib/libfreetype.so.6", O_RDONLY) = -1 ENOENT (No such
> > >>>>file or d irectory)
> > >>>>open("tls/i686/sse2/libfreetype.so.6", O_RDONLY) = -1 ENOENT (No such file
> > >>>>or directory)
> > >>>>open("tls/i686/libfreetype.so.6", O_RDONLY) = -1 ENOENT (No such file or
> > >>>>directory)
> > >>>>open("tls/sse2/libfreetype.so.6", O_RDONLY) = -1 ENOENT (No such file or
> > >>>>directory)
> > >>>>open("tls/libfreetype.so.6", O_RDONLY) = -1 ENOENT (No such file or
> > >>>>directory)open("i686/sse2/libfreetype.so.6", O_RDONLY) = -1 ENOENT (No
> > >>>>such file or directory)
> > >>>>open("i686/libfreetype.so.6", O_RDONLY) = -1 ENOENT (No such file or
> > >>>>directory)open("sse2/libfreetype.so.6", O_RDONLY) = -1 ENOENT (No such
> > >>>>file or directory)open("libfreetype.so.6", O_RDONLY) = -1 ENOENT (No
> > >>>>such file or directory)open("/usr/lib/libfreetype.so.6", O_RDONLY) = 13
> > >>>>read(13, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\360\346"...,
> > >>>>512) = 512
> > >>>>fstat64(13, {st_mode=S_IFREG|0755, st_size=473346, ...}) = 0
> > >>>>old_mmap(NULL, 429584, PROT_READ|PROT_EXEC, MAP_PRIVATE, 13, 0) =
> > >>>>0x41fc1000
> > >>>>madvise(0x41fc1000, 429584, MADV_SEQUENTIAL|0x1) = 0
> > >>>>old_mmap(0x42023000, 28672, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED,
> > >>>>13, 0x62000) = 0x42023000
> > >>>>close(13) = 0
> > >>>>open("/usr/local/lib/libexpat.so.0", O_RDONLY) = -1 ENOENT (No such file
> > >>>>or directory)
> > >>>>open("tls/i686/sse2/libexpat.so.0", O_RDONLY) = -1 ENOENT (No such file or
> > >>>>directory)
> > >>>>open("tls/i686/libexpat.so.0", O_RDONLY) = -1 ENOENT (No such file or
> > >>>>directory)open("tls/sse2/libexpat.so.0", O_RDONLY) = -1 ENOENT (No such
> > >>>>file or directory)open("tls/libexpat.so.0", O_RDONLY) = -1 ENOENT (No
> > >>>>such file or directory)open("i686/sse2/libexpat.so.0", O_RDONLY) = -1
> > >>>>ENOENT (No such file or directory)
> > >>>>open("i686/libexpat.so.0", O_RDONLY) = -1 ENOENT (No such file or
> > >>>>directory)open("sse2/libexpat.so.0", O_RDONLY) = -1 ENOENT (No such
> > >>>>file or directory)open("libexpat.so.0", O_RDONLY) = -1 ENOENT (No
> > >>>>such file or directory)open("/usr/lib/libexpat.so.0", O_RDONLY) = 13
> > >>>>read(13, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0P!\0\000"...,
> > >>>>512) = 512
> > >>>>fstat64(13, {st_mode=S_IFREG|0755, st_size=160096, ...}) = 0
> > >>>>old_mmap(NULL, 124104, PROT_READ|PROT_EXEC, MAP_PRIVATE, 13, 0) =
> > >>>>0x4202a000
> > >>>>madvise(0x4202a000, 124104, MADV_SEQUENTIAL|0x1) = 0
> > >>>>old_mmap(0x42046000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED,
> > >>>>13, 0x1c000) = 0x42046000
> > >>>>close(13) = 0
> > >>>>munmap(0x41a40000, 122337) = 0
> > >>>>rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
> > >>>>rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
> > >>>>rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
> > >>>>rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
> > >>>>rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
> > >>>>write(1, "[verbose class: loading \"java/be"..., 60[verbose class: loading
> > >>>>"java/beans/PropertyChangeSupport"]
> > >>>>) = 60
> > >>>>open("/home/paris/software/sablevm//share/sablevm/sablevm-classpath/java/beans/PropertyChangeSupport.class",
> > >>>>O_RDONLY) = 13
> > >>>>fstat64(13, {st_mode=S_IFREG|0644, st_size=5035, ...}) = 0
> > >>>>mmap2(NULL, 5035, PROT_READ, MAP_PRIVATE, 13, 0) = 0x41a40000
> > >>>>munmap(0x41a40000, 5035) = 0
> > >>>>close(13) = 0
> > >>>>rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
> > >>>>rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
> > >>>>write(1, "[verbose class: loading \"gnu/jav"..., 63[verbose class: loading
> > >>>>"gnu/java/awt/peer/gtk/GtkMainThread"]
> > >>>>) = 63
> > >>>>open("/home/paris/software/sablevm//share/sablevm/sablevm-classpath/gnu/java/awt/peer/gtk/GtkMainThread.class",
> > >>>>O_RDONLY) = 13
> > >>>>fstat64(13, {st_mode=S_IFREG|0644, st_size=1021, ...}) = 0
> > >>>>mmap2(NULL, 1021, PROT_READ, MAP_PRIVATE, 13, 0) = 0x41a40000
> > >>>>munmap(0x41a40000, 1021) = 0
> > >>>>close(13) = 0
> > >>>>write(1, "[verbose class: loading \"gnu/jav"..., 64[verbose class: loading
> > >>>>"gnu/java/awt/peer/gtk/GtkGenericPeer"]
> > >>>>) = 64
> > >>>>open("/home/paris/software/sablevm//share/sablevm/sablevm-classpath/gnu/java/awt/peer/gtk/GtkGenericPeer.class",
> > >>>>O_RDONLY) = 13
> > >>>>fstat64(13, {st_mode=S_IFREG|0644, st_size=1045, ...}) = 0
> > >>>>mmap2(NULL, 1045, PROT_READ, MAP_PRIVATE, 13, 0) = 0x41a40000
> > >>>>munmap(0x41a40000, 1045) = 0
> > >>>>close(13) = 0
> > >>>>rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
> > >>>>rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
> > >>>>rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
> > >>>>rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
> > >>>>rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
> > >>>>rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
> > >>>>rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
> > >>>>rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
> > >>>>rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
> > >>>>rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
> > >>>>rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
> > >>>>brk(0) = 0x8093000
> > >>>>brk(0x80b9000) = 0x80b9000
> > >>>>mmap2(NULL, 2101248, PROT_READ|PROT_WRITE|PROT_EXEC,
> > >>>>MAP_PRIVATE|MAP_ANONYMOUS,-1, 0) = 0x42049000
> > >>>>mprotect(0x42049000, 4096, PROT_NONE) = 0
> > >>>>clone(child_stack=0x42249b08,
> > >>>>flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID,
> > >>>>parent_tidptr=0x42249bf8, {entry_number:6, base_addr:0x42249bb0,
> > >>>>limit:1048575, seg_32bit:1, contents:0, read_exec_only:0,
> > >>>>limit_in_pages:1, seg_not_present:0, useable:1}, child_tidptr=0x42249bf8)
> > >>>>= 6137
> > >>>>futex(0x8072e00, FUTEX_WAIT, 0, NULL <unfinished ...>
> > >>>>
> > >>>>
> > >>>>
> > >>>>-------------------------------------------------------
> > >>>>This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference
> > >>>>Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
> > >>>>Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA
> > >>>>REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND
> > >>>>_______________________________________________
> > >>>>Sablevm-developer mailing list
> > >>>>Sab...@li...
> > >>>>https://lists.sourceforge.net/lists/listinfo/sablevm-developer
> > >>>>
> > >>>>
> > >>>
> > >>>--
> > >>>Etienne M. Gagnon, Ph.D. http://www.info.uqam.ca/~egagnon/
> > >>>SableVM: http://www.sablevm.org/
> > >>>SableCC: http://www.sablecc.org/
> > >>>
> > >>>
> > >>
> > >
> > >
> > > -------------------------------------------------------
> > > This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference
> > > Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
> > > Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA
> > > REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND
> > > _______________________________________________
> > > Sablevm-developer mailing list
> > > Sab...@li...
> > > https://lists.sourceforge.net/lists/listinfo/sablevm-developer
> > >
> >
> >
>
|