-
-
Notifications
You must be signed in to change notification settings - Fork 31.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HA Core loop crashing when ZHA starts since 2023.4 #91467
Comments
Hey there @dmulcahey, @Adminiuga, @puddly, mind taking a look at this issue as it has been labeled with an integration ( Code owner commandsCode owners of
(message by CodeOwnersMention) zha documentation |
There is likely a cancellation that is propagating too high in the stack. We would need the stack trace from the console log to be able to find and fix it. |
Hi, Understood! How would I be able to give you that? |
You could enable |
Sorry for potential obvious questions but as my HA is running on RPI, any crash loop or restart is taking ages, I prefer to know exactly what to do before crashing my whole system :D Would that be enough in configuration.yaml? Or do I need to do anything else before disabling zha, upgrade and enableing zha? debugpy:
start: true
wait: true |
debugpy: Thats all that is needed |
Alright, so, running 2023.3.6:
Here are the logs from step 5.
All I do to have my system running fine again is run this: |
I'd try uninstall |
I'm currently trying to upgrade to 2023.4.5 with the HASS.Agent integration removed.
It's taking quite a while for a 250 MB table. I'm waiting to see if there's anything that pops up saying it's done. If not, in a few hours, I'll try to restart my RPI, see if these steps come back or not. |
FYI @nerthazrim for your |
Thanks! |
To be on the safe side, I've disabled my Same behavior on 2023.4.5 with HASS.Agent disabled (EDIT: uninstalled, not disabled) and local recorder. HA crashes when ZHA is starting:
|
Non-thread-safe operation means it will randomly cause a crash because it will modify the data in another thread and then that other thread goes to do something it it, it will fail in an unexpected way. In this case it's likely modifying the event loop scheduling so if that fails everything collapses |
Still... HASS.Agent is uninstalled and I still have the same issue :( Any idea? :( |
Post another log without hass agent muddying the water |
My bad, I forgot that HASS.Agent is a custom integration and needed to be uninstalled also in HACS. So, HASS.Agent totally uninstalled, recorder customization disabled (default settings now), same thing.
|
And FYI: same behavior with HACS completely removed Oh and I also have netdata running on the RPI. I've disabled it for my latest tests, so it does not seem to be some kind of interference coming from it |
I'm keeping my HA on latest version for now, with ZHA disabled, hoping you'll find something. I'll have to revert to 2023.3.6 and working ZHA later today though. |
I've tried anything I could think of, unfortunately no good news. |
What specific ZiGate are you using and on what hardware? I'm seeing this in your log: 2023-04-18 18:35:01.133 WARNING (MainThread) [zigpy_zigate.uart] Invalid length: 0, data: 9 |
Hi @puddly, I'm using a PiZigate+, on firmware 13, plugged on my RPI 3B. |
The (nearly deprecated) PiZiGate+ is unique in that it requires GPIO toggling to boot up. However, once that is done, it works just like any other serial device. From your log, it looks like the ZiGate starts up fine and ZHA is able to initialize. Can you enable ZHA debug logging? https://www.home-assistant.io/integrations/zha/#debug-logging. |
Here you go, hoping you'll find something: FYI: I disabled the HASS.Agent integration and the recorder to my mariadb, nothing else. And ZHA initially, obviously. What do you mean by "nearly depecrated"? Should I open an issue on their github asking for something specific? Thanks again! |
Hi, I have the same problem and I was suspected zigate. When i started with HA and ZHA I have to rollback to a previous firmware to appairing zigate. |
What specific ZiGate are you running and on what hardware? |
I’m running zigate v1 with firmware 3.21 on freebox delta with virtualization |
ZiGate USB or PiZiGate? Also, can you gather debug logs? |
Zigate usb. In logs I have nothing else that : Logger: homeassistant.components.recorder.util The system could not validate that the sqlite3 database at //config/home-assistant_v2.db was shutdown cleanly |
The problem
Hi,
When upgrading HA Core to 2023.4.1 (and more recently, 2023.4.4), HA Core seems to crash at startup. More precisely, it crashes when ZHA starts. If I disable ZHA integration before upgrading, all goes well. When I enable ZHA after upgrade, HA Core crashes, restart, crashes, etc...
What version of Home Assistant Core has the issue?
core-2023.3.6
What was the last working version of Home Assistant Core?
core-2023.3.6
What type of installation are you running?
Home Assistant Supervised
Integration causing the issue
ZHA
Link to integration documentation on our website
https://www.home-assistant.io/integrations/zha/
Diagnostics information
I'm currently running HA Supervised, manually installed on a Raspberry Pi 3B running on Debian 11.
Home Assistant 2023.3.6
Supervisor 2023.04.0
Frontend 20230309.1 - latest
configuration.yaml below
1 addon: Mosquitto Broker
Integrations enabled: HACS, HASS.Agent, Supervisor, Home Connect, iRobot, Meteo, Mobile App, MQTT, Radio, RPI Power Checker, Shelly, Sun, UniFi Network, UniFi Protect, ViCare, ZHA
On ZHA, I have multiple devices, mainly shades, 1 Zlinky and 2 Aqara door sensors.
I've had this configuration for more than 2 weeks now, running smoothly, all upgrades went well.
However, when upgrading HA Core to 2023.4.1 (and more recently, 2023.4.4), HA Core seems to crash at startup. More precisely, it crashes when ZHA starts. If I disable ZHA integration before upgrading, all goes well. When I enable ZHA after upgrade, HA Core crashes.
I'm a bit lost as I don't see anything useful in the HA logs when I start ZHA :(
Example YAML snippet
Anything in the logs that might be useful for us?
No response
Additional information
No response
The text was updated successfully, but these errors were encountered: