[quote=“pcanal”]
What does myCode.cpp do? Did you trying using valgrind to pinpoint the cause of the crash?[/quote]
Hi,
As I said the code I’m using is a dummy code that doesn’t do anything. It is enough that the lib link to a ROOT lib is loaded to cause the segFault.
Valgrind doesn’t seem to give me any useful info since the ROOT libs are not compiled with debug flags. Running java with -Xcheck:jni I get:
*** Break *** segmentation violation
Warning: SIGINT handler expected:libjvm.so+0x271d00 found:0x00000001
Signal Handlers:
SIGSEGV: [libCore.so.5.18+0x1ec5e0], sa_mask[0]=0x00000000, sa_flags=0x10000000
SIGBUS: [libCore.so.5.18+0x1ec5e0], sa_mask[0]=0x00000000, sa_flags=0x10000000
SIGFPE: [libCore.so.5.18+0x1ec5e0], sa_mask[0]=0x00000000, sa_flags=0x10000000
SIGPIPE: [libCore.so.5.18+0x1ec5e0], sa_mask[0]=0x00000000, sa_flags=0x10000000
SIGXFSZ: [libjvm.so+0x2701c0], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGILL: [libCore.so.5.18+0x1ec5e0], sa_mask[0]=0x00000000, sa_flags=0x10000000
SIGUSR1: SIG_DFL, sa_mask[0]=0x00000000, sa_flags=0x00000000
SIGUSR2: [libjvm.so+0x26fb70], sa_mask[0]=0x00000000, sa_flags=0x10000004
SIGHUP: [libjvm.so+0x271d00], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGINT: SIG_IGN, sa_mask[0]=0x00000000, sa_flags=0x00000000
SIGTERM: [libjvm.so+0x271d00], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGQUIT: SIG_IGN, sa_mask[0]=0x00000000, sa_flags=0x00000000
Warning: SIGQUIT handler expected:libjvm.so+0x271d00 found:0x00000001
Signal Handlers:
SIGSEGV: [libCore.so.5.18+0x1ec5e0], sa_mask[0]=0x00000000, sa_flags=0x10000000
SIGBUS: [libCore.so.5.18+0x1ec5e0], sa_mask[0]=0x00000000, sa_flags=0x10000000
SIGFPE: [libCore.so.5.18+0x1ec5e0], sa_mask[0]=0x00000000, sa_flags=0x10000000
SIGPIPE: [libCore.so.5.18+0x1ec5e0], sa_mask[0]=0x00000000, sa_flags=0x10000000
SIGXFSZ: [libjvm.so+0x2701c0], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGILL: [libCore.so.5.18+0x1ec5e0], sa_mask[0]=0x00000000, sa_flags=0x10000000
SIGUSR1: SIG_DFL, sa_mask[0]=0x00000000, sa_flags=0x00000000
SIGUSR2: [libjvm.so+0x26fb70], sa_mask[0]=0x00000000, sa_flags=0x10000004
SIGHUP: [libjvm.so+0x271d00], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGINT: SIG_IGN, sa_mask[0]=0x00000000, sa_flags=0x00000000
SIGTERM: [libjvm.so+0x271d00], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGQUIT: SIG_IGN, sa_mask[0]=0x00000000, sa_flags=0x00000000
(no debugging symbols found)
Attaching to program: /proc/20302/exe, process 20302
[Thread debugging using libthread_db enabled]
I have run some more tests and it appears that the problem is linked to the fact that the java code is running more that one thread… I mean when I run the code with just one thread it seems ok or at least it takes longer to happen. So it might not linked to ROOT after all.
I’m sorry I’m vague in the clues that I’m giving but I’m new to java and this is my first experiment with JNI. So I haven’t figure out how to debug this in a proper way.
[/list]