NullPointerException in waitCond()

Godmar Back kaffe@rufus.w3.org
Thu, 30 Jul 1998 14:35:19 -0600 (MDT)


 Archie,

> 
> My application is failing because of a NullPointerException, and a little
> debugging show that getLock() is returning NULL in the function waitCond()
> in "kaffe/kaffevm/locks.c":
> 

 This is apparently so because a mutex was already freed before
you try to wait on it.  Try -vmdebug VMLOCKS, and see what that says.  

> 
> This happens completely deterministically, as far as I can tell.
> This is kaffe vintage july 29 snapshot (yesterday).
> How can I help debug this problem? 
> 

Do you have a short reproducible test case that you could send me?

> On another note, sometimes Kaffe will not respond to Control-C (SIGINT).
> In fact, it often only stops with kill -9 when running a certain application.
> What's the theory on how SIGINT is handled?
> 

The theory is that in jthreads.c, catchSignal(SIGINT, restore_fds_and_exit);
should cause a call to `restore_fds_and_exit', which restores the fds and
exits.  The reality is that I've been seeing the behavior you describe too.
When I have time, I'll track it down.  On FreeBSD or Linux, the catchSignal
is not really necessary, so you could take it out.

	- Godmar