Thread.stop/join problem on kaffe-0.9.2

Yuji Nimura nimura at arc.isl.melco.co.jp
Mon Feb 16 02:02:34 PST 1998


Hi,

I found the following program does not work fine with kaffe-0.9.2 on
HP-UX 10.20.
It seem that kaffe-0.9.2 has a problem on Thread.stop/join mechanism.
How about kaffes on the other platforms ?

================ the prgoram: tthrd1.java ================
class btst1 extends Thread
{

  public void run()
    {
      System.out.println(isAlive()+" 1");
      this.stop();
    }
}

public class tthrd1
{
  public static void main(String args[])
    {
      btst1 b=null;
      int c = 0;
        
      System.err.println("main start");
      b = new btst1();
      b.start();
      System.err.println("thrd start");

      System.err.println("thrd join");
      try{b.join();}catch(InterruptedException e){}
      System.err.println("main end");
    }
}
==========================================================
================ outout of kaffe   =======================
myhost: kaffe tthrd1
main start
thrd start
thrd join
true 1
(kaffe stops and never prints "main end")
================ outout of another java VM ===============
myhost: java tthrd1
main start
thrd start
thrd join
true 1
main end
myhost: 
==========================================================

I try to debug this problem but I can not fix it.
The following is the stack trace list from core when the kaffe stops. 
I made a special version of kaffe which use default signal handers and
I sent SIGSEGV to the kaffe to get the core.


 0 checkEvents ()    [thread-internal.c: 557]
   at this level, currentThread->base.dtable->class->name => "btst1"
 1 reschedule ()    [thread-internal.c: 525]
 2 killThread ()    [thread-internal.c: 299]
 3 dispatchException (eobj = 0x400d6390, baseframe =   00000000)    [exception.c: 180]
   at this level, eobj(0x400d6390)->dtable->class->name->data => "java/lang/ThreadDeath"
 4 throwExternalException (eobj = 0x400d6390)    [exception.c: 84]
 5 throwException (eobj = 0x400d6390)    [exception.c: 68]
 6 SignalError (ee =   00000000, cname = 0x400024c0, str = 0x400024d8)    [support.c: 275]
 7 stopThread (tid = 0x400eca08)    [thread.c: 129]
 8 java_lang_Thread_stop0 (obj = 0x400d6330)    [java.lang/Thread.c: 86]
 9 Kaffe_java_lang_Thread_stop0_stub (_P_ = 0x400ff8e0, _R_ = 0x400ff208)    [java.lang.stubs/ThreadStub.c: 80]
10 virtualMachine (meth = 0x400586f8, arg = 0x400ff8e0, retval = 0x400ff208)    [intrp/machine.c: 116]
11 virtualMachine (meth = 0x4005cb20, arg = 0x0000000a, retval =   00000000)    [kaffe.def: 2930]


Yuji Nimura (nimura at arc.isl.melco.co.jp)



More information about the kaffe mailing list