Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > JNI Exits with SIGUSR2

Reply
Thread Tools

JNI Exits with SIGUSR2

 
 
arunmozhian@gmail.com
Guest
Posts: n/a
 
      11-23-2005
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

 
Reply With Quote
 
 
 
 
Stefan Schulz
Guest
Posts: n/a
 
      11-24-2005
On Wed, 23 Nov 2005 12:01:34 -0800, arunmozhian wrote:

> 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.

--
You can't run away forever,
But there's nothing wrong with getting a good head start.
--- Jim Steinman, "Rock and Roll Dreams Come Through"


 
Reply With Quote
 
 
 
 
arunmozhian@gmail.com
Guest
Posts: n/a
 
      11-28-2005
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

 
Reply With Quote
 
Thomas Fritsch
Guest
Posts: n/a
 
      11-28-2005
Stefan Schulz wrote:
> 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=%22Si...ge+sun.misc%22

--
"Thomas:Fritsch$ops:de".replace(':','.').replace(' $','@')

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
JNI thread vs. native thread vs. JNI call bgabrhelik Java 0 09-29-2009 03:33 PM
Re: JNI: Error loading DLL from JNI DDL vasanth Java 0 01-25-2005 11:03 AM
Re: JNI: Error loading DLL from JNI DDL vasanth Java 0 01-25-2005 11:01 AM
Porting JNI Windows under JNI LINUX + Wine ? Pasturel Jean-Louis Java 5 03-03-2004 07:50 PM
IBM's JNI fails where Sun's JNI works Alex Hunsley Java 4 11-04-2003 10:34 AM



Advertisments