Home Assistant crashes, I do not know why. [log in post]

Hi,

Hardware:
Raspberry Pi 4b, 8gb.
HA installed on SSD.

Since a few versions (2022.9.xx until the most recent 2022.10.3 my Home Assistant is sometimes crashing. The weird thing is that it seems to be running the automations but in the app most of it is unresponsive. When I try to reboot I get an error that there’s something wrong in configuration.yaml. But I did not change anything there. (Could also point to anything linking from there like automations…)

I get no errors when I check the configuration.yaml.

Can someone point me in a direction, I’m not very useful when it comes to reading logs. I do not know what I need to look for. Thanks!

These are the last 2 minutes of log before the crash happens.
home-assistant.log

I did check the configuration as well with β€œCheck Home Assistant Configuration” (Yes, I know it’s deprecated.)

Collecting httpcore<0.16.0,>=0.15.0
Downloading httpcore-0.15.0-py3-none-any.whl (68 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 68.4/68.4 KB 4.5 MB/s eta 0:00:00
Collecting rfc3986[idna2008]<2,>=1.3
Downloading rfc3986-1.5.0-py2.py3-none-any.whl (31 kB)
Collecting sniffio
Downloading sniffio-1.3.0-py3-none-any.whl (10 kB)
Collecting MarkupSafe>=2.0
Downloading MarkupSafe-2.1.1-cp39-cp39-musllinux_1_1_aarch64.whl (30 kB)
Collecting text-unidecode>=1.3
Downloading text_unidecode-1.3-py2.py3-none-any.whl (78 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 78.2/78.2 KB 4.6 MB/s eta 0:00:00
Collecting urllib3<1.27,>=1.21.1
Downloading urllib3-1.26.12-py2.py3-none-any.whl (140 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 140.4/140.4 KB 6.9 MB/s eta 0:00:00
Collecting idna<4,>=2.5
Downloading idna-3.4-py3-none-any.whl (61 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 61.5/61.5 KB 3.9 MB/s eta 0:00:00
Collecting dbus-fast<2.0.0,>=1.22.0
Downloading dbus_fast-1.45.0.tar.gz (62 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 62.6/62.6 KB 4.2 MB/s eta 0:00:00
Installing build dependencies: started
Installing build dependencies: finished with status β€˜done’
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status β€˜done’
Preparing metadata (pyproject.toml): started
Preparing metadata (pyproject.toml): finished with status β€˜done’
Collecting pycparser
Downloading pycparser-2.21-py2.py3-none-any.whl (118 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 118.7/118.7 KB 5.0 MB/s eta 0:00:00
Collecting anyio==3.*
Downloading anyio-3.6.1-py3-none-any.whl (80 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 80.6/80.6 KB 4.9 MB/s eta 0:00:00
Collecting h11<0.13,>=0.11
Downloading h11-0.12.0-py3-none-any.whl (54 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 54.9/54.9 KB 4.0 MB/s eta 0:00:00
Building wheels for collected packages: lru-dict, dbus-fast
Building wheel for lru-dict (setup.py): started
Building wheel for lru-dict (setup.py): finished with status β€˜error’
error: subprocess-exited-with-error

Γ— python setup.py bdist_wheel did not run successfully.
β”‚ exit code: 1
╰─> [8 lines of output]
running bdist_wheel
running build
running build_ext
building β€˜lru’ extension
creating build
creating build/temp.linux-aarch64-cpython-39
gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fno-semantic-interposition -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-free -DTHREAD_STACK_SIZE=0x100000 -fPIC -I/usr/local/include/python3.9 -c lru.c -o build/temp.linux-aarch64-cpython-39/lru.o
error: command β€˜gcc’ failed: No such file or directory
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for lru-dict
Running setup.py clean for lru-dict
Building wheel for dbus-fast (pyproject.toml): started
Building wheel for dbus-fast (pyproject.toml): finished with status β€˜done’
Created wheel for dbus-fast: filename=dbus_fast-1.45.0-cp39-cp39-musllinux_1_2_aarch64.whl size=482620 sha256=c0a1c29d3489846aa5527c5522da10a84dbff51139ffda82043ecbf91ccd9d4d
Stored in directory: /root/.cache/pip/wheels/49/b8/38/71239d536891578bb7fa88e7438ccf4d484903f7f3bedcda80
Successfully built dbus-fast
Failed to build lru-dict
Installing collected packages: voluptuous, text-unidecode, rfc3986, pytz, lru-dict, ifaddr, ciso8601, voluptuous-serialize, urllib3, typing-extensions, sniffio, six, pyyaml, python-slugify, PyJWT, pycparser, orjson, multidict, MarkupSafe, idna, h11, frozenlist, charset-normalizer, certifi, awesomeversion, attrs, atomicwrites-homeassistant, async-timeout, astral, yarl, requests, jinja2, dbus-fast, cffi, anyio, aiosignal, httpcore, cryptography, bleak, bcrypt, aiohttp, httpx, home-assistant-bluetooth, homeassistant
Running setup.py install for lru-dict: started
Running setup.py install for lru-dict: finished with status β€˜error’
error: subprocess-exited-with-error

Γ— Running setup.py install for lru-dict did not run successfully.
β”‚ exit code: 1
╰─> [10 lines of output]
running install
/usr/local/lib/python3.9/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running build
running build_ext
building β€˜lru’ extension
creating build
creating build/temp.linux-aarch64-cpython-39
gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fno-semantic-interposition -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-free -DTHREAD_STACK_SIZE=0x100000 -fPIC -I/usr/local/include/python3.9 -c lru.c -o build/temp.linux-aarch64-cpython-39/lru.o
error: command β€˜gcc’ failed: No such file or directory
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
Γ— Encountered error while trying to install package.
╰─> lru-dict
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
s6-rc: info: service legacy-services: stopping
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped

Not sure what the reason is, however you log if full of lines all related to ZHA/zigpy. It is a lot of lines for a 2 sec long log.

I believe Something is wrong with the ZHA setup. How is the setup?

Yeah, it is kind of full. The setup is a GoControl HUSBZB-1 stick both for Z-Wave and ZigBee.

5 devices, plus controller for Z-Wave.
33 devices, plus controller for ZigBee.

Mostly lamps and powerplugs. The BlitzWolf SHP-15 have been recently added.

They do have a powermonitoring ability. I can imagine there’s more traffic going through the ZigBee network because of that.

You have a SSD and likely two other USB devices. Are you sure you have enough power for the devices?

There’s no errors in that entire log from what I can see. Is there a reason you have log level set to debug for zha? Or are you setting default log level to debug?

Either way can you set log level to info, warning or error and then capture the logs leading up to the crash again? It seems like you just captured a lot of irrelevant noise unless you have some reason to believe ZHA is the root cause, if so please share why.

This addon checks your current config against the next version of HA. It doesn’t provide any useful information in this context. The result of running ha core check would be more meaningful but you said it passes so that’s not super helpful either.

Yes, enough power. Been using it like this for quite a while.

1 Like

I have set nothing on purpose.
I just copied the home-assistant.log.1 after the crash.

I’ve set this now. I think it was on debug for for zha and zigpy.

Will return when something happens.