bug in finalizer?
Godmar Back
gback at cs.utah.edu
Tue Oct 13 17:16:14 PDT 1998
>
> Parmelan, Edouard <EP510777 at exchange.FRANCE.NCR.com> writes:
>
> > Hi Alexandre,
> >> The attached program will stop running the finalizer after collecting
> >> some objects, for some reason I couldn't find out :-(
>
> >> This is on Kaffe 1.0.b2, tested on Solaris/Sparc and Linux/x86.
>
> > Work for me on NCR MP-RAS/x86 (jit)
> > kaffe FinalizeBug >log 2>err &
>
> Actually, it seems to work if you redirect stdout to a file. If it
> writes to a tty, it will *wait for input* before the finalizer
> proceeds every now and then. Incredible!!!
>
What happens is that some systems (FreeBSD, for instance) don't deliver a
SIGIO is a file descriptor that overran its output queue becomes again
writable. It works fine if something can be read from it: so pressing a
key will deliver a SIGIO, which will cause kaffe to continue because select
says the fd is writable again. The reason is that both stdin and stdout
are mapped to the same kernel/terminal file descriptor.
Anyway, the work-around I had put in was to poll every so often. Then,
I optimized it away for the case that there is only one user thread --
as is the case in your example. The reason was that it was done in the
SIGVTALRM handler. I put it back in for now.
- Godmar
More information about the kaffe
mailing list