Crash on Java 17 / MacOS 13.2.1 (x86_64)

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Crash on Java 17 / MacOS 13.2.1 (x86_64)

Peer Heijnen
I'm to create an offscreen image using the 2.4.0 release. This works on JDK 8 and 11, but now it crashes on Java 17 (build 17.0.7+8-LTS-224). Here is part of the VM crash data:
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGILL (0x4) at pc=0x00007ff809c719a7, pid=68243, tid=79875
#
# JRE version: Java(TM) SE Runtime Environment (17.0.7+8) (build 17.0.7+8-LTS-224)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (17.0.7+8-LTS-224, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, bsd-amd64)
# Problematic frame:
# C  [AppKit+0x36d9a7]  -[NSOpenGLContext setView:]+0xbd
#

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

Current thread (0x00007fe1a036dc00):  JavaThread "AWT-EventQueue-0" [_thread_in_native, id=79875, stack(0x0000700011191000,0x0000700011291000)]

Stack: [0x0000700011191000,0x0000700011291000],  sp=0x000070001128ef80,  free space=1015k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C  [AppKit+0x36d9a7]  -[NSOpenGLContext setView:]+0xbd
C  [libjogl_desktop.dylib+0x18124]  createContext+0x184
C  [libjogl_desktop.dylib+0x7f575]  Java_jogamp_opengl_macosx_cgl_CGL_createContext0__JJZJZLjava_lang_Object_2I+0x95
j  jogamp.opengl.macosx.cgl.CGL.createContext0(JJZJZLjava/lang/Object;I)J+0
j  jogamp.opengl.macosx.cgl.CGL.createContext(JJZJZLjava/nio/IntBuffer;)J+50
j  jogamp.opengl.macosx.cgl.MacOSXCGLContext$NSOpenGLImpl.create(JIII)J+1183
j  jogamp.opengl.macosx.cgl.MacOSXCGLContext.createContextARBImpl(JZIII)J+123
j  jogamp.opengl.GLContextImpl.createContextARBVersions(JZIIIII[I[I)J+205
j  jogamp.opengl.GLContextImpl.createContextARBMapVersionsAvailable(Lcom/jogamp/nativewindow/AbstractGraphicsDevice;IIZ)Z+286
j  jogamp.opengl.GLContextImpl.mapGLVersions(Lcom/jogamp/nativewindow/AbstractGraphicsDevice;)Z+712
j  jogamp.opengl.GLContextImpl.createContextARB(JZ)J+197
j  jogamp.opengl.macosx.cgl.MacOSXCGLContext.createImpl(J)Z+423
j  jogamp.opengl.GLContextImpl.makeCurrentWithinLock(I)I+364
j  jogamp.opengl.GLContextImpl.makeCurrent(Z)I+816
j  jogamp.opengl.GLContextImpl.makeCurrent()I+6
j  jogamp.opengl.macosx.cgl.MacOSXCGLDrawableFactory.getOrCreateSharedResourceImpl(Lcom/jogamp/nativewindow/AbstractGraphicsDevice;)Ljogamp/opengl/macosx/cgl/MacOSXCGLDrawableFactory$SharedResource;+314
j  jogamp.opengl.macosx.cgl.MacOSXCGLDrawableFactory.getOrCreateSharedResourceImpl(Lcom/jogamp/nativewindow/AbstractGraphicsDevice;)Ljogamp/opengl/SharedResourceRunner$Resource;+6
j  jogamp.opengl.GLDrawableFactoryImpl.getOrCreateSharedResource(Lcom/jogamp/nativewindow/AbstractGraphicsDevice;)Ljogamp/opengl/SharedResourceRunner$Resource;+22
j  jogamp.opengl.GLDrawableFactoryImpl.createSharedResourceImpl(Lcom/jogamp/nativewindow/AbstractGraphicsDevice;)Z+6
j  com.jogamp.opengl.GLDrawableFactory.createSharedResource(Lcom/jogamp/nativewindow/AbstractGraphicsDevice;)Z+6
j  com.jogamp.opengl.GLProfile.initProfilesForDeviceCritical(Lcom/jogamp/nativewindow/AbstractGraphicsDevice;)Z+380
j  com.jogamp.opengl.GLProfile.initProfilesForDevice(Lcom/jogamp/nativewindow/AbstractGraphicsDevice;)Z+58
j  com.jogamp.opengl.GLProfile.initProfilesForDefaultDevices()V+1278
j  com.jogamp.opengl.GLProfile.access$000()V+4
j  com.jogamp.opengl.GLProfile$1.run()Ljava/lang/Object;+107
J 18089 c1 java.security.AccessController.doPrivileged(Ljava/security/PrivilegedAction;)Ljava/lang/Object; java.base@17.0.7 (9 bytes) @ 0x000000011568601c [0x0000000115685fc0+0x000000000000005c]
j  com.jogamp.opengl.GLProfile.initSingleton()V+126
j  com.jogamp.opengl.GLProfile.getProfileMap(Lcom/jogamp/nativewindow/AbstractGraphicsDevice;Z)Ljava/util/HashMap;+4
j  com.jogamp.opengl.GLProfile.get(Lcom/jogamp/nativewindow/AbstractGraphicsDevice;Ljava/lang/String;)Lcom/jogamp/opengl/GLProfile;+50
j  com.jogamp.opengl.GLProfile.get(Ljava/lang/String;)Lcom/jogamp/opengl/GLProfile;+8
j  ab.j3d.awt.view.jogl.JOGLOffscreenView.(Lab/j3d/awt/view/jogl/JOGLEngine;Lab/j3d/model/Scene;Z)V+32
j  com.ivenza.web.app.IvenzaMobile.renderImage(Lab/j3d/model/Node3D;Lab/j3d/awt/view/TextureLibrary;IIZ)Ljava/awt/image/BufferedImage;+97
j  com.ivenza.web.app.IvenzaMobileService.lambda$getRenderedImage$9(Lcom/ivenza/web/app/IvenzaMobile;Lab/j3d/model/Node3D;Ljava/net/URL;II)Ljava/awt/image/BufferedImage;+19
j  com.ivenza.web.app.IvenzaMobileService$$Lambda$432+0x000000080116d1b8.call()Ljava/lang/Object;+20
j  com.numdata.oss.ui.SwingTools$1.run()V+12
j  java.awt.event.InvocationEvent.dispatch()V+11 java.desktop@17.0.7
j  java.awt.EventQueue.dispatchEventImpl(Ljava/awt/AWTEvent;Ljava/lang/Object;)V+21 java.desktop@17.0.7
j  java.awt.EventQueue$4.run()Ljava/lang/Void;+32 java.desktop@17.0.7
j  java.awt.EventQueue$4.run()Ljava/lang/Object;+1 java.desktop@17.0.7
J 18090 c1 java.security.AccessController.executePrivileged(Ljava/security/PrivilegedAction;Ljava/security/AccessControlContext;Ljava/lang/Class;)Ljava/lang/Object; java.base@17.0.7 (65 bytes) @ 0x0000000115685c2c [0x0000000115685bc0+0x000000000000006c]
j  java.security.AccessController.doPrivileged(Ljava/security/PrivilegedAction;Ljava/security/AccessControlContext;)Ljava/lang/Object;+13 java.base@17.0.7
j  java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Ljava/security/PrivilegedAction;Ljava/security/AccessControlContext;Ljava/security/AccessControlContext;)Ljava/lang/Object;+18 java.base@17.0.7
j  java.awt.EventQueue.dispatchEvent(Ljava/awt/AWTEvent;)V+46 java.desktop@17.0.7
j  java.awt.EventDispatchThread.pumpOneEventForFilters(I)V+78 java.desktop@17.0.7
j  java.awt.EventDispatchThread.pumpEventsForFilter(ILjava/awt/Conditional;Ljava/awt/EventFilter;)V+35 java.desktop@17.0.7
j  java.awt.EventDispatchThread.pumpEventsForHierarchy(ILjava/awt/Conditional;Ljava/awt/Component;)V+11 java.desktop@17.0.7
j  java.awt.EventDispatchThread.pumpEvents(ILjava/awt/Conditional;)V+4 java.desktop@17.0.7
j  java.awt.EventDispatchThread.pumpEvents(Ljava/awt/Conditional;)V+3 java.desktop@17.0.7
j  java.awt.EventDispatchThread.run()V+9 java.desktop@17.0.7

siginfo: si_signo: 4 (SIGILL), si_code: 1 (ILL_ILLOPC), si_addr: 0x00007ff809c719a7

Internal exceptions (20 events):
Event: 12.136 Thread 0x00007fe1411f9400 Exception  (0x000000078e9729c0) 
thrown [open/src/hotspot/share/interpreter/linkResolver.cpp, line 759]
Event: 12.143 Thread 0x00007fe1411f9400 Exception  (0x000000078e89c020) 
thrown [open/src/hotspot/share/interpreter/linkResolver.cpp, line 826]
Event: 12.254 Thread 0x00007fe1411f9400 Exception  (0x000000078505fb48) 
thrown [open/src/hotspot/share/interpreter/linkResolver.cpp, line 759]
Event: 12.745 Thread 0x00007fe1a7808a00 Implicit null exception at 0x000000011ce96e80 to 0x000000011ce97036
Event: 14.296 Thread 0x00007fe1411f9400 Exception  (0x0000000786cfe560) 
thrown [open/src/hotspot/share/interpreter/linkResolver.cpp, line 1433]
Event: 14.362 Thread 0x00007fe1411f9400 Implicit null exception at 0x000000011cc25ee0 to 0x000000011cc26164
Event: 14.366 Thread 0x00007fe1411f9400 Implicit null exception at 0x000000011cea8dd6 to 0x000000011cea904c
Event: 15.114 Thread 0x00007fe1a7808a00 Implicit null exception at 0x000000011cbcf454 to 0x000000011cbd0a54
Event: 15.323 Thread 0x00007fe1a7808a00 Implicit null exception at 0x000000011ccb4ba0 to 0x000000011ccb6a78
Event: 17.334 Thread 0x00007fe1a7808a00 Implicit null exception at 0x000000011cd3d3cc to 0x000000011cd3d44c
Event: 17.887 Thread 0x00007fe1a7808a00 Exception  (0x0000000792e4caf0) 
thrown [open/src/hotspot/share/interpreter/linkResolver.cpp, line 759]
Event: 18.454 Thread 0x00007fe1411f9400 Exception  (0x00000007871c00a8) 
thrown [open/src/hotspot/share/interpreter/linkResolver.cpp, line 759]
Event: 18.981 Thread 0x00007fe1a7808a00 Exception  (0x0000000787e70e88) 
thrown [open/src/hotspot/share/interpreter/linkResolver.cpp, line 759]
Event: 18.981 Thread 0x00007fe1a7808a00 Exception  (0x0000000787e74c40) 
thrown [open/src/hotspot/share/interpreter/linkResolver.cpp, line 759]
Event: 18.982 Thread 0x00007fe1a7808a00 Exception  (0x0000000787e78618) 
thrown [open/src/hotspot/share/interpreter/linkResolver.cpp, line 759]
Event: 19.507 Thread 0x00007fe1372f6a00 Exception  (0x0000000787e68ca0) 
thrown [open/src/hotspot/share/interpreter/linkResolver.cpp, line 759]
Event: 19.507 Thread 0x00007fe1372f6a00 Exception  (0x0000000787e70438) 
thrown [open/src/hotspot/share/interpreter/linkResolver.cpp, line 759]
Event: 19.507 Thread 0x00007fe1372f6a00 Exception  (0x0000000787e77ed0) 
thrown [open/src/hotspot/share/interpreter/linkResolver.cpp, line 759]
Event: 19.515 Thread 0x00007fe1372f6a00 Exception  (0x0000000787d8ee80) 
thrown [open/src/hotspot/share/classfile/systemDictionary.cpp, line 256]
Event: 19.762 Thread 0x00007fe1a036dc00 Exception  (0x0000000786a76e78) 
thrown [open/src/hotspot/share/prims/nativeLookup.cpp, line 543]

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

OS:
uname: Darwin 22.3.0 Darwin Kernel Version 22.3.0: Mon Jan 30 20:42:11 PST 2023; root:xnu-8792.81.3~2/RELEASE_X86_64 x86_64
OS uptime: 6 days 11:00 hours
rlimit (soft/hard): STACK 8192k/65532k , CORE 0k/infinity , NPROC 5568/8352 , NOFILE 10240/infinity , AS infinity/infinity , CPU infinity/infinity , DATA infinity/infinity , FSIZE infinity/infinity , MEMLOCK infinity/infinity , RSS infinity/infinity
load average: 3.78 2.72 2.80

CPU: total 16 (initial active 16) (8 cores per cpu, 2 threads per core) family 6 model 158 stepping 13 microcode 0xf4, cx8, cmov, fxsr, ht, mmx, 3dnowpref, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt, lzcnt, tsc, tscinvbit, avx, avx2, aes, erms, clmul, bmi1, bmi2, adx, fma, vzeroupper, clflush, clflushopt

Memory: 4k page, physical 33554432k(67824k free), swap 4194304k(1446656k free)

vm_info: Java HotSpot(TM) 64-Bit Server VM (17.0.7+8-LTS-224) for bsd-amd64 JRE (17.0.7+8-LTS-224), built on Feb 28 2023 23:06:28 by "mach5one" with clang Apple LLVM 12.0.0 (clang-1200.0.32.29)

END.

I'm sorry to say that our software is closed-source, so I can not share all source code. You can see an old video of a cabinet configurator built using our software on YouTube.

I hope someone has some suggestions on how to diagnose or even solve this.

Your help is greatly appreciated.

Regards.

Peer

Reply | Threaded
Open this post in threaded view
|

Re: Crash on Java 17 / MacOS 13.2.1 (x86_64)

Sven Gothel
Administrator
SIGILL on .. hmm.
C  [AppKit+0x36d9a7]  -[NSOpenGLContext setView:]+0xbd
- MacOS: You 13.2.1, my max is 13.1 arm64
  - (what is your architecture?)

OK: Java 8, 11
Crash: you Java 17 (build 17.0.7+8-LTS-224),

Max tested is OpenJDK Temurin 17.0.5+8 (to myself: earmark for upping it).
See https://jogamp.org/cgit/gluegen.git/tree/doc/JogAmpMacOSVersions.md

Please attach JogAmp runtime version log
<https://jogamp.org/wiki/index.php?title=Jogamp_Versioning_and_Releases#Runtime_Version_Check>

Please also test with
- https://jogamp.org/deployment/archive/rc/v2.5.0-rc-20230507/
  - Maven 2.5.0-rc-20230507 @ http://www.jogamp.org/deployment/maven/

- Maybe also OpenJDK Temurin 17.0.5+8, to exclude this delta as the root cause

Reply | Threaded
Open this post in threaded view
|

Re: Crash on Java 17 / MacOS 13.2.1 (x86_64)

Sven Gothel
Administrator
Latest 'Temurin' is 17.0.7+7 for all platforms (?!)
<https://adoptium.net/temurin/releases/>

Hence attaching the JogAmp version log as mentioned is
always a good start ..
Here: Which 'Java' version are you using in detail and which architecture.
Reply | Threaded
Open this post in threaded view
|

Re: Crash on Java 17 / MacOS 13.2.1 (x86_64)

Peer Heijnen
Hey Sven,

Thanks so much. That version log solved the mystery!

Apparently I had a cached 2.4.0 RC still cached in Maven (2.4-b936-20200202), which caused the issue.

So, I can now confirm both 2.4-b952-20230201 and 2.5-b1522-20230507 work fine now on MacOs 13.2.1 X86_64 using JDK 17.0.7. I also tested 17.0.5 and all results are consistent as far as I can see.

Thanks again and keep up the good work.

Regards,
Peer

2.5-b1522-20230507 Log file
2.4-b952-20230201 Log file
2.4-b936-20200202 Log file (crashed)
Reply | Threaded
Open this post in threaded view
|

Re: Crash on Java 17 / MacOS 13.2.1 (x86_64)

Sven Gothel
Administrator
Great to read that our build-in version info is capable to resolve these 'cache mix-up' cases as well.

I glanced over your 'earlier' application video and I like it.
Please send me an email if we can add it to our JOGL showcase page.
<https://lundia.nl/>
<https://www.youtube.com/watch?v=xFam4U-UhSw>

If your company or another party/company is well funded w/ a budget (I know),
please don't hesitate to consider funding my work and/or
contracting for JogAmp or anything else.
<https://jogamp.org/wiki/index.php/Maintainer_and_Contacts#Commercial_Support>
Thank you.