smarthomej / addons

SmartHome/J addons for openHAB

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

amazonechocontrol blocks thingHandler threads after some days of uptime

NulPex opened this issue · comments

commented

After some uptime the openhab thinghandler threads get blocked.
I have four blocked threads in my thread dump at these points:

  • at org.smarthomej.binding.amazonechocontrol.internal.handler.AccountHandler.checkLogin(AccountHandler.java:377)
  • at org.smarthomej.binding.amazonechocontrol.internal.handler.AccountHandler.updateSmartHomeState(AccountHandler.java:907)
  • at org.smarthomej.binding.amazonechocontrol.internal.handler.AccountHandler.updateSmartHomeState(AccountHandler.java:907)
  • at org.openhab.core.thing.binding.BaseThingHandler.updateStatus(BaseThingHandler.java:376)

This causes all things to be not updated anymore and requires an openhab restart. Does checkLogin not come back in my case?

openhab blocked threads.txt

commented

Which binding version and which openHAB version? line 907 in ÀccountHandler` is just a logger in current 4.0 code, that can't block.

commented

Hi Jan, thanks for answering.
It's running on
3.2.16 │ SmartHome/J Add-ons :: Bundles :: Amazon Echo Control Binding
3.2.16 │ SmartHome/J Add-ons :: Bundles :: Common Components

and OH 3.4.4

The logger call in line 907 is the first statement in the synchronized method, i believe this is how it's displayed when the thread can't enter the method. But I might be wrong. Any suggestions, test or version updates i could try?

commented

Is there any exception in the log? I have the feeling that maybe something goes wrong in the "last" (=fifth) thread and that does not properly exit the method which then blocks.

commented

There is an openhab cloud reconnect happening at this time. But no further exceptions.

2023-07-18 06:46:41.864 [WARN ] [io.openhabcloud.internal.CloudClient] - Socket.IO disconnected: ping timeout
2023-07-18 06:46:41.889 [INFO ] [io.openhabcloud.internal.CloudClient] - Disconnected from the openHAB Cloud service (UUID = 7e...99, base URL = http://localhost:10169)
2023-07-18 06:46:43.549 [WARN ] [io.openhabcloud.internal.CloudClient] - Error connecting to the openHAB Cloud instance: already connected. Reconnecting after 3154 ms.
2023-07-18 06:46:48.497 [WARN ] [io.openhabcloud.internal.CloudClient] - Error connecting to the openHAB Cloud instance: already connected. Reconnecting after 4933 ms.
2023-07-18 06:46:53.628 [WARN ] [io.openhabcloud.internal.CloudClient] - Error connecting to the openHAB Cloud instance: already connected. Reconnecting after 9961 ms.
2023-07-18 06:47:03.790 [INFO ] [io.openhabcloud.internal.CloudClient] - Connected to the openHAB Cloud service (UUID = 7e...99, base URL = http://localhost:10169)
2023-07-18 06:48:31.609 [INFO ] [ol.internal.websocket.AlexaWebSocket] - Web Socket close 1006. Reason: Disconnected

commented

Ok, that seems to indicate that there is a general network connectivity issue at that time. I'll see if I can reproduce that.

commented

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.