Segmentation faults in 0.45.1? What's going on?

Hello, I installed 0.45.0 shortly after release via the docker and had it seg fault out and die, restarted shortly after and all was good again for a few hours and it seg faulted again. Switched back to 0.44.2 and ran fine for day or two then moved to 0.45.1 earlier today and it has already seg faulted twice this evening. No errors in HA log, only place I see anything is in the dmesg log. Does the below make any sense to anyone or give any indication to what may be wrong? Also of note is first round of seg faults (0.45.0 version) occurred with HA running in docker on ubuntu 16 in an esxi vm. Second round of seg faults (0.45.1) is the same HA config but running in docker on physical box based on alpine linux. So the exact same config on two separate operating systems

from dmesg:

May 24 02:39:57 hass kern.info kernel: [113442.094142] python[30348]: segfault at 8 ip 000079b6f96027b2 sp 000079b6d6258fb0 error 6 in libpython3.6m.so.1.0[79b6f955e000+29a000]
May 24 02:39:57 hass kern.alert kernel: [113442.094217] grsec: From 172.30.1.56: Segmentation fault occurred at 0000000000000008 in /usr/local/bin/python3.6[python:30348] uid/euid:0/0 gid/egid:0/0, parent /usr/bin/docker-containerd-shim[docker-containe:30311] uid/euid
May 24 02:39:57 hass kern.alert kernel: [113442.094477] grsec: From 172.30.1.56: denied resource overstep by requesting 4096 for RLIMIT_CORE against limit 0 for /usr/local/bin/python3.6[python:30348] uid/euid:0/0 gid/egid:0/0, parent /usr/bin/docker-containerd-shim[do

fyi, 172.30.1.56 is a Nvidia Shield (discover is turned off in HA). Shield is not configured in HA.

EDIT: the .56 may not have anything to do with it, further looking into the messages log shows the first seg fault with the same three lines without the from address:

May 23 23:02:46 hass kern.info kernel: [100410.601161] python[20759]: segfault at 8 ip 000076dfbbae97b2 sp 000076dfa8837ea0 error 6 in libpython3.6m.so.1.0[76dfbba45000+29a000]
May 23 23:02:46 hass kern.alert kernel: [100410.601196] grsec: Segmentation fault occurred at 0000000000000008 in /usr/local/bin/python3.6[python:20759] uid/euid:0/0 gid/egid:0/0, parent /usr/bin/docker-containerd-shim[docker-containe:4467] uid/euid:0/0 gid/egid:0/0
May 23 23:02:46 hass kern.alert kernel: [100410.601455] grsec: denied resource overstep by requesting 4096 for RLIMIT_CORE against limit 0 for /usr/local/bin/python3.6[python:20759] uid/euid:0/0 gid/egid:0/0, parent /usr/bin/docker-containerd-shim[docker-containe:4467

Any thoughts?

If you see segfaults, you should raise an issue in Github. I have a Shield and I am not seeing this, but anytime I see a segfault I try to bring it to the attention of the core devs. (And I would include segfaults in the title, BTW)

I often find segfaults when there is file system corruption. Try running fsck on the unmounted disk.

Thanks, I opened a new issue. Pretty sure its not related to FS corruption as its happened on two entirely different systems and the latest system was a completely fresh install of alpine linux.

Thanks again!

1 Like

I just got the segmentation error and solved by doing the following:

# activate venv
source /srv/homeassistant/bin/activate
# uninstall homeassistant + all dependencies
pip3 install pip-autoremove
pip-autoremove homeassistant -y

Then I deleted everything in the ‘.homeassistant/deps’ folder before reinstalling hass:

# Reinstall homeassistant

pip3 install --upgrade homeassistant
1 Like