Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JVM crash in unit test DirectTest #24

Closed
bhamail opened this issue Sep 2, 2011 · 10 comments
Closed

JVM crash in unit test DirectTest #24

bhamail opened this issue Sep 2, 2011 · 10 comments

Comments

@bhamail
Copy link
Contributor

bhamail commented Sep 2, 2011

The VM error below has occurred twice so on my Ubuntu 10.04 amd64 machine.
Also, twice, the same test passed when I ran the test suite again.

[junit] Running com.sun.jna.DirectTest
[junit] #
[junit] # A fatal error has been detected by the Java Runtime Environment:
[junit] #
[junit] #  SIGSEGV (0xb) at pc=0x00007f1db8bdbc71, pid=16855, tid=139765519607552
[junit] #
[junit] # JRE version: 6.0_26-b03
[junit] # Java VM: Java HotSpot(TM) 64-Bit Server VM (20.1-b02 mixed mode linux-amd64 compressed oops)
[junit] # Problematic frame:
[junit] # C  [ld-linux-x86-64.so.2+0x9c71]  _dl_rtld_di_serinfo+0x1141
[junit] #
[junit] # An error report file with more information is saved as:
[junit] # /home/dan/javadev/dan-jna/jna/hs_err_pid16855.log
[junit] #
[junit] # If you would like to submit a bug report, please visit:
[junit] #   http://java.sun.com/webapps/bugreport/crash.jsp
[junit] # The crash happened outside the Java Virtual Machine in native code.
[junit] # See problematic frame for where to report the bug.
[junit] #
[junit] Running com.sun.jna.DirectTest
[junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0 sec

I will attach hs_err_pid16855.log as well.

Dan Rollo

@bhamail
Copy link
Contributor Author

bhamail commented Sep 2, 2011

Can't see how to attach a file here, so
crash log content:

A fatal error has been detected by the Java Runtime Environment:

SIGSEGV (0xb) at pc=0x00007f1db8bdbc71, pid=16855, tid=139765519607552

JRE version: 6.0_26-b03

Java VM: Java HotSpot(TM) 64-Bit Server VM (20.1-b02 mixed mode linux-amd64 compressed oops)

Problematic frame:

C [ld-linux-x86-64.so.2+0x9c71] _dl_rtld_di_serinfo+0x1141

If you would like to submit a bug report, please visit:

http://java.sun.com/webapps/bugreport/crash.jsp

The crash happened outside the Java Virtual Machine in native code.

See problematic frame for where to report the bug.

--------------- T H R E A D ---------------

Current thread (0x00000000413bb000): JavaThread "Finalizer" daemon [_thread_in_native, id=16865, stack(0x00007f1db215e000,0x00007f1db225f000)]

siginfo:si_signo=SIGSEGV: si_errno=0, si_code=1 (SEGV_MAPERR), si_addr=0x0000000000000028

Registers:
RAX=0x0000000000000000, RBX=0x0000000041491a18, RCX=0x0000000000000000, RDX=0x00007f1db225c828
RSP=0x00007f1db225c640, RBP=0x0000000000000001, RSI=0x000000000f7d184d, RDI=0x0000000041503410
R8 =0x00000000003df461, R9 =0x000000000000000d, R10=0x00007f1db81b2ff0, R11=0x00007f1db225c828
R12=0x0000000000000003, R13=0x000000000f7d184d, R14=0x0000000000000000, R15=0x00007f1db225c810
RIP=0x00007f1db8bdbc71, EFLAGS=0x0000000000010202, CSGSFS=0x0000000000000033, ERR=0x0000000000000004
TRAPNO=0x000000000000000e

Top of Stack: (sp=0x00007f1db225c640)
0x00007f1db225c640: 00007f1db225c680 00007f1db7e2c751
0x00007f1db225c650: 00000000413bbcb8 00007f1db225cf90
0x00007f1db225c660: 00007f1db225cf90 00007f1db225c6b0
0x00007f1db225c670: 00007f1db225c6b0 00007f1db7e2c751
0x00007f1db225c680: 00007f1db225cf50 00007f1db225cf90
0x00007f1db225c690: 00000000413bbc10 00000000413bbc10
0x00007f1db225c6a0: 00007f1db225d0f7 00000000413bb000
0x00007f1db225c6b0: 00000000414c5470 0000000000000000
0x00007f1db225c6c0: 0000000000000000 0000000000000000
0x00007f1db225c6d0: 0000000041503410 00007f1db225cf90
0x00007f1db225c6e0: 0000000000000000 0000000200000000
0x00007f1db225c6f0: 0000000000000000 00007f1db7e950ea
0x00007f1db225c700: 00007f1db225c730 00000000414c57f8
0x00007f1db225c710: 00007f1db225c860 0000000000000000
0x00007f1db225c720: 00007f1db225c920 00000000414c5470
0x00007f1db225c730: 000000000f7d184d 00007f1db8bdc722
0x00007f1db225c740: 0000000000000000 0000000000000000
0x00007f1db225c750: 00007f1d00000002 0000000000000000
0x00007f1db225c760: 0000000000000000 00000000414c5470
0x00007f1db225c770: 00007f1db225c7c0 00007f1db7d71bf5
0x00007f1db225c780: 00000000822344d8 0000000000000000
0x00007f1db225c790: 00000000414c57f8 00007f1db225c810
0x00007f1db225c7a0: 00007f1db225c828 00000000b7baa634
0x00007f1db225c7b0: 00007f1db225c7f0 0000000041503410
0x00007f1db225c7c0: 00007f1db225c7e0 00007f1db7b33a99
0x00007f1db225c7d0: 000000004ac4aad3 0000000000000001
0x00007f1db225c7e0: 00007f1db225c8e0 00007f1db7f024f1
0x00007f1db225c7f0: 00007f1db225c860 00007f1db7bd0b40
0x00007f1db225c800: 00007f1db225c818 0000000081cbd5b2
0x00007f1db225c810: 0000000000000000 0000000000000000
0x00007f1db225c820: 00000000413bb7d0 00000000ffffffff
0x00007f1db225c830: 00007f1db225cc80 000000004134b770

Instructions: (pc=0x00007f1db8bdbc71)
0x00007f1db8bdbc51: 48 89 44 24 28 41 83 e1 3f 48 8b 03 c7 84 24 a8
0x00007f1db8bdbc61: 00 00 00 00 00 00 00 48 c7 44 24 78 00 00 00 00
0x00007f1db8bdbc71: 48 8b 40 28 4c 39 f0 48 89 84 24 88 00 00 00 0f
0x00007f1db8bdbc81: 84 da 00 00 00 f6 84 24 b4 00 00 00 02 74 0d f6

Register to memory mapping:

RAX=0x0000000000000000 is an unknown value
RBX=0x0000000041491a18 is an unknown value
RCX=0x0000000000000000 is an unknown value
RDX=0x00007f1db225c828 is pointing into the stack for thread: 0x00000000413bb000
RSP=0x00007f1db225c640 is pointing into the stack for thread: 0x00000000413bb000
RBP=0x0000000000000001 is an unknown value
RSI=0x000000000f7d184d is an unknown value
RDI=0x0000000041503410 is an unknown value
R8 =0x00000000003df461 is an unknown value
R9 =0x000000000000000d is an unknown value
R10=0x00007f1db81b2ff0: <offset 0xa99ff0> in /usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/amd64/server/libjvm.so at 0x00007f1db7719000
R11=0x00007f1db225c828 is pointing into the stack for thread: 0x00000000413bb000
R12=0x0000000000000003 is an unknown value
R13=0x000000000f7d184d is an unknown value
R14=0x0000000000000000 is an unknown value
R15=0x00007f1db225c810 is pointing into the stack for thread: 0x00000000413bb000

Stack: [0x00007f1db215e000,0x00007f1db225f000], sp=0x00007f1db225c640, free space=1017k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C [ld-linux-x86-64.so.2+0x9c71] _dl_rtld_di_serinfo+0x1141

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j java.lang.ClassLoader$NativeLibrary.find(Ljava/lang/String;)J+0
j java.lang.ClassLoader.findNative(Ljava/lang/ClassLoader;Ljava/lang/String;)J+49
v ~StubRoutines::call_stub
j com.sun.jna.Native.close(J)V+0
j com.sun.jna.NativeLibrary.dispose()V+141
j com.sun.jna.NativeLibrary.disposeAll()V+71
j com.sun.jna.Native.dispose()V+0
j com.sun.jna.Native.access$000()V+0
j com.sun.jna.Native$2.finalize()V+0
v ~StubRoutines::call_stub
j java.lang.ref.Finalizer.invokeFinalizeMethod(Ljava/lang/Object;)V+0
j java.lang.ref.Finalizer.runFinalizer()V+45
j java.lang.ref.Finalizer.access$100(Ljava/lang/ref/Finalizer;)V+1
j java.lang.ref.Finalizer$FinalizerThread.run()V+11
v ~StubRoutines::call_stub

--------------- P R O C E S S ---------------

Java Threads: ( => current thread )
0x00007f1dac004800 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=16869, stack(0x00007f1db1d1b000,0x00007f1db1e1c000)]
0x00007f1dac001800 JavaThread "C2 CompilerThread1" daemon [_thread_blocked, id=16868, stack(0x00007f1db1e1c000,0x00007f1db1f1d000)]
0x00000000413e0000 JavaThread "C2 CompilerThread0" daemon [_thread_blocked, id=16867, stack(0x00007f1db1f1d000,0x00007f1db201e000)]
0x00000000413de000 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=16866, stack(0x00007f1db201e000,0x00007f1db211f000)]
=>0x00000000413bb000 JavaThread "Finalizer" daemon [_thread_in_native, id=16865, stack(0x00007f1db215e000,0x00007f1db225f000)]
0x00000000413b9000 JavaThread "Reference Handler" daemon [_thread_blocked, id=16864, stack(0x00007f1db225f000,0x00007f1db2360000)]
0x0000000041354800 JavaThread "main" [_thread_in_vm, id=16858, stack(0x00007f1db7395000,0x00007f1db7496000)]

Other Threads:
0x00000000413b2000 VMThread [stack: 0x00007f1db2360000,0x00007f1db2461000] [id=16863]
0x00007f1dac007000 WatcherThread [stack: 0x00007f1db1c1a000,0x00007f1db1d1b000] [id=16870]

VM state:not at safepoint (normal execution)

VM Mutex/Monitor currently owned by a thread: None

Heap
PSYoungGen total 36224K, used 1244K [0x00000000d7a00000, 0x00000000da260000, 0x0000000100000000)
eden space 31104K, 4% used [0x00000000d7a00000,0x00000000d7b37150,0x00000000d9860000)
from space 5120K, 0% used [0x00000000d9860000,0x00000000d9860000,0x00000000d9d60000)
to space 5120K, 0% used [0x00000000d9d60000,0x00000000d9d60000,0x00000000da260000)
PSOldGen total 82688K, used 428K [0x0000000086e00000, 0x000000008bec0000, 0x00000000d7a00000)
object space 82688K, 0% used [0x0000000086e00000,0x0000000086e6b210,0x000000008bec0000)
PSPermGen total 21248K, used 6384K [0x0000000081c00000, 0x00000000830c0000, 0x0000000086e00000)
object space 21248K, 30% used [0x0000000081c00000,0x000000008223c058,0x00000000830c0000)

Code Cache [0x00007f1db3600000, 0x00007f1db3870000, 0x00007f1db6600000)
total_blobs=238 nmethods=12 adapters=181 free_code_cache=49897216 largest_free_block=10368

Dynamic libraries:
40000000-40009000 r-xp 00000000 08:05 394871 /usr/lib/jvm/java-6-sun-1.6.0.26/jre/bin/java
40108000-4010a000 rwxp 00008000 08:05 394871 /usr/lib/jvm/java-6-sun-1.6.0.26/jre/bin/java
4134b000-41548000 rwxp 00000000 00:00 0 [heap]
81c00000-830c0000 rwxp 00000000 00:00 0
830c0000-86e00000 rwxp 00000000 00:00 0
86e00000-8bec0000 rwxp 00000000 00:00 0
8bec0000-d7a00000 rwxp 00000000 00:00 0
d7a00000-da260000 rwxp 00000000 00:00 0
da260000-100000000 rwxp 00000000 00:00 0
7f1dac000000-7f1dac1c4000 rwxp 00000000 00:00 0
7f1dac1c4000-7f1db0000000 ---p 00000000 00:00 0
7f1db1a25000-7f1db1a38000 r-xp 00000000 08:05 394989 /usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/amd64/libnet.so
7f1db1a38000-7f1db1b39000 ---p 00013000 08:05 394989 /usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/amd64/libnet.so
7f1db1b39000-7f1db1b3c000 rwxp 00014000 08:05 394989 /usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/amd64/libnet.so
7f1db1b3c000-7f1db1b50000 r-xs 00135000 08:05 77156 /usr/share/java/ant-1.7.1.jar
7f1db1b50000-7f1db1c1a000 r-xs 009a6000 08:11 4856621 /home/dan/javadev/dan-jna/jna/lib/clover.jar
7f1db1c1a000-7f1db1c1b000 ---p 00000000 00:00 0
7f1db1c1b000-7f1db1d1b000 rwxp 00000000 00:00 0
7f1db1d1b000-7f1db1d1e000 ---p 00000000 00:00 0
7f1db1d1e000-7f1db1e1c000 rwxp 00000000 00:00 0
7f1db1e1c000-7f1db1e1f000 ---p 00000000 00:00 0
7f1db1e1f000-7f1db1f1d000 rwxp 00000000 00:00 0
7f1db1f1d000-7f1db1f20000 ---p 00000000 00:00 0
7f1db1f20000-7f1db201e000 rwxp 00000000 00:00 0
7f1db201e000-7f1db2021000 ---p 00000000 00:00 0
7f1db2021000-7f1db211f000 rwxp 00000000 00:00 0
7f1db211f000-7f1db215e000 r-xp 00000000 08:05 696640 /usr/lib/locale/en_US.utf8/LC_CTYPE
7f1db215e000-7f1db2161000 ---p 00000000 00:00 0
7f1db2161000-7f1db225f000 rwxp 00000000 00:00 0
7f1db225f000-7f1db2262000 ---p 00000000 00:00 0
7f1db2262000-7f1db2360000 rwxp 00000000 00:00 0
7f1db2360000-7f1db2361000 ---p 00000000 00:00 0
7f1db2361000-7f1db299a000 rwxp 00000000 00:00 0
7f1db299a000-7f1db2b32000 r-xs 03029000 08:05 395116 /usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/rt.jar
7f1db2b32000-7f1db2b5a000 rwxp 00000000 00:00 0
7f1db2b5a000-7f1db2b5b000 ---p 00000000 00:00 0
7f1db2b5b000-7f1db2c5b000 rwxp 00000000 00:00 0
7f1db2c5b000-7f1db2c5c000 ---p 00000000 00:00 0
7f1db2c5c000-7f1db2d5c000 rwxp 00000000 00:00 0
7f1db2d5c000-7f1db2d5d000 ---p 00000000 00:00 0
7f1db2d5d000-7f1db2e5d000 rwxp 00000000 00:00 0
7f1db2e5d000-7f1db2e5e000 ---p 00000000 00:00 0
7f1db2e5e000-7f1db2f69000 rwxp 00000000 00:00 0
7f1db2f69000-7f1db2f87000 rwxp 00000000 00:00 0
7f1db2f87000-7f1db2fb0000 rwxp 00000000 00:00 0
7f1db2fb0000-7f1db320d000 rwxp 00000000 00:00 0
7f1db320d000-7f1db3218000 rwxp 00000000 00:00 0
7f1db3218000-7f1db3236000 rwxp 00000000 00:00 0
7f1db3236000-7f1db325f000 rwxp 00000000 00:00 0
7f1db325f000-7f1db34bc000 rwxp 00000000 00:00 0
7f1db34bc000-7f1db34d1000 rwxp 00000000 00:00 0
7f1db34d1000-7f1db35ff000 rwxp 00000000 00:00 0
7f1db35ff000-7f1db3870000 rwxp 00000000 00:00 0
7f1db3870000-7f1db6600000 rwxp 00000000 00:00 0
7f1db6600000-7f1db660e000 r-xp 00000000 08:05 395011 /usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/amd64/libzip.so
7f1db660e000-7f1db6710000 ---p 0000e000 08:05 395011 /usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/amd64/libzip.so
7f1db6710000-7f1db6713000 rwxp 00010000 08:05 395011 /usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/amd64/libzip.so
7f1db6713000-7f1db6714000 rwxp 00000000 00:00 0
7f1db6714000-7f1db6720000 r-xp 00000000 08:05 11800 /lib/libnss_files-2.11.1.so
7f1db6720000-7f1db691f000 ---p 0000c000 08:05 11800 /lib/libnss_files-2.11.1.so
7f1db691f000-7f1db6920000 r-xp 0000b000 08:05 11800 /lib/libnss_files-2.11.1.so
7f1db6920000-7f1db6921000 rwxp 0000c000 08:05 11800 /lib/libnss_files-2.11.1.so
7f1db6921000-7f1db692b000 r-xp 00000000 08:05 11806 /lib/libnss_nis-2.11.1.so
7f1db692b000-7f1db6b2a000 ---p 0000a000 08:05 11806 /lib/libnss_nis-2.11.1.so
7f1db6b2a000-7f1db6b2b000 r-xp 00009000 08:05 11806 /lib/libnss_nis-2.11.1.so
7f1db6b2b000-7f1db6b2c000 rwxp 0000a000 08:05 11806 /lib/libnss_nis-2.11.1.so
7f1db6b2c000-7f1db6b34000 r-xp 00000000 08:05 10434 /lib/libnss_compat-2.11.1.so
7f1db6b34000-7f1db6d33000 ---p 00008000 08:05 10434 /lib/libnss_compat-2.11.1.so
7f1db6d33000-7f1db6d34000 r-xp 00007000 08:05 10434 /lib/libnss_compat-2.11.1.so
7f1db6d34000-7f1db6d35000 rwxp 00008000 08:05 10434 /lib/libnss_compat-2.11.1.so
7f1db6d35000-7f1db6d4c000 r-xp 00000000 08:05 10221 /lib/libnsl-2.11.1.so
7f1db6d4c000-7f1db6f4b000 ---p 00017000 08:05 10221 /lib/libnsl-2.11.1.so
7f1db6f4b000-7f1db6f4c000 r-xp 00016000 08:05 10221 /lib/libnsl-2.11.1.so
7f1db6f4c000-7f1db6f4d000 rwxp 00017000 08:05 10221 /lib/libnsl-2.11.1.so
7f1db6f4d000-7f1db6f4f000 rwxp 00000000 00:00 0
7f1db6f4f000-7f1db6f78000 r-xp 00000000 08:05 395010 /usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/amd64/libjava.so
7f1db6f78000-7f1db7077000 ---p 00029000 08:05 395010 /usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/amd64/libjava.so
7f1db7077000-7f1db707e000 rwxp 00028000 08:05 395010 /usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/amd64/libjava.so
7f1db707e000-7f1db708b000 r-xp 00000000 08:05 394988 /usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/amd64/libverify.so
7f1db708b000-7f1db718a000 ---p 0000d000 08:05 394988 /usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/amd64/libverify.so
7f1db718a000-7f1db718d000 rwxp 0000c000 08:05 394988 /usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/amd64/libverify.so
7f1db718d000-7f1db7194000 r-xp 00000000 08:05 11814 /lib/librt-2.11.1.so
7f1db7194000-7f1db7393000 ---p 00007000 08:05 11814 /lib/librt-2.11.1.so
7f1db7393000-7f1db7394000 r-xp 00006000 08:05 11814 /lib/librt-2.11.1.so
7f1db7394000-7f1db7395000 rwxp 00007000 08:05 11814 /lib/librt-2.11.1.so
7f1db7395000-7f1db7398000 ---p 00000000 00:00 0
7f1db7398000-7f1db7496000 rwxp 00000000 00:00 0
7f1db7496000-7f1db7518000 r-xp 00000000 08:05 10209 /lib/libm-2.11.1.so
7f1db7518000-7f1db7717000 ---p 00082000 08:05 10209 /lib/libm-2.11.1.so
7f1db7717000-7f1db7718000 r-xp 00081000 08:05 10209 /lib/libm-2.11.1.so
7f1db7718000-7f1db7719000 rwxp 00082000 08:05 10209 /lib/libm-2.11.1.so
7f1db7719000-7f1db8033000 r-xp 00000000 08:05 395014 /usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/amd64/server/libjvm.so
7f1db8033000-7f1db8135000 ---p 0091a000 08:05 395014 /usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/amd64/server/libjvm.so
7f1db8135000-7f1db82ea000 rwxp 0091c000 08:05 395014 /usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/amd64/server/libjvm.so
7f1db82ea000-7f1db8324000 rwxp 00000000 00:00 0
7f1db8324000-7f1db849e000 r-xp 00000000 08:05 4099 /lib/libc-2.11.1.so
7f1db849e000-7f1db869d000 ---p 0017a000 08:05 4099 /lib/libc-2.11.1.so
7f1db869d000-7f1db86a1000 r-xp 00179000 08:05 4099 /lib/libc-2.11.1.so
7f1db86a1000-7f1db86a2000 rwxp 0017d000 08:05 4099 /lib/libc-2.11.1.so
7f1db86a2000-7f1db86a7000 rwxp 00000000 00:00 0
7f1db86a7000-7f1db86a9000 r-xp 00000000 08:05 10104 /lib/libdl-2.11.1.so
7f1db86a9000-7f1db88a9000 ---p 00002000 08:05 10104 /lib/libdl-2.11.1.so
7f1db88a9000-7f1db88aa000 r-xp 00002000 08:05 10104 /lib/libdl-2.11.1.so
7f1db88aa000-7f1db88ab000 rwxp 00003000 08:05 10104 /lib/libdl-2.11.1.so
7f1db88ab000-7f1db88b2000 r-xp 00000000 08:05 394985 /usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/amd64/jli/libjli.so
7f1db88b2000-7f1db89b3000 ---p 00007000 08:05 394985 /usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/amd64/jli/libjli.so
7f1db89b3000-7f1db89b5000 rwxp 00008000 08:05 394985 /usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/amd64/jli/libjli.so
7f1db89b5000-7f1db89cd000 r-xp 00000000 08:05 11811 /lib/libpthread-2.11.1.so
7f1db89cd000-7f1db8bcc000 ---p 00018000 08:05 11811 /lib/libpthread-2.11.1.so
7f1db8bcc000-7f1db8bcd000 r-xp 00017000 08:05 11811 /lib/libpthread-2.11.1.so
7f1db8bcd000-7f1db8bce000 rwxp 00018000 08:05 11811 /lib/libpthread-2.11.1.so
7f1db8bce000-7f1db8bd2000 rwxp 00000000 00:00 0
7f1db8bd2000-7f1db8bf2000 r-xp 00000000 08:05 4066 /lib/ld-2.11.1.so
7f1db8c03000-7f1db8c0d000 rwxp 00000000 00:00 0
7f1db8c0d000-7f1db8cc3000 rwxp 00000000 00:00 0
7f1db8cc3000-7f1db8cc8000 rwxp 00000000 00:00 0
7f1db8ccd000-7f1db8cce000 rwxp 00000000 00:00 0
7f1db8cce000-7f1db8cd0000 r-xs 00015000 08:05 78065 /usr/share/java/ant-junit-1.7.1.jar
7f1db8cd0000-7f1db8cd1000 r-xs 00002000 08:05 77157 /usr/share/java/ant-launcher-1.7.1.jar
7f1db8cd1000-7f1db8cd4000 r-xs 00018000 08:05 17612 /usr/share/java/junit-3.8.2.jar
7f1db8cd4000-7f1db8cd7000 r-xs 0001b000 08:11 4856623 /home/dan/javadev/dan-jna/jna/lib/junit.jar
7f1db8cd7000-7f1db8cdb000 r-xs 0002f000 08:11 4857843 /home/dan/javadev/dan-jna/jna/build-d64/jna.jar
7f1db8cdb000-7f1db8ce2000 r-xs 00000000 08:05 44045 /usr/lib/gconv/gconv-modules.cache
7f1db8ce2000-7f1db8cea000 rwxs 00000000 00:11 460017 /tmp/hsperfdata_dan/16855
7f1db8cea000-7f1db8ceb000 rwxp 00000000 00:00 0
7f1db8ceb000-7f1db8cec000 r-xp 00000000 00:00 0
7f1db8cec000-7f1db8cee000 r-xp 00000000 08:05 394977 /usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/amd64/libjsig.so
7f1db8cee000-7f1db8ded000 ---p 00002000 08:05 394977 /usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/amd64/libjsig.so
7f1db8ded000-7f1db8dee000 rwxp 00001000 08:05 394977 /usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/amd64/libjsig.so
7f1db8dee000-7f1db8df1000 rwxp 00000000 00:00 0
7f1db8df1000-7f1db8df2000 r-xp 0001f000 08:05 4066 /lib/ld-2.11.1.so
7f1db8df2000-7f1db8df3000 rwxp 00020000 08:05 4066 /lib/ld-2.11.1.so
7f1db8df3000-7f1db8df4000 rwxp 00000000 00:00 0
7fff48737000-7fff4874d000 rwxp 00000000 00:00 0 [stack]
7fff487ff000-7fff48800000 r-xp 00000000 00:00 0 [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]

VM Arguments:
jvm_args: -Djna.library.path=/home/dan/javadev/dan-jna/jna/build-d64/native -Djna.protected=true -Djna.builddir=build-d64
java_command: org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner com.sun.jna.DirectTest filtertrace=true haltOnError=false haltOnFailure=false formatter=org.apache.tools.ant.taskdefs.optional.junit.SummaryJUnitResultFormatter showoutput=false outputtoformatters=true logtestlistenerevents=true formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,/home/dan/javadev/dan-jna/jna/build-d64/junit-results/TEST-com.sun.jna.DirectTest.xml crashfile=/home/dan/javadev/dan-jna/jna/junitvmwatcher6266603196723842326.properties propsfile=/home/dan/javadev/dan-jna/jna/junit4391005167919174793.properties
Launcher Type: SUN_STANDARD

Environment Variables:
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin
USERNAME=dan
LD_LIBRARY_PATH=/usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/amd64/server:/usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/amd64:/usr/lib/jvm/java-6-sun-1.6.0.26/jre/../lib/amd64
LD_PRELOAD=/usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/amd64/libjsig.so
SHELL=/bin/bash
DISPLAY=:0.0

Signal Handlers:
SIGSEGV: [libjvm.so+0x85f800], sa_mask[0]=0x7fffffff, sa_flags=0x10000004
SIGBUS: [libjvm.so+0x85f800], sa_mask[0]=0x7fffffff, sa_flags=0x10000004
SIGFPE: SIG_DFL, sa_mask[0]=0x00000000, sa_flags=0x00000000
SIGPIPE: SIG_DFL, sa_mask[0]=0x00000000, sa_flags=0x00000000
SIGXFSZ: SIG_DFL, sa_mask[0]=0x00000000, sa_flags=0x00000000
SIGILL: SIG_DFL, sa_mask[0]=0x00000000, sa_flags=0x00000000
SIGUSR1: SIG_DFL, sa_mask[0]=0x00000000, sa_flags=0x00000000
SIGUSR2: [libjvm.so+0x711110], sa_mask[0]=0x00000004, sa_flags=0x10000004
SIGHUP: [libjvm.so+0x710d10], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGINT: [libjvm.so+0x710d10], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGTERM: [libjvm.so+0x710d10], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGQUIT: [libjvm.so+0x710d10], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004

--------------- S Y S T E M ---------------

OS:squeeze/sid

uname:Linux 2.6.32-33-generic #72-Ubuntu SMP Fri Jul 29 21:07:13 UTC 2011 x86_64
libc:glibc 2.11.1 NPTL 2.11.1
rlimit: STACK 8192k, CORE 0k, NPROC infinity, NOFILE 1024, AS infinity
load average:1.32 0.82 0.95

/proc/meminfo:
MemTotal: 7937084 kB
MemFree: 60648 kB
Buffers: 1402920 kB
Cached: 3246556 kB
SwapCached: 0 kB
Active: 4357200 kB
Inactive: 2408732 kB
Active(anon): 2079452 kB
Inactive(anon): 53180 kB
Active(file): 2277748 kB
Inactive(file): 2355552 kB
Unevictable: 172 kB
Mlocked: 128 kB
SwapTotal: 0 kB
SwapFree: 0 kB
Dirty: 42796 kB
Writeback: 0 kB
AnonPages: 2116724 kB
Mapped: 221756 kB
Shmem: 16136 kB
Slab: 879460 kB
SReclaimable: 851860 kB
SUnreclaim: 27600 kB
KernelStack: 3824 kB
PageTables: 31144 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
WritebackTmp: 0 kB
CommitLimit: 3968540 kB
Committed_AS: 3239772 kB
VmallocTotal: 34359738367 kB
VmallocUsed: 141632 kB
VmallocChunk: 34359573500 kB
HardwareCorrupted: 0 kB
HugePages_Total: 0
HugePages_Free: 0
HugePages_Rsvd: 0
HugePages_Surp: 0
Hugepagesize: 2048 kB
DirectMap4k: 163456 kB
DirectMap2M: 4816896 kB
DirectMap1G: 3145728 kB

CPU:total 4 (4 cores per cpu, 1 threads per core) family 16 model 2 stepping 3, cmov, cx8, fxsr, mmx, sse, sse2, sse3, popcnt, mmxext, 3dnow, 3dnowext, lzcnt, sse4a

/proc/cpuinfo:
processor : 0
vendor_id : AuthenticAMD
cpu family : 16
model : 2
model name : AMD Phenom(tm) 9750 Quad-Core Processor
stepping : 3
cpu MHz : 1200.000
cache size : 512 KB
physical id : 0
siblings : 4
core id : 0
cpu cores : 4
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 5
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc rep_good nonstop_tsc extd_apicid pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs
bogomips : 4799.42
TLB size : 1024 4K pages
clflush size : 64
cache_alignment : 64
address sizes : 48 bits physical, 48 bits virtual
power management: ts ttp tm stc 100mhzsteps hwpstate

processor : 1
vendor_id : AuthenticAMD
cpu family : 16
model : 2
model name : AMD Phenom(tm) 9750 Quad-Core Processor
stepping : 3
cpu MHz : 2400.000
cache size : 512 KB
physical id : 0
siblings : 4
core id : 1
cpu cores : 4
apicid : 1
initial apicid : 1
fpu : yes
fpu_exception : yes
cpuid level : 5
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc rep_good nonstop_tsc extd_apicid pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs
bogomips : 4800.09
TLB size : 1024 4K pages
clflush size : 64
cache_alignment : 64
address sizes : 48 bits physical, 48 bits virtual
power management: ts ttp tm stc 100mhzsteps hwpstate

processor : 2
vendor_id : AuthenticAMD
cpu family : 16
model : 2
model name : AMD Phenom(tm) 9750 Quad-Core Processor
stepping : 3
cpu MHz : 1200.000
cache size : 512 KB
physical id : 0
siblings : 4
core id : 2
cpu cores : 4
apicid : 2
initial apicid : 2
fpu : yes
fpu_exception : yes
cpuid level : 5
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc rep_good nonstop_tsc extd_apicid pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs
bogomips : 4800.01
TLB size : 1024 4K pages
clflush size : 64
cache_alignment : 64
address sizes : 48 bits physical, 48 bits virtual
power management: ts ttp tm stc 100mhzsteps hwpstate

processor : 3
vendor_id : AuthenticAMD
cpu family : 16
model : 2
model name : AMD Phenom(tm) 9750 Quad-Core Processor
stepping : 3
cpu MHz : 2400.000
cache size : 512 KB
physical id : 0
siblings : 4
core id : 3
cpu cores : 4
apicid : 3
initial apicid : 3
fpu : yes
fpu_exception : yes
cpuid level : 5
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc rep_good nonstop_tsc extd_apicid pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs
bogomips : 4800.02
TLB size : 1024 4K pages
clflush size : 64
cache_alignment : 64
address sizes : 48 bits physical, 48 bits virtual
power management: ts ttp tm stc 100mhzsteps hwpstate

Memory: 4k page, physical 7937084k(60648k free), swap 0k(0k free)

vm_info: Java HotSpot(TM) 64-Bit Server VM (20.1-b02) for linux-amd64 JRE (1.6.0_26-b03), built on May 4 2011 01:13:47 by "java_re" with gcc 3.2.2 (SuSE Linux)

time: Fri Sep 2 01:39:49 2011
elapsed time: 0 seconds

@twall
Copy link
Contributor

twall commented Sep 6, 2011

It appears that the class loader is attempting to re-bind the Native.close() native method. If the VM were running parallel finalization threads, it's possible that the Native library could be unloaded/unbound before the static object within the Native class was finalized.

There may still be an outstanding issue with finalizer-based calls to Native native calls, if the Native class can be made eligible for GC (and thus is possible to run its finalizer) before other finalizers (such as Memory) are run on GC'd objects.

@twall
Copy link
Contributor

twall commented Sep 6, 2011

@twall
Copy link
Contributor

twall commented Nov 28, 2012

@bhamail is this still an issue? I recently made some tweaks that resolve some direct-calling functionality

@bhamail
Copy link
Contributor Author

bhamail commented Nov 29, 2012

Apparently there is still an issue.
FWIW, I first ran: ant clean dist test. The first run completed successfully.

I then ran: ant test. This run had a bunch of failures and errors. Below is the direct-calling failure snippet:

[junit] Testsuite: com.sun.jna.DirectTest
[junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 0.165 sec
[junit] 
[junit] #
[junit] # A fatal error has been detected by the Java Runtime Environment:
[junit] #
[junit] #  SIGSEGV (0xb) at pc=0x00007faa705a1c81, pid=13494, tid=140369889146624
[junit] #
[junit] # JRE version: 7.0-b147
[junit] # Java VM: Java HotSpot(TM) 64-Bit Server VM (21.0-b17 mixed mode linux-amd64 compressed oops)
[junit] # Problematic frame:
[junit] # C  [ld-linux-x86-64.so.2+0x9c81]  _dl_rtld_di_serinfo+0x1141
[junit] #
[junit] # Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
[junit] #
[junit] # An error report file with more information is saved as:
[junit] # /home/dan/javadev/jna/hs_err_pid13494.log
[junit] #
[junit] # If you would like to submit a bug report, please visit:
[junit] #   http://bugreport.sun.com/bugreport/crash.jsp
[junit] # The crash happened outside the Java Virtual Machine in native code.
[junit] # See problematic frame for where to report the bug.
[junit] #
[junit] Testsuite: com.sun.jna.DirectTest
[junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0 sec
[junit] 
[junit] Testcase: com.sun.jna.DirectTest:testRegisterMethods:   Caused an ERROR
[junit] Forked Java VM exited abnormally. Please note the time in the report does not reflect the time until the VM exit.
[junit] junit.framework.AssertionFailedError: Forked Java VM exited abnormally. Please note the time in the report does not reflect the time until the VM exit.
[junit] 
[junit] 
[junit] Test com.sun.jna.DirectTest FAILED (crashed)
[junit] Testsuite: com.sun.jna.DirectTypeMapperTest
[junit] Tests run: 5, Failures: 0, Errors: 0, Time elapsed: 0.149 sec
[junit] 

Other failures:

[junit] 
[junit] Testcase: testAttachedThreadCleanupOnExit(com.sun.jna.CallbacksTest):   FAILED
[junit] Timed out waiting for attached thread to be detached on exit and disposed: Thread[Thread to be cleaned up,5,main] alive: true daemon true
[junit] junit.framework.AssertionFailedError: Timed out waiting for attached thread to be detached on exit and disposed: Thread[Thread to be cleaned up,5,main] alive: true daemon true
[junit]     at com.sun.jna.CallbacksTest.testAttachedThreadCleanupOnExit(CallbacksTest.java:1064)
[junit] 

and:

[junit] 
[junit] Testcase: testAttachedThreadCleanupOnExit(com.sun.jna.DirectCallbacksTest): FAILED
[junit] Timed out waiting for attached thread to be detached on exit and disposed: Thread[Thread to be cleaned up,5,main] alive: true daemon true
[junit] junit.framework.AssertionFailedError: Timed out waiting for attached thread to be detached on exit and disposed: Thread[Thread to be cleaned up,5,main] alive: true daemon true
[junit]     at com.sun.jna.CallbacksTest.testAttachedThreadCleanupOnExit(CallbacksTest.java:1064)
[junit] 

and:

[junit] 
[junit] Testcase: testLoadJAWT(com.sun.jna.LibraryLoadTest):    Caused an ERROR
[junit] libjawt.so: cannot open shared object file: No such file or directory
[junit] java.lang.UnsatisfiedLinkError: libjawt.so: cannot open shared object file: No such file or directory
[junit]     at com.sun.jna.Native.getWindowHandle0(Native Method)
[junit]     at com.sun.jna.Native$AWT.getComponentID(Native.java:1813)
[junit]     at com.sun.jna.Native$AWT.getWindowID(Native.java:1789)
[junit]     at com.sun.jna.Native.getWindowPointer(Native.java:262)
[junit]     at com.sun.jna.LibraryLoadTest$AWT.loadJAWT(LibraryLoadTest.java:169)
[junit]     at com.sun.jna.LibraryLoadTest.testLoadJAWT(LibraryLoadTest.java:42)
[junit] 

I will try to attach the crash log.

@bhamail
Copy link
Contributor Author

bhamail commented Nov 29, 2012

Here's a gist with the full crash log:

https://gist.github.com/4166797

@bhamail
Copy link
Contributor Author

bhamail commented Nov 29, 2012

More info: I re-ran: ant test, and got the same errors/failures as above.

I then ran: ant clean dist test (same as the very first run), and the build succeeded, HOWEVER, I realized it lied: no unit tests were actually run:

-setup:

compile:

javah:

-native-api-check:

:rsrc:

rsrc:

native:
[exec] make: Nothing to be done for `all'.

🫙

jar:

compile-tests:
[jar] Building jar: /home/dan/javadev/jna/build-d64/jws/jnidispatch.jar
[signjar] Signing JAR: /home/dan/javadev/jna/build-d64/jws/jnidispatch.jar to /home/dan/javadev/jna/build-d64/jws/jnidispatch.jar as jna

test:

BUILD SUCCESSFUL
Total time: 54 seconds

Notice how 'test:' shows no unit tests, then the build ends.
I realize not running the tests is likely an ant script problem, by just wanted to clarify that the 'success' of "ant clean dist test" I mentioned earlier is an illusion.

@twall
Copy link
Contributor

twall commented Nov 29, 2012

Good point.

The callback cleanup failures are a known issue on linux/64 (and sometimes on windows/64). The direct test crash is of more interest; I haven't seen it on my linux64 setup.

The callback cleanup failures aren't a serious worry; at worst you have old java Thread objects hanging around like before, or it's possible that the tests simply don't yet know how to trigger whatever it is within the VM that actually gets them GC'd. As far as I can tell the native threads are properly detached, making the Java Thread objects available for GC, even if that never actually happens within the tests. Note that these tests work for most other platforms.

On Nov 28, 2012, at 11:35 PM, Dan Rollo wrote:

More info: I re-ran: ant test, and got the same errors/failures as above.

I then ran: ant clean dist test (same as the very first run), and the build succeeded, HOWEVER, I realized it lied: no unit tests were actually run:

-setup:

compile:

javah:

-native-api-check:

:rsrc:

rsrc:

native:
[exec] make: Nothing to be done for `all'.

🫙

jar:

compile-tests:
[jar] Building jar: /home/dan/javadev/jna/build-d64/jws/jnidispatch.jar
[signjar] Signing JAR: /home/dan/javadev/jna/build-d64/jws/jnidispatch.jar to /home/dan/javadev/jna/build-d64/jws/jnidispatch.jar as jna

test:

BUILD SUCCESSFUL
Total time: 54 seconds

Notice how 'test:' shows no unit tests, then the build ends.
I realize not running the tests is likely an ant script problem, by just wanted to clarify that the 'success' of "ant clean dist test" I mentioned earlier is an illusion.


Reply to this email directly or view it on GitHub.

@twall
Copy link
Contributor

twall commented Jun 4, 2013

Callback failures have been addressed, please retest for other errors @bhamail

@twall
Copy link
Contributor

twall commented Aug 30, 2015

This should be resolved with the disposal consolidation performed in the Native class "finalizer" which calls Native.dispose().

@twall twall closed this as completed Aug 30, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants