JNI Exits with SIGUSR2

Discussion in 'Java' started by arunmozhian@gmail.com, Nov 23, 2005.

  1. Guest

    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
    , Nov 23, 2005
    #1
    1. Advertising

  2. 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"
    Stefan Schulz, Nov 24, 2005
    #2
    1. Advertising

  3. Guest

    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
    , Nov 28, 2005
    #3
  4. 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="Signal.java" +"package sun.misc"

    --
    "Thomas:Fritsch$ops:de".replace(':','.').replace('$','@')
    Thomas Fritsch, Nov 28, 2005
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Alex Hunsley

    IBM's JNI fails where Sun's JNI works

    Alex Hunsley, Nov 3, 2003, in forum: Java
    Replies:
    4
    Views:
    847
    Alex Hunsley
    Nov 4, 2003
  2. Pasturel Jean-Louis

    Porting JNI Windows under JNI LINUX + Wine ?

    Pasturel Jean-Louis, Feb 29, 2004, in forum: Java
    Replies:
    5
    Views:
    902
    Pasturel Jean-Louis
    Mar 3, 2004
  3. vasanth
    Replies:
    0
    Views:
    2,685
    vasanth
    Jan 25, 2005
  4. vasanth
    Replies:
    0
    Views:
    620
    vasanth
    Jan 25, 2005
  5. bgabrhelik
    Replies:
    0
    Views:
    801
    bgabrhelik
    Sep 29, 2009
Loading...

Share This Page