smarthomej / addons

SmartHome/J addons for openHAB
Eclipse Public License 2.0
59 stars 24 forks source link

amazonechocontrol blocks thingHandler threads after some days of uptime #503

Closed NulPex closed 1 year ago

NulPex commented 1 year ago

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

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

J-N-K commented 1 year ago

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

NulPex commented 1 year ago

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?

J-N-K commented 1 year ago

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.

NulPex commented 1 year ago

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

J-N-K commented 1 year ago

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

stale[bot] commented 1 year ago

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.