[Bug libgcj/34574] wait() call hangs in _Jv_CondWait taking the monitor with it causing the application to hang

pashev.igor at gmail dot com gcc-bugzilla@gcc.gnu.org
Sun Jan 11 16:02:00 GMT 2015


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=34574

--- Comment #4 from Igor Pashev <pashev.igor at gmail dot com> ---
I can reploduce it with Debian/amd64 and gcc4.9:

Thread 3 (Thread 0x7f43f8764700 (LWP 16318)):
#0  __lll_lock_wait () at
../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:135
#1  0x00007f445d4f74b9 in _L_lock_909 () from
/lib/x86_64-linux-gnu/libpthread.so.0
#2  0x00007f445d4f72e0 in __GI___pthread_mutex_lock (mutex=0x7f4461280ea0) at
../nptl/pthread_mutex_lock.c:79
#3  0x00007f445ef93684 in _Jv_MutexLock(_Jv_Mutex_t*) () from
/usr/lib/x86_64-linux-gnu/libgcj.so.15
#4  0x00007f445ef8851c in _Jv_MonitorEnter () from
/usr/lib/x86_64-linux-gnu/libgcj.so.15
#5  0x00000000004030fd in JvSynchronize::JvSynchronize (this=0x7f43f8763de0,
o=@0x6057e0: 0x7f44612cbc60) at /usr/include/c++/4.9/gcj/cni.h:99
#6  0x0000000000402f25 in env_test::foo () at TestJVSynchronise19thDec.cc:18
#7  0x0000000000402ef3 in env_test.run()void () at env_test.java:8
#8  0x0000000000402430 in WorkerThread.run()void () at ThreadPool.java:154
#9  0x00007f445ef8c16b in _Jv_ThreadRun(java::lang::Thread*) () from
/usr/lib/x86_64-linux-gnu/libgcj.so.15
#10 0x00007f445ef93ff7 in ?? () from /usr/lib/x86_64-linux-gnu/libgcj.so.15
#11 0x00007f445f7bb748 in ?? () from /usr/lib/x86_64-linux-gnu/libgcj.so.15
#12 0x00007f445d4f50a4 in start_thread (arg=0x7f43f8764700) at
pthread_create.c:309
#13 0x00007f445cc02ccd in clone () at
../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 2 (Thread 0x7f43f7f63700 (LWP 16319)):
#0  __lll_lock_wait () at
../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:135
#1  0x00007f445d4f74b9 in _L_lock_909 () from
/lib/x86_64-linux-gnu/libpthread.so.0
#2  0x00007f445d4f72e0 in __GI___pthread_mutex_lock (mutex=0x7f4461280ea0) at
../nptl/pthread_mutex_lock.c:79
#3  0x00007f445ef93684 in _Jv_MutexLock(_Jv_Mutex_t*) () from
/usr/lib/x86_64-linux-gnu/libgcj.so.15
#4  0x00007f445ef8851c in _Jv_MonitorEnter () from
/usr/lib/x86_64-linux-gnu/libgcj.so.15
#5  0x00000000004030fd in JvSynchronize::JvSynchronize (this=0x7f43f7f62de0,
o=@0x6057e0: 0x7f44612cbc60) at /usr/include/c++/4.9/gcj/cni.h:99
#6  0x0000000000402f25 in env_test::foo () at TestJVSynchronise19thDec.cc:18
#7  0x0000000000402ef3 in env_test.run()void () at env_test.java:8
#8  0x0000000000402430 in WorkerThread.run()void () at ThreadPool.java:154
#9  0x00007f445ef8c16b in _Jv_ThreadRun(java::lang::Thread*) () from
/usr/lib/x86_64-linux-gnu/libgcj.so.15
#10 0x00007f445ef93ff7 in ?? () from /usr/lib/x86_64-linux-gnu/libgcj.so.15
#11 0x00007f445f7bb748 in ?? () from /usr/lib/x86_64-linux-gnu/libgcj.so.15
#12 0x00007f445d4f50a4 in start_thread (arg=0x7f43f7f63700) at
pthread_create.c:309
#13 0x00007f445cc02ccd in clone () at
../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 1 (Thread 0x7f44612ef740 (LWP 16118)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at
../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007f445ef9380b in _Jv_CondWait(_Jv_ConditionVariable_t*, _Jv_Mutex_t*,
long long, int) () from /usr/lib/x86_64-linux-gnu/libgcj.so.15
#2  0x00007f445ef88ab5 in void java::lang::Object::wait(long long, int) () from
/usr/lib/x86_64-linux-gnu/libgcj.so.15
#3  0x0000000000402bd5 in Done.waitDone()void () at ThreadPool.java:213
#4  0x0000000000402a2e in ThreadPool.complete()void () at ThreadPool.java:100
#5  0x000000000040305f in main (argc=1, argv=0x7fff5fac12e8) at
TestJVSynchronise19thDec.cc:39



More information about the Java-prs mailing list