CPU 100%, python3 process, suspect Z-Wave?

Home Assistant Supervised on Linux Mint 20
HA version 114.1.

I’ve been suffering from 100% CPU recently, like many others. It can go for a day or two or only an hour or so. CPU goes up to 100% and causes the processor to heat up. Symptoms are that HA itself remains responsive but Z-Wave devices don’t work. I can stop it by restarting Home Assistant or by stopping the Z-Wave network.

There are a myriad of threads on this, most of which involve installing py-spy. I’ve tried that (using instructions I’ve found for a “cargo install”) but I get an error message on installation as follows:

/usr/bin/ld: cannot find -lunqind
/usr/bun/ld: cannot find -lunwind-ptrace
/usr/bin/ld: cannot find -lunqind-x86_64
collect2: error: ld returned 1 exit status

error: aborting due to previous error
error: failed to compile py-spy v0.3.3, intermediate artifacts can be found at /tmp/cargo-installHauK5j
Caused by:
could not compile py-spy

Can anyone help me with what to do next?

Can you use one of the pre-compiled binaries from https://github.com/benfred/py-spy/releases ?

If you manage to get the recording, please post it in this thread High CPU usage after 0.113 as I’m keeping watch there.

OK, thank you, will do.

Hey,

Did you find any solution to fix this ? I have the same symptoms since version 117. CPU reaches suddenly 100% after 24 to 32 hours. CPU goes back to normal after stopping Zwave network or rebooting.

Thanks !

I have to say it’s been more stable recently. I did have a few more occurrences of it but at the time I hadn’t got the py-spy thing working so couldn’t report it. (I’m now running HA in a VM and I couldn’t work out how to get the py-spy into it…you have to log in to the console, then log in as root, then log into the docker container and install and execute it from there…), but not had an occurrence since then. Apart from once when my server PC crashed and on rebooting HA did the 100% CPU thing again. But the whole installation wasn’t happy anyway after the crash and had problems with shared directories so I rebooted again and it was fine after that. I’m keeping loads of fingers crossed that the problem’s gone away. I’m keeping up-to-date with the releases, currently on 118.2. But at one point I was getting this problem at least once day on earlier versions. I’ve also recently updated my host OS (Linux Mint) from 19 to 20.

Which Z-Wave stick are you using, I wonder if it’s common to that? I’ve got the one that identifies as Sigma Designs.

I’m using aeotec z-stick gen 5. It’s been stable for 3 years. I’m using HA with docker on a raspberry pi 4 with buster and I’m also keeping HA up to date. I’m on 118.2 too.

I have been able to run py-spy. I posted the svg file here Python3 high CPU Usage and I’m waiting for the next CPU burst to make sure another process than core is not the cause of my issue.