bug in finalizer?

Parmelan, Edouard EP510777 at exchange.FRANCE.NCR.com
Tue Oct 13 09:23:18 PDT 1998


Hi Godmar,
Hi Archie,

> I don't know what's causing it though... could you run it with
> -vmdebug DETECTDEADLOCK?  Also, does it occur under gdb and if so,
> can you get backtraces of the threads involved.  I'll try to 
> reproduce it.

I found the bug:

The finalizer thread write a lot on STDOUT and,
in jthreadedWrite(), write() return -1 with errno == EAGAIN
(on MP-RAS, EWOULDBLOCK == EAGAIN). The current thread block
until IO could continue: blockOnFile(fd, TH_WRITE).  It will
be wakeup later by handleIO().
But, handeIO() is only called:
1. on signal SIGIO.
  fail: SIGIO is not send for STDOUT
2. in reschedule() iif there is no thread to reschedule.
  fail: the main thread and GC ?
3. on 20th signal SIGVTALRM.
  fail: The are no thread in the alarmList, setitimer() is never called

Need a good patch,
Edouard.


More information about the kaffe mailing list