BZ #5: Early SIGQUIT causes fatal assert in vm/jit/codegen.inc:728

Status fields:

creation_ts:2005-07-20 12:50
component:unspecified
version:unspecified
rep_platform:i386
op_sys:Linux
bug_status:RESOLVED
resolution:FIXED
reporter:greenrd@greenrd.org
The attached test case rapidly fires SIGQUITs at the VM. The timing needed to
trigger this bug may need to be calibrated for different machines - on my
machine, a value of startupDelay of 0.1 reproduces this bug in about 25% of test
runs. (In the other 75% of test runs, the SIGQUIT comes too early, before a
signal handler has been installed.) The bug looks like this:

Full thread dump CACAO 0.92+cvs:
Cannot find Java function at 0x8071ade
cacao: ../../../../src/vm/jit/codegen.inc:728: codegen_findmethod: Assertion `0'
failed.
Exited due to signal 6

Comment #1 by greenrd@greenrd.org on 2005-07-20 12:52:18

Created an attachment (id=3)
Rapid SIGQUIT generator

Run this with:

./automatic.py cacao HelloWorld

Comment #2 by greenrd@greenrd.org on 2005-07-20 12:53:05

Created an attachment (id=4)
HelloWorld in Java

Comment #3 by greenrd@greenrd.org on 2005-07-20 13:21:02

It always seems to be the same address reported: "Cannot find Java function at
0x8071ade"

Comment #4 by greenrd@greenrd.org on 2005-07-20 20:33:36

Created an attachment (id=5)
Test case as patch

Here is a 100% reproducable test case. Apply the following patch to make the
SIGQUIT appear at a reproducable point (it's not the same address as before,
however).

If you move the call to suicide() to the point in the same function after
cacao_initializing reverts to false, the bug does not occur.

Comment #5 by twisti@complang.tuwien.ac.at on 2005-07-28 21:50:44

During initalization of threads, not all fields are set properly. Check for that.

Attachment id=3

date:2005-07-20 12:52
desc:Rapid SIGQUIT generator
type:text/x-python
download:automatic.py

Attachment id=4

date:2005-07-20 12:53
desc:HelloWorld in Java
type:text/x-java
download:HelloWorld.java

Attachment id=5

date:2005-07-20 20:33
desc:Test case as patch
type:text/plain
download:cacao-suicide.patch