JNI Exits with SIGUSR2

A

arunmozhian

Hello,
I'm trying to debug an issue with a Java program which involves/uses
JNI too !
In short, I'm not able to isolate the problem (whether the issue is
in Java or JNI!),
since for any issue all I get is a User Signal 2.
Sometimes I've had issues in Java which ended in User Signal 2
anyway !

Any ptrs on when does Java use/throw a User Signal 2 (especially
with JNI) ?
and how to go about debugging the same will be really helpful.

Any resources/pointers on JNI debugging will also be helpful ?


Thanks,
Arun
 
S

Stefan Schulz

Hello,
I'm trying to debug an issue with a Java program which involves/uses
JNI too !
In short, I'm not able to isolate the problem (whether the issue is
in Java or JNI!),
since for any issue all I get is a User Signal 2.
Sometimes I've had issues in Java which ended in User Signal 2
anyway !

Any ptrs on when does Java use/throw a User Signal 2 (especially
with JNI) ?
and how to go about debugging the same will be really helpful.

Any resources/pointers on JNI debugging will also be helpful ?

AFAIK, the JDK does not use any system signals it does not provide its own
handlers for. The fact that the signal is raised seems to me like an issue
between the JNI and whatever native libraries used. Take a look at the
crash trace of the java process, and make sure that the signal is not
raised in your (or whatever native libraries you use) code.
 
A

arunmozhian

There's no crash generated. All that is generated is a User Signal 2.
And I've verified that
my native libs do not handle/raise SIGUSR2. I believe the JVM uses
SIGUSR2 for Garb. coll'n.

-- Arun
 
T

Thomas Fritsch

Stefan said:
AFAIK, the JDK does not use any system signals it does not provide its own
handlers for.
I don't agree here.
The JDK contains some signal-related classes (Signal, SignalHandler,
NativeSignalHandler in package sun.misc) which map pretty straight to
the C-functions raise() and signal(). This fact makes me think that Sun
very well may raise/handle signals somewhere in its Java code.

See also
http://www.google.com/search?q="Signal.java"++"package+sun.misc"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,570
Members
45,045
Latest member
DRCM

Latest Threads

Top