BZ #191: Intermittent shutdown failures

Status fields:

creation_ts:2014-01-08 21:27
version:default branch
The buildbot test runs – interestingly (almost) only on i386 – occasionally fail like

LOG: [0x563eeb70] Mutex::lock(): pthread_mutex_lock failed: Invalid argument
LOG: [0x563eeb70] Backtrace (14 stack frames):
LOG: [0x563eeb70] ../../../src/cacao/.libs/
LOG: [0x563eeb70] ../../../src/cacao/.libs/ [0x558b7561]
LOG: [0x563eeb70] ../../../src/cacao/.libs/ [0x558b74f7]
LOG: [0x563eeb70] ../../../src/cacao/.libs/
threadobjectb+0x3f) [0x55898b8f]
LOG: [0x563eeb70] ../../../src/cacao/.libs/ [0x55899eb6]
LOG: [0x563eeb70] ../../../src/cacao/.libs/ [0x558ae148]
LOG: [0x563eeb70] ../../../src/cacao/.libs/
LOG: [0x563eeb70] ../../../src/cacao/.libs/ [0x558adc49]
LOG: [0x563eeb70] ../../../src/cacao/.libs/ [0x5589b3af]
LOG: [0x563eeb70] ../../../src/cacao/.libs/
LOG: [0x563eeb70] ../../../src/cacao/.libs/
LOG: [0x563eeb70] ../../../src/cacao/.libs/ [0x55882b28]

Exhibit 1:

The problem is that the threadlist lock is being removed by a global destructor while
still in use.

Comment #1 by on 2015-01-15 22:52:13

Seems to be eliminated for classpath builds, but running the bugzilla regression tests
with OpenJDK still results in:

#0  0x00000033004328a5 in raise () from /lib64/
#1  0x0000003300434085 in abort () from /lib64/
#2  0x00007f43f97ff199 in os::abort () at ../../src/vm/os.hpp:199
#3  0x00007f43f9824068 in abort_verrnum(int, const char *, typedef __va_list_tag
__va_list_tag *) (errnum=22,
    text=0x7f43f989f3d8 "Mutex::lock(): pthread_mutex_lock failed", ap=0x7f43f0696b40)
at os.cpp:126
#4  0x00007f43f9824173 in os::abort_errnum (errnum=22, text=0x7f43f989f3d8
"Mutex::lock(): pthread_mutex_lock failed")
    at os.cpp:155
#5  0x00007f43f97c49c7 in Mutex::lock (this=0x7f43f9b12560) at ../../src/threads/posix
#6  0x00007f43f97f9ab2 in AnyObjLocker<Mutex>::AnyObjLocker (this=0x7f43f0696c90,
    at ../../src/threads/mutex.hpp:48
#7  0x00007f43f981244b in Finalizer::reinstall_custom_finalizer (h=0x1bd6690) at
#8  0x00007f43f98120b6 in finalizer_run (o=0x1bd6690, p=0x0) at finalizer.cpp:265
#9  0x00007f43f97cb536 in GC_invoke_finalizers () at finalize.c:814
#10 0x00007f43f97c67aa in gc_invoke_finalizers () at gc-boehm.cpp:209
#11 0x00007f43f9811fdc in finalizer_thread () at finalizer.cpp:169
#12 0x00007f43f97fc246 in threads_startup_thread (arg=0x7fffba163e60) at thread-
#13 0x00007f43f97d80bf in GC_inner_start_routine (sb=<value optimized out>, arg=<value
optimized out>)
    at pthread_start.c:56
#14 0x00007f43f97d29da in GC_call_with_stack_base (fn=<value optimized out>, arg=<value
optimized out>) at misc.c:1553
#15 0x0000003300c07851 in start_thread () from /lib64/

Comment #2 by on 2015-01-20 20:34:36

I don't know of any outstanding issues with this one.