[OH3] Issue on sun/security/ssl/KeyUpdate after Java Exception

  • Platform information:
    • OS: Debian Bullseye
    • Java Runtime Environment:
      openjdk version “11.0.13” 2021-10-19 LTS
      OpenJDK Runtime Environment Zulu11.52+13-CA (build 11.0.13+8-LTS)
      OpenJDK 64-Bit Server VM Zulu11.52+13-CA (build 11.0.13+8-LTS, mixed mode)
    • openHAB version: 3.2.0
  • Issue of the topic:

For whatever reason I receive the followign error message, which makes it not possible to use openHAB in the moment.

2022-01-04 08:56:35.464 [ERROR] [hab.core.audio.internal.AudioServlet] - bundle org.openhab.core.audio:3.2.0 (154)[org.openhab.core.audio.internal.AudioServlet(61)] : The activate method has thrown an exception
java.lang.ClassFormatError: Incompatible magic value 3405688510 in class file sun/security/ssl/KeyUpdate$KeyUpdateKickstartProducer

It all started with a failed JSON request yesterday,

2022-01-04 08:56:35.464 [ERROR] [hab.core.audio.internal.AudioServlet] - bundle org.openhab.core.audio:3.2.0 (154)[org.openhab.core.audio.internal.AudioServlet(61)] : The activate method has thrown an exception
java.lang.ClassFormatError: Incompatible magic value 3405688510 in class file sun/security/ssl/KeyUpdate$KeyUpdateKickstartProducer

Apparently, the system restartet, and started to throw this exception:


022-01-03 22:27:46.997 [INFO ] [.core.internal.i18n.I18nProviderImpl] - Locale set to 'de_DE'.
2022-01-03 22:27:50.562 [ERROR] [hab.core.audio.internal.AudioServlet] - bundle org.openhab.core.audio:3.2.0 (154)[org.openhab.core.audio.internal.AudioServlet(61)] : The activate method has thrown an exception
java.lang.ClassFormatError: Incompatible magic value 3405688510 in class file sun/security/ssl/KeyUpdate$KeyUpdateKickstartProducer

I reviewed the syslog and found the follwoing:


Jan  3 22:27:29 zotac karaf[1208]: #
Jan  3 22:27:29 zotac karaf[1208]: # A fatal error has been detected by the Java Runtime Environment:
Jan  3 22:27:29 zotac karaf[1208]: #
Jan  3 22:27:29 zotac karaf[1208]: #  SIGSEGV (0xb) at pc=0x00007f1a0c0eb794, pid=1208, tid=1927
Jan  3 22:27:29 zotac karaf[1208]: #
Jan  3 22:27:29 zotac karaf[1208]: # JRE version: OpenJDK Runtime Environment Zulu11.52+13-CA (11.0.13+8) (build 11.0.13+8-LTS)
Jan  3 22:27:29 zotac karaf[1208]: # Java VM: OpenJDK 64-Bit Server VM Zulu11.52+13-CA (11.0.13+8-LTS, mixed mode, tiered, compressed oops, g1 gc, linux-amd64)
Jan  3 22:27:29 zotac karaf[1208]: # Problematic frame:
Jan  3 22:27:29 zotac karaf[1208]: # V  [libjvm.so+0x855794]  InstanceKlass::find_method_index(Array<Method*> const*, Symbol const*, Symbol const*, Klass::OverpassLookupMode, Klass::StaticLookupMode, Klass::PrivateLookupMode) [clone .constprop.332]+0x44
Jan  3 22:27:29 zotac karaf[1208]: #
Jan  3 22:27:29 zotac karaf[1208]: # No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
Jan  3 22:27:29 zotac karaf[1208]: #
Jan  3 22:27:29 zotac karaf[1208]: # An error report file with more information is saved as:
Jan  3 22:27:29 zotac karaf[1208]: # /var/lib/openhab/hs_err_pid1208.log
Jan  3 22:27:29 zotac karaf[1208]: [thread 2452 also had an error]
Jan  3 22:27:29 zotac karaf[1208]: [error occurred during error reporting (), id 0xb, SIGSEGV (0xb) at pc=0x00007f1a0c65ff52]
Jan  3 22:27:29 zotac karaf[1208]: #
Jan  3 22:27:29 zotac karaf[1208]: # If you would like to submit a bug report, please visit:
Jan  3 22:27:29 zotac karaf[1208]: #   http://www.azul.com/support/
Jan  3 22:27:29 zotac karaf[1208]: #
Jan  3 22:27:29 zotac systemd[1]: openhab.service: Main process exited, code=killed, status=6/ABRT
Jan  3 22:27:29 zotac systemd[1]: openhab.service: Failed with result 'signal'.
Jan  3 22:27:29 zotac systemd[1]: openhab.service: Consumed 13min 47.916s CPU time.
Jan  3 22:27:34 zotac systemd[1]: openhab.service: Scheduled restart job, restart counter is at 1.
Jan  3 22:27:34 zotac systemd[1]: Stopped openHAB - empowering the smart home.
Jan  3 22:27:34 zotac systemd[1]: openhab.service: Consumed 13min 47.916s CPU time.
Jan  3 22:27:34 zotac systemd[1]: Started openHAB - empowering the smart home.

A proper restart of the openhab service wasn’t possible. The server required a full reboot.
Anyone any idea?

Does the logfile

provide more information ?

Double check java versions. Seems that one of components you use (ie. unlimited security) belongs to higher version than JVM you installed.

Information from the

/var/lib/openhab/hs_err_pid1208.log

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007f1a0c0eb794, pid=1208, tid=1927
#
# JRE version: OpenJDK Runtime Environment Zulu11.52+13-CA (11.0.13+8) (build 11.0.13+8-LTS)
# Java VM: OpenJDK 64-Bit Server VM Zulu11.52+13-CA (11.0.13+8-LTS, mixed mode, tiered, compressed oops, g1 gc, linux-amd64)
# Problematic frame:
# V  [libjvm.so+0x855794]  InstanceKlass::find_method_index(Array<Method*> const*, Symbol const*, Symbol const*, Klass::OverpassLookupMode, Klass::StaticLookupMode, Klass::PrivateLookupMode) [clone .constprop.332]+0x44
#
# 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:
#   http://www.azul.com/support/
#

---------------  S U M M A R Y ------------

Command Line: -XX:-UsePerfData -Dopenhab.home=/usr/share/openhab -Dopenhab.conf=/etc/openhab -Dopenhab.runtime=/usr/share/openhab/runtime -Dopenhab.userdata=/var/lib/openhab -Dopenhab.logdir=/var/log/openhab -Dfelix.cm.dir=/var/lib/openhab/config -Djava.library.path=/var/lib/openhab/tmp/lib -Djetty.host=0.0.0.0 -Djetty.http.compliance=RFC2616 -Dnashorn.args=--no-deprecation-warning -Dorg.apache.cxf.osgi.http.transport.disable=true -Dorg.ops4j.pax.web.listening.addresses=0.0.0.0 -Dorg.osgi.service.http.port=8080 -Dorg.osgi.service.http.port.secure=8443 -Djava.awt.headless=true -Dfile.encoding=UTF-8 -XX:+UseG1GC -Xms3G -Xmx5G --add-reads=java.xml=java.logging --add-exports=java.base/org.apache.karaf.specs.locator=java.xml,ALL-UNNAMED --patch-module=java.base=/usr/share/openhab/runtime/lib/endorsed/org.apache.karaf.specs.locator-4.3.4.jar --patch-module=java.xml=/usr/share/openhab/runtime/lib/endorsed/org.apache.karaf.specs.java.xml-4.3.4.jar --add-opens=java.base/java.security=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.naming/javax.naming.spi=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport.tcp=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.text=ALL-UNNAMED --add-opens=java.base/java.time=ALL-UNNAMED --add-opens=java.desktop/java.awt.font=ALL-UNNAMED --add-exports=java.base/sun.net.www.protocol.file=ALL-UNNAMED --add-exports=java.base/sun.net.www.protocol.ftp=ALL-UNNAMED --add-exports=java.base/sun.net.www.protocol.http=ALL-UNNAMED --add-exports=java.base/sun.net.www.protocol.https=ALL-UNNAMED --add-exports=java.base/sun.net.www.protocol.jar=ALL-UNNAMED --add-exports=java.base/sun.net.www.content.text=ALL-UNNAMED --add-exports=jdk.xml.dom/org.w3c.dom.html=ALL-UNNAMED --add-exports=jdk.naming.rmi/com.sun.jndi.url.rmi=ALL-UNNAMED --add-exports=java.rmi/sun.rmi.registry=ALL-UNNAMED --add-exports=java.security.sasl/com.sun.security.sasl=ALL-UNNAMED -Dkaraf.instances=/var/lib/openhab/tmp/instances -Dkaraf.home=/usr/share/openhab/runtime -Dkaraf.base=/var/lib/openhab -Dkaraf.data=/var/lib/openhab -Dkaraf.etc=/var/lib/openhab/etc -Dkaraf.log=/var/log/openhab -Dkaraf.restart.jvm.supported=true -Djava.io.tmpdir=/var/lib/openhab/tmp -Djava.util.logging.config.file=/var/lib/openhab/etc/java.util.logging.properties -Dkaraf.startLocalConsole=false -Dkaraf.startRemoteShell=true org.apache.karaf.main.Main

Host: Intel(R) Celeron(R) CPU N3450 @ 1.10GHz, 4 cores, 7G, Debian GNU/Linux 11 (bullseye)
Time: Mon Jan  3 22:27:29 2022 CET elapsed time: 28279.243979 seconds (0d 7h 51m 19s)

And I attached the full file.

hs_err_pid1208.log (316.1 KB)

Checked the Java version and it is 11.0.13 from the Zulu package.
But to ensure that only this one is used, I deinstalled the old Java 8 version from Zulu.
It should not have been pulled anyway, since all java -version queries returned with the 11.0.13 from Zulu.