Skip to content
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

Segfaults still causing crashes in 29.5 #3616

Closed
rpitera opened this issue Sep 30, 2016 · 7 comments
Closed

Segfaults still causing crashes in 29.5 #3616

rpitera opened this issue Sep 30, 2016 · 7 comments

Comments

@rpitera
Copy link

rpitera commented Sep 30, 2016

Home Assistant release (hass --version):
0.29.5

Python release (python3 --version):
3.4.2

Description of problem:
HA crashes with no indication of issue in log, log just stops updating. GUI unreachable.

sudo systemctl status home-assistant -l shows the following

● home-assistant.service - Home Assistant
   Loaded: loaded (/etc/systemd/system/home-assistant.service; enabled)
   Active: failed (Result: signal) since Fri 2016-09-30 10:39:30 EDT; 19min ago
  Process: 18815 ExecStart=/srv/hass/hass_venv/bin/hass -c /home/hass/ (code=killed, signal=SEGV)
 Main PID: 18815 (code=killed, signal=SEGV)

Sep 30 10:39:30 raspi1 hass[18815]: DEBUG:homeassistant.components.api:STREAM 1990751984 WRITING data: {"time_fired": "2016-09-30T14:39:30.609874+00:00", "origin": "LOCAL", "data": {"old_state": {"last_updated": "2016-09-30T14:39:00.674958+00:00", "last_changed": "2016-09-30T14:39:00.674958+00:00", "state": "583.6", "entity_id": "sensor.ram_free", "attributes": {"friendly_name": "RAM Free", "icon": "mdi:memory", "unit_of_measurement": "MiB"}}, "entity_id": "sensor.ram_free", "new_state": {"last_updated": "2016-09-30T14:39:30.609609+00:00", "last_changed": "2016-09-30T14:39:30.609609+00:00", "state": "579.9", "entity_id": "sensor.ram_free", "attributes": {"friendly_name": "RAM Free", "icon": "mdi:memory", "unit_of_measurement": "MiB"}}}, "event_type": "state_changed"}
Sep 30 10:39:30 raspi1 hass[18815]: INFO:homeassistant.core:Bus:Handling <Event state_changed[L]: old_state=<state sensor.ram_use=37.3; friendly_name=RAM Use, icon=mdi:memory, unit_of_measurement=% @ 2016-09-30T10:39:00.826833-04:00>, entity_id=sensor.ram_use, new_state=<state sensor.ram_use=37.1; friendly_name=RAM Use, icon=mdi:memory, unit_of_measurement=% @ 2016-09-30T10:39:30.714331-04:00>>
Sep 30 10:39:30 raspi1 hass[18815]: DEBUG:homeassistant.components.api:STREAM 1990751984 FORWARDING <Event state_changed[L]: old_state=<state sensor.ram_use=37.3; friendly_name=RAM Use, icon=mdi:memory, unit_of_measurement=% @ 2016-09-30T10:39:00.826833-04:00>, entity_id=sensor.ram_use, new_state=<state sensor.ram_use=37.1; friendly_name=RAM Use, icon=mdi:memory, unit_of_measurement=% @ 2016-09-30T10:39:30.714331-04:00>>
Sep 30 10:39:30 raspi1 hass[18815]: DEBUG:homeassistant.components.api:STREAM 1990751984 WRITING data: {"time_fired": "2016-09-30T14:39:30.714714+00:00", "origin": "LOCAL", "data": {"old_state": {"last_updated": "2016-09-30T14:39:00.826833+00:00", "last_changed": "2016-09-30T14:39:00.826833+00:00", "state": "37.3", "entity_id": "sensor.ram_use", "attributes": {"friendly_name": "RAM Use", "icon": "mdi:memory", "unit_of_measurement": "%"}}, "entity_id": "sensor.ram_use", "new_state": {"last_updated": "2016-09-30T14:39:30.714331+00:00", "last_changed": "2016-09-30T14:39:30.714331+00:00", "state": "37.1", "entity_id": "sensor.ram_use", "attributes": {"friendly_name": "RAM Use", "icon": "mdi:memory", "unit_of_measurement": "%"}}}, "event_type": "state_changed"}
Sep 30 10:39:30 raspi1 hass[18815]: INFO:homeassistant.core:Bus:Handling <Event state_changed[L]: old_state=<state sensor.cpu_use=8; friendly_name=CPU Use, icon=mdi:memory, unit_of_measurement=% @ 2016-09-30T10:39:00.902989-04:00>, entity_id=sensor.cpu_use, new_state=<state sensor.cpu_use=5; friendly_name=CPU Use, icon=mdi:memory, unit_of_measurement=% @ 2016-09-30T10:39:30.770805-04:00>>
Sep 30 10:39:30 raspi1 hass[18815]: DEBUG:homeassistant.components.api:STREAM 1990751984 FORWARDING <Event state_changed[L]: old_state=<state sensor.cpu_use=8; friendly_name=CPU Use, icon=mdi:memory, unit_of_measurement=% @ 2016-09-30T10:39:00.902989-04:00>, entity_id=sensor.cpu_use, new_state=<state sensor.cpu_use=5; friendly_name=CPU Use, icon=mdi:memory, unit_of_measurement=% @ 2016-09-30T10:39:30.770805-04:00>>
Sep 30 10:39:30 raspi1 hass[18815]: DEBUG:homeassistant.components.api:STREAM 1990751984 WRITING data: {"time_fired": "2016-09-30T14:39:30.770943+00:00", "origin": "LOCAL", "data": {"old_state": {"last_updated": "2016-09-30T14:39:00.902989+00:00", "last_changed": "2016-09-30T14:39:00.902989+00:00", "state": "8", "entity_id": "sensor.cpu_use", "attributes": {"friendly_name": "CPU Use", "icon": "mdi:memory", "unit_of_measurement": "%"}}, "entity_id": "sensor.cpu_use", "new_state": {"last_updated": "2016-09-30T14:39:30.770805+00:00", "last_changed": "2016-09-30T14:39:30.770805+00:00", "state": "5", "entity_id": "sensor.cpu_use", "attributes": {"friendly_name": "CPU Use", "icon": "mdi:memory", "unit_of_measurement": "%"}}}, "event_type": "state_changed"}
Sep 30 10:39:30 raspi1 hass[18815]: DEBUG:requests.packages.urllib3.connectionpool:"GET /vehicle/ HTTP/1.1" 200 281
Sep 30 10:39:30 raspi1 systemd[1]: home-assistant.service: main process exited, code=killed, status=11/SEGV
Sep 30 10:39:30 raspi1 systemd[1]: Unit home-assistant.service entered failed state.

Expected:
Normal operation


**Additional info:**

I use a number of template sensors, not sure if this is the problem related to the new async IO.
@rpitera
Copy link
Author

rpitera commented Sep 30, 2016

Found this in the logs after a restart.

16-09-30 11:06:08 asyncio: Exception in callback run_callback_threadsafe.<locals>.run_callback() at /srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/util/async.py:144
handle: <Handle run_callback_threadsafe.<locals>.run_callback() at /srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/util/async.py:144>
Traceback (most recent call last):
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/helpers/template.py", line 99, in async_render
    return self._compiled.render(kwargs).strip()
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/jinja2/environment.py", line 989, in render
    return self.environment.handle_exception(exc_info, True)
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/jinja2/environment.py", line 754, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/jinja2/_compat.py", line 37, in reraise
    raise value.with_traceback(tb)
  File "<template>", line 1, in top-level template code
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/jinja2/sandbox.py", line 329, in getattr
    value = getattr(obj, attribute)
jinja2.exceptions.UndefinedError: 'None' has no attribute 'attributes'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.4/asyncio/events.py", line 120, in _run
    self._callback(*self._args)
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/util/async.py", line 147, in run_callback
    future.set_result(callback(*args))
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/helpers/template.py", line 101, in async_render
    raise TemplateError(err)
homeassistant.exceptions.TemplateError: UndefinedError: 'None' has no attribute 'attributes'

I am still running the old custom component version of wunderground.py because the native component version is missing a number of attributes. I have commented out the template sensors, modified the configs to use the native version and removed the old program from the custom components directory along with the related cache.

I've restarted and will see if this has any effect.

@jsg4
Copy link

jsg4 commented Sep 30, 2016

I'm seeing this also. Even just minutes after restarting.

Sep 30 09:30:30 raspberrypi systemd[1]: home-assistant@pi.service: main process exited, code=killed, status=11/SEGV
Sep 30 09:30:30 raspberrypi systemd[1]: Unit home-assistant@pi.service entered failed state.

@geekofweek
Copy link
Contributor

geekofweek commented Sep 30, 2016

I have similar experience with all version of 0.29, tried removing various components and do some testing including removing the one template sensor I have. Same result. Would run anywhere from 30 mins to 2 hours and then crash.

@geekofweek
Copy link
Contributor

I also believe this is related to issue 3453

@jsg4
Copy link

jsg4 commented Sep 30, 2016

More segfaults, literally unusable.

@frelev
Copy link

frelev commented Sep 30, 2016

Same here, running 30-DEV

@balloob
Copy link
Member

balloob commented Sep 30, 2016

This is a duplicate of #3453

@balloob balloob closed this as completed Sep 30, 2016
@home-assistant home-assistant locked and limited conversation to collaborators Mar 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants