[Bug 84] New: Issues with threads and synchronizing
| Newsgroups | gmane.comp.java.vm.sablevm.bugs |
|---|---|
| Message-ID | <[email protected]> |
http://sablevm.org/bugs/show_bug.cgi?id=84
Summary: Issues with threads and synchronizing
Product: SableVM
Version: 1.1.6
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: default
AssignedTo: [email protected]
ReportedBy: [email protected]
QAContact: [email protected]
I've started tinkering with Java and doing a thread tutorial on java,sun.com
(http://java.sun.com/docs/books/tutorial/essential/TOC.html#threads), I've
noticed that the example often locks up with sablevm whereas it works flawlessly
with Sun's own Jdk 1.5. The example in question is:
http://java.sun.com/docs/books/tutorial/essential/threads/example/Producer.java
http://java.sun.com/docs/books/tutorial/essential/threads/example/Consumer.java
http://java.sun.com/docs/books/tutorial/essential/threads/example/CubbyHole.java
http://java.sun.com/docs/books/tutorial/essential/threads/example/ProducerConsumerTest.java
The lockup happens about one time out of 4. I'm using Debian unstable and
sablevm 1.1.6 (the official debian package).
Here's a little bit of debug info:
michele@forst:~/$ sablevm ProducerConsumerTest
SableVM version 1.1.6
Copyright (C) 2000-2004 Etienne M. Gagnon <[email protected]> and
others. All rights reserved.
This software comes with ABSOLUTELY NO WARRANTY. This is free
software, and you are welcome to redistribute it under certain
conditions.
To get the name of all copyright holders and detailed license
information, type "sablevm --license" or look in the directory
"/usr/share/sablevm".
The SableVM web site is located at http://www.sablevm.org/ .
Profucer #1 put:0
Consumer #1 got: 0
<program goes into infinite loop here>
And here is some GDB info (don't how much useful, since presumably most stuff is
stripped out of debian's binaries):
michele@forst:~/svn/university/sistemi_operativi/complementi $ gdb --pid 11257
GNU gdb 6.3-debian
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-linux".
Attaching to process 11257
Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1".
warning: could not load vsyscall page because no executable was specified
warning: try using the "file" command first
Reading symbols from /usr/bin/sablevm...(no debugging symbols found)...done.
Reading symbols from /usr/lib/libsablevm-1.1.6.so...(no debugging symbols
found)...done.
Loaded symbols for /usr/lib/libsablevm-1.1.6.so
Reading symbols from /lib/libpopt.so.0...(no debugging symbols found)...done.
Loaded symbols for /lib/libpopt.so.0
Reading symbols from /lib/libc.so.6...(no debugging symbols found)...done.
Loaded symbols for /lib/libc.so.6
Reading symbols from /lib/libm.so.6...
(no debugging symbols found)...done.
Loaded symbols for /lib/libm.so.6
Reading symbols from /usr/lib/libffi.so.2...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libffi.so.2
Reading symbols from /usr/lib/libltdl.so.3...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libltdl.so.3
Reading symbols from /lib/libpthread.so.0...(no debugging symbols found)...done.
[Thread debugging using libthread_db enabled]
[New Thread 16384 (LWP 11257)]
[New Thread 32769 (LWP 11258)]
[New Thread 16386 (LWP 11259)]
[New Thread 32771 (LWP 11260)]
Loaded symbols for /lib/libpthread.so.0
Reading symbols from /lib/ld-linux.so.2...
(no debugging symbols found)...done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from /lib/libdl.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib/libdl.so.2
Reading symbols from
/usr/lib/sablevm/sablevm-classpath/libjavalang-1.1.6.so...(no debugging symbols
found)...done.
Loaded symbols for /usr/lib/sablevm/sablevm-classpath/libjavalang-1.1.6.so
Reading symbols from
/usr/lib/sablevm/sablevm-classpath/libjavanio-1.1.6.so...(no debugging symbols
found)...done.
Loaded symbols for /usr/lib/sablevm/sablevm-classpath/libjavanio-1.1.6.so
Reading symbols from /usr/lib/sablevm/sablevm-classpath/libjavaio-1.1.6.so...
(no debugging symbols found)...done.
Loaded symbols for /usr/lib/sablevm/sablevm-classpath/libjavaio-1.1.6.so
0xb7db505c in __pthread_sigsuspend () from /lib/libpthread.so.0
(gdb) bt
#0 0xb7db505c in __pthread_sigsuspend () from /lib/libpthread.so.0
#1 0xb7db4e51 in __pthread_wait_for_restart_signal () from /lib/libpthread.so.0
#2 0xb7db1d78 in pthread_cond_wait@GLIBC_2.0 () from /lib/libpthread.so.0
#3 0xb7f07db6 in pthread_cond_wait () from /lib/libc.so.6
#4 0xb7fc670c in JNI_CreateJavaVM () from /usr/lib/libsablevm-1.1.6.so
#5 0x0804a1a2 in ?? ()
#6 0x0804c2c0 in ?? ()
#7 0x08062220 in ?? ()
#8 0xb6ca7b60 in ?? ()
#9 0x08062240 in ?? ()
#10 0x00000004 in ?? ()
#11 0xbffff880 in ?? ()
#12 0xb80009b8 in _r_debug ()
#13 0xbffff8d4 in ?? ()
#14 0xbffff834 in ?? ()
#15 0xb7e352d0 in ?? () from /lib/libc.so.6
#16 0xb7fead88 in ?? ()
#17 0x0000002f in ?? ()
#18 0xb7e9e010 in strncpy () from /lib/libc.so.6
#19 0xb7e3fd76 in __libc_start_main () from /lib/libc.so.6
#20 0x08048b71 in ?? ()
(gdb)
Let me know if I should first try with 1.1.7 (from the changelog I haven't
noticed anything related to threads) or if I need to provide more info.
Thanks again and Happy new year ;)
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
You are the QA contact for the bug, or are watching the QA contact.