jeromq
jeromq copied to clipboard
Exceptions when reading using socket.recv()
Our application reading messages from a C++ application using zmq/cppzmq (version 4.2.2).
It is reading approx 10-80 messages per second, and after a couple of days of running will get this exception multiple times before exiting with the fatal error pasted below.
I have seen other types than HeapByteBuffer, but it is mostly this class in the exception.
The application is using jeromq version 0.5.2, and I have tried both OpenJDK 11.0.11+8 and 11.0.13+8 (provided by Ubuntu 20.04)
Please let me know if you need more information.
java.lang.ArrayStoreException: arraycopy: source type java.nio.HeapByteBuffer is not an array
at java.base/java.lang.System.arraycopy(Native Method)
at java.base/java.util.Arrays.copyOfRange(Arrays.java:4031)
at zmq.Msg.data(Msg.java:234)
at org.zeromq.ZMQ$Socket.recv(ZMQ.java:3374)
at io.autopay.gui.infrastructure.Zeromq.next(Zeromq.kt:57)
at io.autopay.gui.controllers.CameraController.nextAnprEvent(CameraController.kt:83)
at io.autopay.gui.controllers.CameraController.receiveAnprEvent(CameraController.kt:66)
at io.autopay.gui.controllers.CameraController.receiveEvents(CameraController.kt:56)
at java.base/java.lang.Thread.run(Thread.java:829)
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007f442c870e6e, pid=15944, tid=16220
#
# JRE version: OpenJDK Runtime Environment (11.0.13+8) (build 11.0.13+8-Ubuntu-0ubuntu1.20.04)
# Java VM: OpenJDK 64-Bit Server VM (11.0.13+8-Ubuntu-0ubuntu1.20.04, mixed mode, sharing, tiered, compressed oops, g1 gc, linux-amd64)
# Problematic frame:
# j sun.nio.ch.Util.free(Ljava/nio/ByteBuffer;)V+0 [email protected]
#
# Core dump will be written. Default location: Core dumps may be processed with "/usr/share/apport/apport %p %s %c %d %P %E" (or dumping to /home/autop
ay/core.15944)
#
# An error report file with more information is saved as:
# /home/autopay/hs_err_pid15944.log
Could not load hsdis-amd64.so; library not loadable; PrintAssembly is disabled
#
# If you would like to submit a bug report, please visit:
# https://bugs.launchpad.net/ubuntu/+source/openjdk-lts
#
Did you try 0.5.3-SNAPSHOT ?
I will upgrade and try this on one server. It might take a while for the application to crash again. We dont have this problems on our servers running Java 8 and jeromq 0.4.3. We got a similar problem when running 0.4.3 on Java 11, and the errors above when upgrading to 0.5.3.