Logs flooded with Exception in thread EventAdminAsyncThread

I’m facing issues regularly with no events shown in logtails. Then my openHAB system in basically inoperative.

syslog and daemon.log contain entries like the ones below, many of them per second. Those logs ate ~15 GB of my sd card although logs we rotated. This led to “no space on disk” errors.

Feb 26 12:17:35 openHABianPi4 karaf[815]: Exception in thread "EventAdminAsyncThread #12" Exception in thread "EventAdminAsyncThread #11" Exception in thread "EventAdminAsyncThread #14" java.lang.NullPointerException
Feb 26 12:17:35 openHABianPi4 karaf[815]: #011at java.util.concurrent.LinkedBlockingQueue.dequeue(LinkedBlockingQueue.java:213)
Feb 26 12:17:35 openHABianPi4 karaf[815]: #011at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:444)
Feb 26 12:17:35 openHABianPi4 karaf[815]: #011at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1074)
Feb 26 12:17:35 openHABianPi4 karaf[815]: #011at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134)
Feb 26 12:17:35 openHABianPi4 karaf[815]: #011at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
Feb 26 12:17:35 openHABianPi4 karaf[815]: #011at java.lang.Thread.run(Thread.java:748)
Feb 26 12:17:35 openHABianPi4 karaf[815]: java.lang.NullPointerException
Feb 26 12:17:35 openHABianPi4 karaf[815]: #011at java.util.concurrent.LinkedBlockingQueue.dequeue(LinkedBlockingQueue.java:213)
Feb 26 12:17:35 openHABianPi4 karaf[815]: #011at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:444)
Feb 26 12:17:35 openHABianPi4 karaf[815]: #011at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1074)
Feb 26 12:17:35 openHABianPi4 karaf[815]: #011at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134)
Feb 26 12:17:35 openHABianPi4 karaf[815]: #011at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
Feb 26 12:17:35 openHABianPi4 karaf[815]: #011at java.lang.Thread.run(Thread.java:748)
Feb 26 12:17:35 openHABianPi4 karaf[815]: java.lang.NullPointerException

First, I thought that it’s related to Amazon Echo Control since it caused similar exceptions. I always updated to the newest version if the problem re-occurred. At least then openHAB did not run out of memory any more.

But the thread pool errors persisted and ended up in the logs seen above.

I came across Openhab 2.5 is blocking after one week of runtime here. The Thread::sleep calls I’m using are rarely called (only on specific events like reboot via voice), but maybe I’m causing thread leaks via wrong use of reentrant locks:

rule "Minimum battery level of devices went below 20%"
when
    Item GwarningsSensorsBatteryLevelsMin received update
then
    latch.lock
    try {
        var triggeringGroup = (triggeringItem as GroupItem)
        checkMinBatteryLevel.apply(triggeringGroup, 20)
    } finally {
        latch.unlock
    }
end

I think, I noticed that when exceptions occur within the try block, the finally block does not executed. This isn’t exactly the behavior I’d expect from a resource protection block. Is there a better way to safeguard this?

Best regards,
ceedee

I’ve the same Problem:

And another topic with that:

But nobody can help me. It happens sometimes after some hours, sometime after days or weeks.

I’ve added the follwing to runtime.cfg:

org.eclipse.smarthome.threadpool:ruleEngine=100

For a month now, I did not see the mentioned errors again.

Hope it helps someone out there!

Best regards,
cd_

It not help by me