You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This custom component seems to blocks/delays a clean restart of Home Assistant. I don't think this happened in 2024.1.x, I skipped 2024.2.0 and it does appear to happen in 2024.2.1.
On restart I see these warnings:
2024-02-10 23:17:19.705 WARNING (MainThread) [homeassistant.core] Shutdown stage 'stop integrations': still running: <Task pending name='Task-100718' coro=<async_setup_entry.<locals>.close_monitors() running at /config/custom_components/greeneye_monitor/__init__.py:148> wait_for=<Future pending cb=[Task.task
_wakeup()]> cb=[set.remove()]>
2024-02-10 23:18:19.708 WARNING (MainThread) [homeassistant.core] Timed out waiting for final writes to complete, the shutdown will continue
2024-02-10 23:18:19.708 WARNING (MainThread) [homeassistant.core] Shutdown stage 'final write': still running: <Task pending name='Task-100718' coro=<async_setup_entry.<locals>.close_monitors() running at /config/custom_components/greeneye_monitor/__init__.py:148> wait_for=<Future pending cb=[Task.task_wakeu
p()]> cb=[set.remove()]>
2024-02-10 23:18:49.711 WARNING (MainThread) [homeassistant.core] Timed out waiting for close event to be processed, the shutdown will continue
2024-02-10 23:18:49.711 WARNING (MainThread) [homeassistant.core] Shutdown stage 'close': still running: <Task pending name='Task-100718' coro=<async_setup_entry.<locals>.close_monitors() running at /config/custom_components/greeneye_monitor/__init__.py:148> wait_for=<Future pending cb=[Task.task_wakeup()]>
cb=[set.remove()]>
Diagnostics
I'll grab these shortly.
The text was updated successfully, but these errors were encountered:
Interesting. I'm still on 2023.8, so I've got some upgrading to do. This integration hasn't changed in a while, but it looks like there have been some changes to how HA Core handles shutdown. As far as I can tell locally, it's generally been able to close the server quickly on my instance. I'll upgrade my local install and see if I can repro. If not, I'll see about adding some more logging at least.
Well, I can repro in my actual home assistant instance, but not in the dev container that I use to develop this integration. So that's fun.
It looks like the reason this is appearing now is that the behavior of Server.wait_closed changed in Python 3.12 (python/cpython#79033), so it's exposing a bug in the shutdown order in greeneye_monitor. Working to figure that out now.
Describe the bug
This custom component seems to blocks/delays a clean restart of Home Assistant. I don't think this happened in
2024.1.x
, I skipped2024.2.0
and it does appear to happen in2024.2.1
.On restart I see these warnings:
Diagnostics
I'll grab these shortly.
The text was updated successfully, but these errors were encountered: