Java 11: Fatal error
See original GitHub issueDescribe the bug
Hi,
I have been using Batect for a few years now, and it has been very reliable and useful. However, I just upgraded to openjdk11 (from JDK 1.8), and I am getting a fatal error when I attempt to run batect:
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007fff203bd77b, pid=6659, tid=5891
#
# JRE version: OpenJDK Runtime Environment Homebrew (11.0.16) (build 11.0.16+0)
# Java VM: OpenJDK 64-Bit Server VM Homebrew (11.0.16+0, mixed mode, tiered, compressed oops, g1 gc, bsd-amd64)
# Problematic frame:
# C [CoreFoundation+0x2077b] CFArrayGetCount+0x6
#
# No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# If you would like to submit a bug report, please visit:
# https://github.com/Homebrew/homebrew-core/issues
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
--------------- S U M M A R Y ------------
Command Line: -Djava.net.useSystemProxies=true --add-opens=java.base/sun.nio.ch=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED /Users/me/.batect/cache/0.79.1/batect-0.79.1.jar db
Host: MacBookPro9,2 x86_64 2900 MHz, 4 cores, 16G, Darwin 20.5.0
Time: Mon Aug 8 14:47:32 2022 AEST elapsed time: 2.886300 seconds (0d 0h 0m 2s)
Environment Variables:
JAVA_HOME=/Library/Java/JavaVirtualMachines/openjdk-11.jdk/Contents/Home
--------------- T H R E A D ---------------
Current thread (0x00007fe06b00a800): JavaThread "main" [_thread_in_native, id=5891, stack(0x000070000e1bb000,0x000070000e2bb000)]
Stack: [0x000070000e1bb000,0x000070000e2bb000], sp=0x000070000e2b91d8, free space=1016k
Native frames: (J=compiled Java code, A=aot compiled Java code, j=interpreted, Vv=VM code, C=native code)
C [CoreFoundation+0x2077b] CFArrayGetCount+0x6
C [libosxsecurity.dylib+0x6a27] Java_apple_security_KeychainStore__1scanKeychain+0xb9
j apple.security.KeychainStore._scanKeychain()V+0 java.base@11.0.16
j apple.security.KeychainStore.engineLoad(Ljava/io/InputStream;[C)V+178 java.base@11.0.16
j java.security.KeyStore.load(Ljava/io/InputStream;[C)V+6 java.base@11.0.16
j com.charleskorn.okhttp.systemkeystore.ExtensionsKt.buildTrustManagerForKeyStoreType(Ljava/lang/String;)Ljavax/net/ssl/X509TrustManager;+8
j com.charleskorn.okhttp.systemkeystore.ExtensionsKt.buildMacTrustManager()Ljavax/net/ssl/X509TrustManager;+2
j com.charleskorn.okhttp.systemkeystore.ExtensionsKt.getOSTrustManagers()Ljava/util/List;+40
j com.charleskorn.okhttp.systemkeystore.ExtensionsKt.useOperatingSystemCertificateTrustStore(Lokhttp3/OkHttpClient$Builder;)Lokhttp3/OkHttpClient$Builder;+15
j batect.ioc.InjectionConfigurationKt$rootModule$1$1.invoke(Lorg/kodein/di/bindings/NoArgBindingDI;)Lokhttp3/OkHttpClient;+69
j batect.ioc.InjectionConfigurationKt$rootModule$1$1.invoke(Ljava/lang/Object;)Ljava/lang/Object;+5
j org.kodein.di.bindings.Singleton$getFactory$1$1$1.invoke()Ljava/lang/Object;+18
j org.kodein.di.bindings.SingletonReference.make(Lkotlin/jvm/functions/Function0;)Lorg/kodein/di/bindings/Reference;+7
j org.kodein.di.bindings.Singleton$getFactory$1$1.invoke()Lorg/kodein/di/bindings/Reference;+25
j org.kodein.di.bindings.Singleton$getFactory$1$1.invoke()Ljava/lang/Object;+1
j org.kodein.di.bindings.StandardScopeRegistry.getOrCreate(Ljava/lang/Object;ZLkotlin/jvm/functions/Function0;)Ljava/lang/Object;+249
j org.kodein.di.bindings.Singleton$getFactory$1.invoke(Lkotlin/Unit;)Ljava/lang/Object;+104
j org.kodein.di.bindings.Singleton$getFactory$1.invoke(Ljava/lang/Object;)Ljava/lang/Object;+5
j org.kodein.di.DIContainer$DefaultImpls$provider$$inlined$toProvider$1.invoke()Ljava/lang/Object;+12
j org.kodein.di.internal.DirectDIBaseImpl.Instance(Lorg/kodein/type/TypeToken;Ljava/lang/Object;)Ljava/lang/Object;+54
j batect.ioc.InjectionConfigurationKt$telemetryModule$1$1.invoke(Lorg/kodein/di/bindings/NoArgBindingDI;Lbatect/logging/Logger;)Lbatect/telemetry/AbacusClient;+63
j batect.ioc.InjectionConfigurationKt$telemetryModule$1$1.invoke(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;+9
j batect.ioc.InjectionConfigurationKt$telemetryModule$1$invoke$$inlined$singletonWithLogger$1.invoke(Lorg/kodein/di/bindings/NoArgBindingDI;)Ljava/lang/Object;+83
j batect.ioc.InjectionConfigurationKt$telemetryModule$1$invoke$$inlined$singletonWithLogger$1.invoke(Ljava/lang/Object;)Ljava/lang/Object;+5
j org.kodein.di.bindings.Singleton$getFactory$1$1$1.invoke()Ljava/lang/Object;+18
j org.kodein.di.bindings.SingletonReference.make(Lkotlin/jvm/functions/Function0;)Lorg/kodein/di/bindings/Reference;+7
j org.kodein.di.bindings.Singleton$getFactory$1$1.invoke()Lorg/kodein/di/bindings/Reference;+25
j org.kodein.di.bindings.Singleton$getFactory$1$1.invoke()Ljava/lang/Object;+1
j org.kodein.di.bindings.StandardScopeRegistry.getOrCreate(Ljava/lang/Object;ZLkotlin/jvm/functions/Function0;)Ljava/lang/Object;+249
j org.kodein.di.bindings.Singleton$getFactory$1.invoke(Lkotlin/Unit;)Ljava/lang/Object;+104
j org.kodein.di.bindings.Singleton$getFactory$1.invoke(Ljava/lang/Object;)Ljava/lang/Object;+5
j org.kodein.di.DIContainer$DefaultImpls$provider$$inlined$toProvider$1.invoke()Ljava/lang/Object;+12
j org.kodein.di.internal.DirectDIBaseImpl.Instance(Lorg/kodein/type/TypeToken;Ljava/lang/Object;)Ljava/lang/Object;+54
j batect.ioc.InjectionConfigurationKt$telemetryModule$1$7.invoke(Lorg/kodein/di/bindings/NoArgBindingDI;Lbatect/logging/Logger;)Lbatect/telemetry/TelemetryManager;+283
j batect.ioc.InjectionConfigurationKt$telemetryModule$1$7.invoke(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;+9
j batect.ioc.InjectionConfigurationKt$telemetryModule$1$invoke$$inlined$singletonWithLogger$5.invoke(Lorg/kodein/di/bindings/NoArgBindingDI;)Ljava/lang/Object;+83
j batect.ioc.InjectionConfigurationKt$telemetryModule$1$invoke$$inlined$singletonWithLogger$5.invoke(Ljava/lang/Object;)Ljava/lang/Object;+5
j org.kodein.di.bindings.Singleton$getFactory$1$1$1.invoke()Ljava/lang/Object;+18
j org.kodein.di.bindings.SingletonReference.make(Lkotlin/jvm/functions/Function0;)Lorg/kodein/di/bindings/Reference;+7
j org.kodein.di.bindings.Singleton$getFactory$1$1.invoke()Lorg/kodein/di/bindings/Reference;+25
j org.kodein.di.bindings.Singleton$getFactory$1$1.invoke()Ljava/lang/Object;+1
j org.kodein.di.bindings.StandardScopeRegistry.getOrCreate(Ljava/lang/Object;ZLkotlin/jvm/functions/Function0;)Ljava/lang/Object;+249
j org.kodein.di.bindings.Singleton$getFactory$1.invoke(Lkotlin/Unit;)Ljava/lang/Object;+104
j org.kodein.di.bindings.Singleton$getFactory$1.invoke(Ljava/lang/Object;)Ljava/lang/Object;+5
j org.kodein.di.DIContainer$DefaultImpls$provider$$inlined$toProvider$1.invoke()Ljava/lang/Object;+12
j org.kodein.di.internal.DirectDIBaseImpl.Instance(Lorg/kodein/type/TypeToken;Ljava/lang/Object;)Ljava/lang/Object;+54
j batect.Application.run(Lbatect/cli/CommandLineOptions;Ljava/lang/Iterable;)I+58
j batect.Application.run(Ljava/lang/Iterable;)I+52
j batect.ApplicationKt.main([Ljava/lang/String;)V+48
v ~StubRoutines::call_stub
V [libjvm.dylib+0x3c5455] _ZN9JavaCalls11call_helperEP9JavaValueRK12methodHandleP17JavaCallArgumentsP6Thread+0x257
V [libjvm.dylib+0x40b0c0] _ZL17jni_invoke_staticP7JNIEnv_P9JavaValueP8_jobject11JNICallTypeP10_jmethodIDP18JNI_ArgumentPusherP6Thread+0x115
V [libjvm.dylib+0x40de7f] jni_CallStaticVoidMethod+0x165
C [libjli.dylib+0x9e3d] JavaMain+0xaae
C [libjli.dylib+0xbffc] ThreadJavaMain+0x9
C [libsystem_pthread.dylib+0x68fc] _pthread_start+0xe0
C [libsystem_pthread.dylib+0x2443] thread_start+0xf
Internal exceptions (10 events):
Event: 0.604 Thread 0x00007fe06b00a800 Exception <a 'java/lang/NoSuchMethodError'{0x000000070f5a5848}: 'java.lang.Object java.lang.invoke.DirectMethodHandle$Holder.invokeStatic(java.lang.Object, int, java.lang.Object)'> (0x000000070f5a5848) thrown at [src/hotspot/share/interpreter/linkResolver.cpp, line 773]
Event: 0.629 Thread 0x00007fe06b00a800 Implicit null exception at 0x0000000120666ff4 to 0x00000001206674d4
Event: 0.762 Thread 0x00007fe06b00a800 Exception <a 'java/lang/NoSuchMethodError'{0x000000070f22c250}: 'int java.lang.invoke.DirectMethodHandle$Holder.invokeSpecialIFC(java.lang.Object, java.lang.Object, int)'> (0x000000070f22c250) thrown at [src/hotspot/share/interpreter/linkResolver.cpp, line 773]
Event: 0.855 Thread 0x00007fe06b00a800 Exception <a 'java/lang/UnsatisfiedLinkError'{0x000000070ff024b0}: dlopen(c, 9): image not found> (0x000000070ff024b0) thrown at [src/hotspot/share/prims/jni.cpp, line 638]
Event: 1.233 Thread 0x00007fe06b00a800 Exception <a 'java/lang/UnsatisfiedLinkError'{0x000000070f677020}: dlopen(libcrypt.so.1, 9): image not found> (0x000000070f677020) thrown at [src/hotspot/share/prims/jni.cpp, line 638]
Event: 1.235 Thread 0x00007fe06b00a800 Exception <a 'java/lang/UnsatisfiedLinkError'{0x000000070f6786e8}: dlopen(liblibcrypt.so.1.dylib, 9): image not found> (0x000000070f6786e8) thrown at [src/hotspot/share/prims/jni.cpp, line 638]
Event: 1.236 Thread 0x00007fe06b00a800 Exception <a 'java/lang/UnsatisfiedLinkError'{0x000000070f67c758}: dlopen(crypt, 9): image not found> (0x000000070f67c758) thrown at [src/hotspot/share/prims/jni.cpp, line 638]
Event: 1.237 Thread 0x00007fe06b00a800 Exception <a 'java/lang/UnsatisfiedLinkError'{0x000000070f67dd10}: dlopen(libcrypt.dylib, 9): image not found> (0x000000070f67dd10) thrown at [src/hotspot/share/prims/jni.cpp, line 638]
Event: 1.238 Thread 0x00007fe06b00a800 Exception <a 'java/lang/UnsatisfiedLinkError'{0x000000070f681998}: dlopen(c, 9): image not found> (0x000000070f681998) thrown at [src/hotspot/share/prims/jni.cpp, line 638]
Event: 1.257 Thread 0x00007fe06b00a800 Exception <a 'java/lang/UnsatisfiedLinkError'{0x000000070f6de550}: dlopen(c, 9): image not found> (0x000000070f6de550) thrown at [src/hotspot/share/prims/jni.cpp, line 638]
I am not sure if this is a bug in Batect, or if Batect does not support openjdk11, or it is a misconfiguration on my end.
My workaround is to run export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home
before running Batect.
Thanks for the great tool!
Reproduction repo
No response
Steps to reproduce
Point JAVA_HOME to OpenJDK11 and attempt to run ./batect --version
.
Expected behaviour
Version output.
Actual behaviour
Fatal error.
Version information
Batect version: 0.79.1
Built: 2022-04-24 05:04:00 +0000
Built from commit: a33d32f6303e3905e6fe57178dc4f4dadc3ab15d (commit date: 2022-04-24 14:28:58 +1000)
JVM version: Oracle Corporation Java HotSpot(TM) 64-Bit Server VM 1.8.0_131
OS version: Mac OS X 10.16 x86_64
Docker version: 20.10.12 (API version: 1.41, minimum supported API version: 1.12, commit: 459d0df, operating system: 'linux', experimental: false)
Git version: 2.35.1
For documentation and further information on Batect, visit https://github.com/batect/batect.
Any other information
No response
Issue Analytics
- State:
- Created a year ago
- Comments:5
Top Results From Across the Web
java - Fatal error compiling: release version 11 not supported
mvn need JAVA_HOME to be set. I faced the same issue and setting up JAVA_HOME to correct JDK did the trick.
Read more >Fatal Error Log - Oracle Help Center
The final information in the SYSTEM section of the error log is vm_info , which is a version string embedded in libjvm.so/jvm.dll ....
Read more >Maven error - invalid target release: 1.11 - Mkyong.com
Hey, I encountered the same issue while upgrading from 1.8 to 11. Please note, that you have to make sure that both JAVA_HOME...
Read more >JDK-8211698 Crash in C2 compiled code during ... - Bug ID
This 8211698 reported failure in JDK11b22 is triggered by JDK-8194740 fix changeset. (JDK-8194740 - UseSubwordForMaxVector causes performance regression) But ...
Read more >Debugging the "Fatal error compiling: invalid target release
When updating to Java 11 from an older version of the language, make sure that your development environment is up to date.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
OpenJDK 11 works fine with Gradle via Android Studio, so it’s working to some degree. It seems there is some incompatibility with my dylibs, which does not surprise me (my system being somewhat decrepit). I am more than happy to run batect with JDK 1.8 for the foreseeable future.
Bugger, I get the same error using OpenJDK v18.0.2.