JNI SIGSEGV on AMD64

R

rafael

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!
 
N

Nigel Wade

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

rafael

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 : (e-mail address removed)
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!
 

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,774
Messages
2,569,599
Members
45,175
Latest member
Vinay Kumar_ Nevatia
Top