Community
Participate
Working Groups
We are looking into JNI problems in our product, using -Xcheck:jni during tests. I'm trying to reproduce some of the reported problems with a recent Eclipse, but I run into a crash at start-up. The JDK output is: Warning: SIGPIPE handler expected:libjvm.so+0xc14d00 found:0x0000000000000001 Signal Handlers: SIGSEGV: [libjvm.so+0xc14d00], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO SIGBUS: [libjvm.so+0xc14d00], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO SIGFPE: [libjvm.so+0xc14d00], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO SIGPIPE: SIG_IGN, sa_mask[0]=00000000000010000000000000000000, sa_flags=SA_RESTART SIGXFSZ: [libjvm.so+0xc14d00], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO SIGILL: [libjvm.so+0xc14d00], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO SIGUSR2: [libjvm.so+0xc14b80], sa_mask[0]=00000000000000000000000000000000, sa_flags=SA_RESTART|SA_SIGINFO SIGHUP: [libjvm.so+0xc14f00], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO SIGINT: [libjvm.so+0xc14f00], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO SIGTERM: [libjvm.so+0xc14f00], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO SIGQUIT: [libjvm.so+0xc14f00], sa_mask[0]=11111111011111111101111111111110, sa_flags=SA_RESTART|SA_SIGINFO ReleasePrimitiveArrayCritical: release array failed bounds check, incorrect pointer returned ? array: 0x00007ffff7fcb960 carray: 0x00007ffff0907650 GuardedMemory(0x00007ffff7fcb7c0) base_addr=0x00007ffff0907630 tag=0x00007ffff093b000 user_size=1 user_data=0x00007ffff0907650 Header guard @0x00007ffff0907630 is OK Trailer guard @0x00007ffff0907651 is BROKEN User data appears to be in use FATAL ERROR in native method: ReleasePrimitiveArrayCritical: failed bounds check at org.eclipse.swt.internal.gtk.OS.g_object_get(Native Method) at org.eclipse.swt.widgets.Display.initializeSystemSettings(Display.java:3766) at org.eclipse.swt.widgets.Display.init(Display.java:3420) at org.eclipse.swt.graphics.Device.<init>(Device.java:167) - locked <0x000000061e8d9640> (a java.lang.Class for org.eclipse.swt.graphics.Device) at org.eclipse.swt.widgets.Display.<init>(Display.java:635) at org.eclipse.swt.widgets.Display.<init>(Display.java:626) at org.eclipse.ui.internal.Workbench.createDisplay(Workbench.java:742) at org.eclipse.ui.PlatformUI.createDisplay(PlatformUI.java:168) at org.eclipse.ui.internal.ide.application.IDEApplication.createDisplay(IDEApplication.java:182) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:125) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:401) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(java.base@11.0.8/Native Method) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(java.base@11.0.8/NativeMethodAccessorImpl.java:62) at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(java.base@11.0.8/DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(java.base@11.0.8/Method.java:566) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) at org.eclipse.equinox.launcher.Main.run(Main.java:1461) at org.eclipse.equinox.launcher.Main.main(Main.java:1434) I see this with: Eclipse SDK Version: 2020-12 (4.18) Build id: I20201026-1850 To reproduce, add -Xcheck:jni to the eclipse.ini file and run eclipse from the command line (to see the JDK output).
My full eclipse.ini contents, in case that makes a difference: -startup plugins/org.eclipse.equinox.launcher_1.6.0.v20200915-1508.jar --launcher.library plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.2.0.v20200915-1442 --launcher.defaultAction openFile --launcher.appendVmargs -vm /usr/lib/jvm/java-11/bin/java -vmargs -Dosgi.requiredJavaVersion=11 -Dosgi.dataAreaRequiresExplicitInit=true -Xms512m -Xmx8196m -Xcheck:jni -Dorg.eclipse.swt.internal.gtk.noThemingFixes --add-modules=ALL-SYSTEM
Simeon, the bug 568251 *is* the reason we've started to look into JNI issues :-) Just update your SDK. *** This bug has been marked as a duplicate of bug 568251 ***
Please CC me to any other issues discovered with '-Xcheck:jni', I would be interested. Thanks!