Karaf: *** buffer overflow detected ***: terminated

I made a fresh install of openhabian where I used previous OH configuration (OH3.2.0).

OpenHAB does not start completely than restarted in a loop.

In the journal I get the following messages:

journalctl -b | grep karaf
Dez 27 12:50:38 kopf karaf[13878]: *** buffer overflow detected ***: terminated
Dez 27 12:52:04 kopf karaf[15094]: RXTX Warning:  Removing stale lock file. /var/lock/LCK..ttyUSB0
Dez 27 12:52:24 kopf karaf[15094]: RXTX Warning:  Removing stale lock file. /var/lock/LCK..ttyAMA0
Dez 27 12:52:24 kopf karaf[15094]: *** buffer overflow detected ***: terminated
Dez 27 12:53:45 kopf karaf[15912]: RXTX Warning:  Removing stale lock file. /var/lock/LCK..ttyUSB0
Dez 27 12:54:06 kopf karaf[15912]: RXTX Warning:  Removing stale lock file. /var/lock/LCK..ttyAMA0
Dez 27 12:54:06 kopf karaf[15912]: *** buffer overflow detected ***: terminated
Dez 27 12:55:27 kopf karaf[16713]: RXTX Warning:  Removing stale lock file. /var/lock/LCK..ttyUSB0

Which logging do we need to get closer to the root cause?

Would you please share some more information about your openHAB server
Hardware
OS
Java Version

Here it is:

Release = Debian GNU/Linux 11 (bullseye)
Kernel = Linux 5.10.63-v8+
Platform = Raspberry Pi 4 Model B Rev 1.2

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)

Could you please try and change your Java Version to Zulu 11 32-Bit.

Here is what our prerequisits say :

The 32-bit version of the JVM is recommended on ARM platforms such as the Raspberry Pi. The 32-bit JVM performs better on the ARM platform. Some add-ons use libraries that do not work with a 64-bit JVM on ARM.

Issues exist especially on usage of serial libraries, which seems to be your reason (Logs reports an RXTX issue)

I’ve switched to
openjdk version “11.0.13” 2021-10-19 LTS
OpenJDK Runtime Environment Zulu11.52+13-CA (build 11.0.13+8-LTS)
OpenJDK Client VM Zulu11.52+13-CA (build 11.0.13+8-LTS, mixed mode)

But I still get

Dez 27 16:17:12 kopf systemd[1]: Started openHAB instance, reachable at http://kopf:8080.
Dez 27 16:17:12 kopf systemd[1]: Started Frontail openHAB instance, reachable at http://kopf:9001.
Dez 27 16:18:08 kopf karaf[39105]: RXTX Warning:  Removing stale lock file. /var/lock/LCK..ttyAMA0
Dez 27 16:18:08 kopf karaf[39105]: *** buffer overflow detected ***: terminated
Dez 27 16:18:08 kopf systemd[1]: openhab.service: Main process exited, code=killed, status=6/ABRT
Dez 27 16:18:08 kopf systemd[1]: openhab.service: Failed with result 'signal'.
Dez 27 16:18:08 kopf systemd[1]: openhab.service: Consumed 1min 30.012s CPU time.
Dez 27 16:18:13 kopf systemd[1]: openhab.service: Scheduled restart job, restart counter is at 1.

NOTE:
it seems not as simple just to switch the java version as I get now some new faults:

2021-12-27 16:26:23.592 [ERROR] [core.thing.internal.ThingManagerImpl] - Exception occurred while initializing handler of thing 'systeminfo:computer:kopf': Unable to load library 'udev':

libudev.so: Kann die Shared-Object-Datei nicht öffnen: Datei oder Verzeichnis nicht gefunden

libudev.so: Kann die Shared-Object-Datei nicht öffnen: Datei oder Verzeichnis nicht gefunden

/lib/aarch64-linux-gnu/libudev.so.1.7.0: falsche ELF-Klasse: ELFCLASS64

Native library (linux-arm/libudev.so) not found in resource path (/usr/share/openhab/runtime/lib/boot/org.apache.karaf.diagnostic.boot-4.3.4.jar:/usr/share/openhab/runtime/lib/boot/org.apache.karaf.jaas.boot-4.3.4.jar:/usr/share/openhab/runtime/lib/boot/org.apache.karaf.main-4.3.4.jar:/usr/share/openhab/runtime/lib/boot/org.apache.karaf.specs.activator-4.3.4.jar:/usr/share/openhab/runtime/lib/boot/osgi.core-7.0.0.jar:/usr/share/openhab/runtime/lib/jdk9plus/istack-commons-runtime-3.0.10.jar:/usr/share/openhab/runtime/lib/jdk9plus/jakarta.xml.bind-api-2.3.3.jar:/usr/share/openhab/runtime/lib/jdk9plus/javax.annotation-api-1.3.2.jar:/usr/share/openhab/runtime/lib/jdk9plus/jaxb-runtime-2.3.3.jar:/usr/share/openhab/runtime/lib/jdk9plus/org.apache.servicemix.specs.activation-api-1.2.1-1.2.1_3.jar:/usr/share/openhab/runtime/lib/jdk9plus/txw2-2.3.3.jar)

I think I should reinstall the system in 32 bit.

Ok, I reinstalled the whole system as a 32 bit system and it happens again:

openjdk 11.0.13 2021-10-19 LTS
OpenJDK Runtime Environment Zulu11.52+13-CA (build 11.0.13+8-LTS)
OpenJDK Client VM Zulu11.52+13-CA (build 11.0.13+8-LTS, mixed mode)

Release = Raspbian GNU/Linux 11 (bullseye)
Kernel = Linux 5.10.63-v7l+
Platform = Raspberry Pi 4 Model B Rev 1.2

Dez 27 17:53:19 kopf sudo[3163]: openhabian : TTY=pts/0 ; PWD=/home/openhabian ; USER=root ; COMMAND=/usr/bin/systemctl start openhab.service
Dez 27 17:53:19 kopf sudo[3163]: pam_unix(sudo:session): session opened for user root(uid=0) by openhabian(uid=1000)
Dez 27 17:53:19 kopf systemd[1]: Started openHAB instance, reachable at http://kopf:8080.
Dez 27 17:53:19 kopf sudo[3163]: pam_unix(sudo:session): session closed for user root
Dez 27 17:55:01 kopf CRON[4418]: pam_unix(cron:session): session opened for user root(uid=0) by (uid=0)
Dez 27 17:55:01 kopf CRON[4419]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Dez 27 17:55:01 kopf CRON[4418]: pam_unix(cron:session): session closed for user root
Dez 27 17:55:10 kopf karaf[3166]: *** buffer overflow detected ***: terminated
Dez 27 17:55:10 kopf systemd[1]: openhab.service: Main process exited, code=killed, status=6/ABRT
Dez 27 17:55:10 kopf systemd[1]: openhab.service: Failed with result 'signal'.
Dez 27 17:55:10 kopf systemd[1]: openhab.service: Consumed 2min 28.308s CPU time.
Dez 27 17:55:15 kopf systemd[1]: openhab.service: Scheduled restart job, restart counter is at 1.
Dez 27 17:55:15 kopf systemd[1]: Stopping Frontail openHAB instance, reachable at http://kopf:9001...
Dez 27 17:55:15 kopf systemd[1]: frontail.service: Succeeded.
Dez 27 17:55:15 kopf systemd[1]: Stopped Frontail openHAB instance, reachable at http://kopf:9001.
Dez 27 17:55:15 kopf systemd[1]: frontail.service: Consumed 3.578s CPU time.
Dez 27 17:55:15 kopf systemd[1]: Stopped openHAB instance, reachable at http://kopf:8080.
Dez 27 17:55:15 kopf systemd[1]: openhab.service: Consumed 2min 28.308s CPU time.
Dez 27 17:55:15 kopf systemd[1]: Started openHAB instance, reachable at http://kopf:8080.
Dez 27 17:55:15 kopf systemd[1]: Started Frontail openHAB instance, reachable at http://kopf:9001.
Dez 27 17:56:00 kopf karaf[4503]: RXTX Warning:  Removing stale lock file. /var/lock/LCK..ttyUSB0
Dez 27 17:56:11 kopf karaf[4503]: RXTX Warning:  Removing stale lock file. /var/lock/LCK..ttyAMA0
Dez 27 17:56:11 kopf systemd[1]: Starting Cleanup of Temporary Directories...
Dez 27 17:56:11 kopf karaf[4503]: *** buffer overflow detected ***: terminated
Dez 27 17:56:11 kopf systemd[1]: openhab.service: Main process exited, code=killed, status=6/ABRT
Dez 27 17:56:11 kopf systemd[1]: openhab.service: Failed with result 'signal'.
Dez 27 17:56:11 kopf systemd[1]: openhab.service: Consumed 1min 28.852s CPU time.
Dez 27 17:56:12 kopf systemd[1]: systemd-tmpfiles-clean.service: Succeeded.
Dez 27 17:56:12 kopf systemd[1]: Finished Cleanup of Temporary Directories.
Dez 27 17:56:17 kopf systemd[1]: openhab.service: Scheduled restart job, restart counter is at 2.
Dez 27 17:56:17 kopf systemd[1]: Stopping Frontail openHAB instance, reachable at http://kopf:9001...
Dez 27 17:56:17 kopf systemd[1]: frontail.service: Succeeded.
Dez 27 17:56:17 kopf systemd[1]: Stopped Frontail openHAB instance, reachable at http://kopf:9001.
Dez 27 17:56:17 kopf systemd[1]: frontail.service: Consumed 2.703s CPU time.
Dez 27 17:56:17 kopf systemd[1]: Stopped openHAB instance, reachable at http://kopf:8080.
Dez 27 17:56:17 kopf systemd[1]: openhab.service: Consumed 1min 28.852s CPU time.
Dez 27 17:56:17 kopf systemd[1]: Started openHAB instance, reachable at http://kopf:8080.
Dez 27 17:56:17 kopf systemd[1]: Started Frontail openHAB instance, reachable at http://kopf:9001.
Dez 27 17:56:30 kopf sudo[6009]: openhabian : TTY=pts/0 ; PWD=/home/openhabian ; USER=root ; COMMAND=/usr/bin/systemctl stop openhab.service

This occurs while the initialization of the zwave binding:

2021-12-27 20:44:28.145 [DEBUG] [ding.zwave.handler.ZWaveThingHandler] - Initializing ZWave thing handler zwave:device:gehirn:node29.
2021-12-27 20:44:32.872 [DEBUG] [ing.zwave.handler.ZWaveSerialHandler] - Connecting to serial port '/dev/ttyAMA0'
2021-12-27 20:44:28.145 [DEBUG] [ding.zwave.handler.ZWaveThingHandler] - Initializing ZWave thing handler zwave:device:gehirn:node29.
2021-12-27 20:44:32.872 [DEBUG] [ing.zwave.handler.ZWaveSerialHandler] - Connecting to serial port '/dev/ttyAMA0'

Any hints how to proceed?

Solution was to set the openhabian parameter 35 to “Disable serial console”