kaffe dumps core in thread regression tests
Godmar Back
gback at cs.utah.edu
Thu May 14 15:43:13 PDT 1998
Did you give the configuration option --with-threads=unix-jthreads?
The test cases in TestScriptThread test improvements which I introduced
while implementing the new "jthread" internal threading system.
They will fail with the old internal threading system, which is used
by default. Would you try the option and report if it still fails?
The new threading system is pretty much based on the old one, except that
it adds a primitive form of preemption (rotating the run queue at every
SIGVTALRM) plus support for asynchronous I/O based on SIGIO.
Right now, I'm busy ironing out all the race conditions that that turned
up...
- Godmar
>
> Again, Solaris 2.6, running regression tests on latest snapshot. Kaffe
> passes three and fails on the other two (dumping core in the process).
> (Running as interpreter, not JIT.)
>
> This is the session output for the first failing case:
> -n CatchDeath ...
> Abort - core dumped
> error running
> Should have got:
> Caught java.lang.ThreadDeath
> Caught java.lang.ThreadDeath
> Caught java.lang.ThreadDeath
> But got instead:
> Caught java.lang.ThreadDeath
> Caught java.lang.ThreadDeath
> locks.c:191: failed assertion `lk->holder == (*Kaffe_ThreadInterface.currentNative)()'
>
> gdb trace of the core file:
> #0 0xef7072e0 in _libc_kill ()
> #1 0xef6ba558 in abort ()
> #2 0x11b34 in __eprintf (string=0xef79e288 "%s:%u: failed assertion `%s'\n",
> expression=0xef79e2a8 "locks.c", line=191,
> filename=0xef79e2d8 "lk->holder == (*Kaffe_ThreadInterface.currentNative)()")
> #3 0xef78df1c in _unlockMutex (addr=0x9ee68) at locks.c:191
> #4 0xef79cff4 in virtualMachine (meth=0xfddc8, arg=0x153c30, retval=0x153f10,
> tid=0x1233e0) at kaffe.def:2444
> #5 0xef79ce10 in virtualMachine (meth=0x85ae8, arg=0x153df0, retval=0x153f10,
> tid=0x1233e0) at kaffe.def:2320
> #6 0xef78f0b8 in callMethodV (meth=0x85ae8, func=0x85ae8, obj=0x1233e0,
> args=0x153ff8, ret=0x153f10) at support.c:447
> #7 0xef78e570 in do_execute_java_method_v (obj=0x1233e0,
> method_name=0xef79e250 "run", signature=0x1233e0 "", mb=0x85ae8,
> isStaticCall=0, argptr=0x153ff8) at support.c:79
> #8 0xef78e5b8 in do_execute_java_method (obj=0x1233e0,
> method_name=0xef79e250 "run", signature=0xef79e1f8 "()V", mb=0x0,
> isStaticCall=0) at support.c:91
> #9 0xef78d8ec in firstStartThread (arg=0x0) at thread.c:208
> #10 0xef799aa0 in Tcreate (tid=0x5c8, func=0x574)
> at ./systems/unix-internal/internal.c:723
> #11 0xef78d664 in startThread (tid=0xa2500) at thread.c:106
> #12 0xef5573b4 in java_lang_Thread_sleep (time=0x00000000000001f4)
> at Thread.c:40
> #13 0xef78da74 in sleepThread (time=0x00000000000001f4) at thread.c:259
> #14 0xef5573b4 in java_lang_Thread_sleep (time=0x00000000000001f4)
> at Thread.c:40
> #15 0xef78ed0c in callMethodA (meth=0x0, func=0x0, obj=0xefffe9c2,
> args=0xefffeba8, ret=0xefffeeb8) at support.c:319
> #16 0xef79a734 in virtualMachine (meth=0x85868, arg=0xefffeba8,
> retval=0xefffeeb8, tid=0xa2500) at ./intrp/machine.c:113
> #17 0xef79cbc8 in virtualMachine (meth=0xf4478, arg=0xefffed98,
> retval=0xefffeeb8, tid=0xa2500) at kaffe.def:2270
> #18 0xef78f0b8 in callMethodV (meth=0xf4478, func=0xf4478, obj=0xefffee11,
> args=0xeffff09c, ret=0xefffeeb8) at support.c:447
> #19 0xef78e678 in do_execute_java_class_method_v (cname=0xeffff030 "",
> method_name=0x13030 "main", signature=0x13038 "([Ljava/lang/String;)V",
> argptr=0xeffff098) at support.c:120
> #20 0xef78e6c0 in do_execute_java_class_method (cname=0xeffff266 "CatchDeath",
> method_name=0x13030 "main", signature=0x13038 "([Ljava/lang/String;)V")
> at support.c:132
>
> Second failed case:
> -n ThreadStop ...
> Abort - core dumped
> error running
> Should have got:
> Test 1: Stop a thread that's blocked on itself
> Target (BlockThread) running...
> Locked ...
> Success. Target is dead.
> Sleeping while still holding on to target
> Releasing target lock
> Handling my own: java.lang.ThreadDeath
> Am I alive? Answer: false
> Test 2: Stop a thread that's blocked in a monitor
> Target (MonitorThread) running...
> Success. Target is dead.
> Test 3: Stop a thread that's running
> Target (RunThread) running...
> Success. Target is dead.
> Test 4: Stop a thread that's done
> Success. Target is dead.
> Test 5: Stop a thread that's never been run
> Success. Target is dead.
> Test 6: Have a thread stop itself
> Success. Target is dead.
> All tests completed
> But got instead:
> Test 1: Stop a thread that's blocked on itself
> Target (BlockThread) running...
> Locked ...
> locks.c:191: failed assertion `lk->holder == (*Kaffe_ThreadInterface.currentNative)()'
>
> gdb trace of the core file:
> #0 0xef7072e0 in _libc_kill ()
> (gdb) where
> #0 0xef7072e0 in _libc_kill ()
> #1 0xef6ba558 in abort ()
> #2 0x11b34 in __eprintf (string=0xef79e288 "%s:%u: failed assertion `%s'\n",
> expression=0xef79e2a8 "locks.c", line=191,
> filename=0xef79e2d8 "lk->holder == (*Kaffe_ThreadInterface.currentNative)()")
> #3 0xef78df1c in _unlockMutex (addr=0xdfc30) at locks.c:191
> #4 0xef79cff4 in virtualMachine (meth=0x1225e0, arg=0x141df0,
> retval=0x141f10, tid=0x123828) at kaffe.def:2444
> #5 0xef78f0b8 in callMethodV (meth=0x1225e0, func=0x1225e0, obj=0x123828,
> args=0x141ff8, ret=0x141f10) at support.c:447
> #6 0xef78e570 in do_execute_java_method_v (obj=0x123828,
> method_name=0xef79e250 "run", signature=0x123828 "", mb=0x1225e0,
> isStaticCall=0, argptr=0x141ff8) at support.c:79
> #7 0xef78e5b8 in do_execute_java_method (obj=0x123828,
> method_name=0xef79e250 "run", signature=0xef79e1f8 "()V", mb=0x0,
> isStaticCall=0) at support.c:91
> #8 0xef78d8ec in firstStartThread (arg=0x0) at thread.c:208
> #9 0xef799aa0 in Tcreate (tid=0x752e0, func=0x77418)
> at ./systems/unix-internal/internal.c:723
> #10 0xef78d664 in startThread (tid=0x4109) at thread.c:106
> #11 0x7743e in ?? ()
> #12 0xc in ?? ()
>
> Davor
>
More information about the kaffe
mailing list