JNI SIGSEGV on AMD64

Discussion in 'Java' started by rafael@enq.ufrgs.br, Aug 7, 2006.

  1. Guest

    Hi All,

    I have wrote an JNI interface for a C library. Everything works just
    fine in 32bit machines/virtual machines.
    Now I'm trying to reproduce the results with the amd64 Sun JVM (on an
    amd64 machine). I recompiled the library on the target machine and got
    no errors or warnings, but when I run the code I got the following:

    #
    # An unexpected error has been detected by HotSpot Virtual Machine:
    #
    # SIGSEGV (0xb) at pc=0x00002aaafb10957e, pid=5819, tid=46912501787360
    #
    # Java VM: Java HotSpot(TM) 64-Bit Server VM (1.5.0_06-b05 mixed mode)
    # Problematic frame:
    # C [libumfpack.so.4+0x6257e] umfpack_di_free_symbolic+0x1e
    #
    # An error report file with more information is saved as
    hs_err_pid5819.log
    #
    # If you would like to submit a bug report, please visit:
    # http://java.sun.com/webapps/bugreport/crash.jsp
    #

    Should I use special compilation flags for the amd64 version?
    Any ideas?

    Thank you in advance!
     
    , Aug 7, 2006
    #1
    1. Advertising

  2. Nigel Wade Guest

    wrote:

    > Hi All,
    >
    > I have wrote an JNI interface for a C library. Everything works just
    > fine in 32bit machines/virtual machines.
    > Now I'm trying to reproduce the results with the amd64 Sun JVM (on an
    > amd64 machine). I recompiled the library on the target machine and got
    > no errors or warnings, but when I run the code I got the following:
    >
    > #
    > # An unexpected error has been detected by HotSpot Virtual Machine:
    > #
    > # SIGSEGV (0xb) at pc=0x00002aaafb10957e, pid=5819, tid=46912501787360
    > #
    > # Java VM: Java HotSpot(TM) 64-Bit Server VM (1.5.0_06-b05 mixed mode)
    > # Problematic frame:
    > # C [libumfpack.so.4+0x6257e] umfpack_di_free_symbolic+0x1e
    > #
    > # An error report file with more information is saved as
    > hs_err_pid5819.log
    > #
    > # If you would like to submit a bug report, please visit:
    > # http://java.sun.com/webapps/bugreport/crash.jsp
    > #
    >
    > Should I use special compilation flags for the amd64 version?
    > Any ideas?
    >
    > Thank you in advance!


    It's most likely that your C library is not 64bit clean.

    Check your assumptions regarding the size of C variables, especially pointers,
    they might well be wrong.

    --
    Nigel Wade, System Administrator, Space Plasma Physics Group,
    University of Leicester, Leicester, LE1 7RH, UK
    E-mail :
    Phone : +44 (0)116 2523548, Fax : +44 (0)116 2523555
     
    Nigel Wade, Aug 8, 2006
    #2
    1. Advertising

  3. Guest

    Nigel Wade escreveu:

    > It's most likely that your C library is not 64bit clean.
    >
    > Check your assumptions regarding the size of C variables, especially pointers,
    > they might well be wrong.
    >
    > --
    > Nigel Wade, System Administrator, Space Plasma Physics Group,
    > University of Leicester, Leicester, LE1 7RH, UK
    > E-mail :
    > Phone : +44 (0)116 2523548, Fax : +44 (0)116 2523555


    Dear Nigel,

    I found the problem, really it has to do with some pointer casts I
    made. Actually the implemantation was buggy even on 32bits but the
    problem haven't show up.

    Thank you!
     
    , Aug 8, 2006
    #3
    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. Frank
    Replies:
    0
    Views:
    2,117
    Frank
    Aug 5, 2003
  2. manoj
    Replies:
    0
    Views:
    1,185
    manoj
    Jun 25, 2004
  3. Morris Dovey

    gdb SIGSEGV

    Morris Dovey, Feb 12, 2004, in forum: C Programming
    Replies:
    3
    Views:
    1,004
    Mark McIntyre
    Feb 14, 2004
  4. Nancy
    Replies:
    0
    Views:
    330
    Nancy
    Apr 5, 2006
  5. oviv

    jni libjvm sigsegv

    oviv, May 25, 2011, in forum: Java
    Replies:
    1
    Views:
    1,037
Loading...

Share This Page