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

Fatal error when using alpine image #144

Open
dmartinpro opened this issue Dec 22, 2017 · 6 comments

Comments

@dmartinpro
Copy link

commented Dec 22, 2017

I've got an error when using alpine image. Everything is ok with Debian.
Here are the information:
Several hs_err_pid files created.
In openhab log file, here what I can find:

java.lang.UnsatisfiedLinkError: Unable to load library 'udev': Native library (linux-x86-64/libudev.so) not found in resource path (/openhab/runtime/lib/boot/org.apache.karaf.diagnostic.boot-4.1.3.jar:/openhab/runtime/lib/boot/org.apache.karaf.jaas.boot-4.1.3.jar:/openhab/runtime/lib/boot/org.apache.karaf.main-4.1.3.jar:/openhab/runtime/lib/boot/org.osgi.core-6.0.0.jar)

Note: I'm using systeminfo binding.

@wborn

This comment has been minimized.

Copy link
Member

commented Dec 23, 2017

The missing library seems to be part of the eudev package (see package contents). You can test if it works properly by installing it via: apk install eudev

@dmartinpro

This comment has been minimized.

Copy link
Author

commented Dec 23, 2017

Hi. Tested this, using apk add eudev in an Alpine container pointing to an empty folder (I mean addons, conf and userdata were all empty). Then, stopping the container, restoring my data in openhab, starting and it's still crashing:

A fatal error has been detected by the Java Runtime Environment
[...]
The crash happened outside the Java Virtual Machine in native code.

Nothing useful in openhab.log this time.

The first lines of the stack are:

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j  gnu.io.RXTXCommDriver.testRead(Ljava/lang/String;I)Z+0
j  gnu.io.RXTXCommDriver.registerValidPorts([Ljava/lang/String;[Ljava/lang/String;I)V+202
j  gnu.io.RXTXCommDriver.registerScannedPorts(I)V+1466
j  gnu.io.RXTXCommDriver.initialize()V+35
j  gnu.io.CommPortIdentifier.getPortIdentifiers()Ljava/util/Enumeration;+53

Internal execptions logged are:

Internal exceptions (10 events):
Event: 28.126 Thread 0x000055ed42181000 Exception <a 'sun/nio/fs/UnixException'> (0x00000000db488208) thrown at [/home/buildozer/aports/community/openjdk8/src/icedtea-3.4.0/openjdk/hotspot/src/share/vm/prims/jni.cpp, line 709]
Event: 28.126 Thread 0x000055ed42181000 Exception <a 'sun/nio/fs/UnixException'> (0x00000000db48a0a8) thrown at [/home/buildozer/aports/community/openjdk8/src/icedtea-3.4.0/openjdk/hotspot/src/share/vm/prims/jni.cpp, line 709]
Event: 28.132 Thread 0x000055ed42181000 Exception <a 'sun/nio/fs/UnixException'> (0x00000000db48bf30) thrown at [/home/buildozer/aports/community/openjdk8/src/icedtea-3.4.0/openjdk/hotspot/src/share/vm/prims/jni.cpp, line 709]
Event: 28.156 Thread 0x000055ed42181000 Exception <a 'java/lang/UnsatisfiedLinkError': Error loading shared library libudev.so: No such file or directory> (0x00000000db33deb8) thrown at [/home/buildozer/aports/community/openjdk8/src/icedtea-3.4.0/openjdk/hotspot/src/share/vm/prims/jni.cpp, line
Event: 28.157 Thread 0x000055ed42181000 Exception <a 'java/lang/UnsatisfiedLinkError': Error loading shared library libudev.so: No such file or directory> (0x00000000db33e840) thrown at [/home/buildozer/aports/community/openjdk8/src/icedtea-3.4.0/openjdk/hotspot/src/share/vm/prims/jni.cpp, line
Event: 28.454 Thread 0x000055ed3cea5000 Exception <a 'java/util/zip/ZipException'> (0x00000000da487168) thrown at [/home/buildozer/aports/community/openjdk8/src/icedtea-3.4.0/openjdk/hotspot/src/share/vm/prims/jni.cpp, line 709]
Event: 28.455 Thread 0x000055ed3cf1e000 Exception <a 'java/util/zip/ZipException'> (0x00000000da488238) thrown at [/home/buildozer/aports/community/openjdk8/src/icedtea-3.4.0/openjdk/hotspot/src/share/vm/prims/jni.cpp, line 709]
Event: 29.462 Thread 0x000055ed3cf1e000 Exception <a 'java/util/zip/ZipException'> (0x00000000d6118340) thrown at [/home/buildozer/aports/community/openjdk8/src/icedtea-3.4.0/openjdk/hotspot/src/share/vm/prims/jni.cpp, line 709]
Event: 29.464 Thread 0x000055ed3cea5000 Exception <a 'java/util/zip/ZipException'> (0x00000000d6127e50) thrown at [/home/buildozer/aports/community/openjdk8/src/icedtea-3.4.0/openjdk/hotspot/src/share/vm/prims/jni.cpp, line 709]
Event: 30.077 Thread 0x000055ed3cd79800 Exception <a 'java/io/FileNotFoundException'> (0x00000000dd490848) thrown at [/home/buildozer/aports/community/openjdk8/src/icedtea-3.4.0/openjdk/hotspot/src/share/vm/prims/jni.cpp, line 709]

So I tried to fix creating a symlink to libudev.so pointing to libudev.so.1, but it's still crashing:

Internal exceptions (10 events):
Event: 25.889 Thread 0x000056110fac5000 Implicit null exception at 0x00007f44bd4f229b to 0x00007f44bd4f44fd
Event: 26.133 Thread 0x000056111077f800 Exception <a 'java/util/zip/ZipException'> (0x00000000dca821d8) thrown at [/home/buildozer/aports/community/openjdk8/src/icedtea-3.4.0/openjdk/hotspot/src/share/vm/prims/jni.cpp, line 709]
Event: 27.137 Thread 0x000056111077f800 Exception <a 'java/util/zip/ZipException'> (0x00000000d80a3d10) thrown at [/home/buildozer/aports/community/openjdk8/src/icedtea-3.4.0/openjdk/hotspot/src/share/vm/prims/jni.cpp, line 709]
Event: 27.514 Thread 0x00005611100fc800 Implicit null exception at 0x00007f44bd79d756 to 0x00007f44bd7a4035
Event: 27.581 Thread 0x000056111175c800 Implicit null exception at 0x00007f44bc2f6a34 to 0x00007f44bc2f6be1
Event: 27.794 Thread 0x0000561110ebd000 Exception <a 'java/lang/NoClassDefFoundError': org/ops4j/pax/web/jsp/JspServletWrapper> (0x00000000d56c9a10) thrown at [/home/buildozer/aports/community/openjdk8/src/icedtea-3.4.0/openjdk/hotspot/src/share/vm/oops/constantPool.cpp, line 235]
Event: 27.919 Thread 0x0000561110ebd000 Exception <a 'java/lang/NoClassDefFoundError': org/ops4j/pax/web/jsp/JspServletWrapper> (0x00000000d4ff3f50) thrown at [/home/buildozer/aports/community/openjdk8/src/icedtea-3.4.0/openjdk/hotspot/src/share/vm/oops/constantPool.cpp, line 235]
Event: 27.948 Thread 0x0000561110ebd000 Exception <a 'java/lang/NoClassDefFoundError': org/ops4j/pax/web/jsp/JspServletWrapper> (0x00000000d4ca3e90) thrown at [/home/buildozer/aports/community/openjdk8/src/icedtea-3.4.0/openjdk/hotspot/src/share/vm/oops/constantPool.cpp, line 235]
Event: 28.137 Thread 0x000056111077f800 Exception <a 'java/util/zip/ZipException'> (0x00000000d80a5038) thrown at [/home/buildozer/aports/community/openjdk8/src/icedtea-3.4.0/openjdk/hotspot/src/share/vm/prims/jni.cpp, line 709]
Event: 28.748 Thread 0x0000561110ebd000 Exception <a 'java/io/FileNotFoundException'> (0x00000000dc78e030) thrown at [/home/buildozer/aports/community/openjdk8/src/icedtea-3.4.0/openjdk/hotspot/src/share/vm/prims/jni.cpp, line 709]

Maybe the NoClassDefFound error is now what's causing this crash, don't you think?

@wborn

This comment has been minimized.

Copy link
Member

commented Dec 23, 2017

Most likely for serial communications (gnu.io.RXTXCommDriver.testRead(Ljava/lang/String;I)Z+0) the openHAB fork of nrjavaserial needs to be recompiled using musl so it can be used on Alpine.

@cniweb

This comment has been minimized.

Copy link
Member

commented Dec 28, 2017

Is not there a ready package for Alpine?

@cniweb cniweb added the alpine label Dec 28, 2017

@cniweb

This comment has been minimized.

Copy link
Member

commented Dec 28, 2017

Could it have anything to do with this?
OpenZWave/node-openzwave-shared#100

@cniweb

This comment has been minimized.

Copy link
Member

commented Jan 23, 2018

What can we do here?

@cniweb cniweb added the help wanted label Dec 6, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.