home-assistant / addons

:heavy_plus_sign: Docker add-ons for Home Assistant
https://home-assistant.io/hassio/
Apache License 2.0
1.55k stars 1.51k forks source link

Memory leak with the almond integration #2145

Closed niemyjski closed 2 years ago

niemyjski commented 3 years ago

The problem

There is a memory leak with the almond integration. I'm not sure where but see additional information.

Environment

Problem-relevant configuration

Traceback/Error logs

Loaded class definition for io.home-assistant, module type: org.thingpedia.v2, version: 22
Loaded class definition for com.bing, module type: org.thingpedia.v2, version: 50
Loaded class definition for io.home-assistant, module type: org.thingpedia.v2, version: 22
Loaded class definition for com.bing, module type: org.thingpedia.v2, version: 50
Loaded class definition for io.home-assistant, module type: org.thingpedia.v2, version: 22
Loaded class definition for com.bing, module type: org.thingpedia.v2, version: 50
Loaded class definition for io.home-assistant, module type: org.thingpedia.v2, version: 22
Loaded class definition for com.bing, module type: org.thingpedia.v2, version: 50
Loaded class definition for io.home-assistant, module type: org.thingpedia.v2, version: 22
BaseDevice.engine is deprecated and should not be used in new code.
Unhandled HA entity sensor.node_78_electric_consumed_w - domain sensor -> device class power
Unhandled HA entity sensor.node_78_electric_consumed_kwh - domain sensor -> device class energy
Unhandled HA entity sensor.node_78_electric_consumed_v - domain sensor -> device class voltage
Unhandled HA entity sensor.node_78_electric_consumed_a - domain sensor -> device class current
BaseDevice.engine is deprecated and should not be used in new code.
Unhandled HA entity sensor.garage_pond_pump_electric_consumed_a - domain sensor -> device class current
Unhandled HA entity sensor.garage_pond_pump_electric_consumed_v - domain sensor -> device class voltage
Unhandled HA entity sensor.garage_pond_pump_electric_consumed_w - domain sensor -> device class power
Unhandled HA entity sensor.garage_pond_pump_electric_consumed_kwh - domain sensor -> device class energy
Unhandled HA entity automation.garage_turn_on_pond_pump_during_off_peak_hours - domain automation -> device class undefined
Unhandled HA entity automation.garage_turn_off_pond_pump_during_peak_hours - domain automation -> device class undefined
Loaded class definition for com.bing, module type: org.thingpedia.v2, version: 50
Loaded class definition for io.home-assistant, module type: org.thingpedia.v2, version: 22
Home Assistant: connection attempt 1/0
Error on Home Assistant websocket: Error: Unexpected server response: 502
Home Assistant: connection attempt 1/0
Error on Home Assistant websocket: Error: Unexpected server response: 502
Home Assistant: connection attempt 1/0
Error on Home Assistant websocket: Error: Unexpected server response: 502
Home Assistant: connection attempt 1/0
Error on Home Assistant websocket: Error: Unexpected server response: 502
Home Assistant: connection attempt 1/0
Error on Home Assistant websocket: Error: Unexpected server response: 502
Home Assistant: connection attempt 1/0
Error on Home Assistant websocket: Error: Unexpected server response: 502
Home Assistant: connection attempt 1/0
Error on Home Assistant websocket: Error: Unexpected server response: 502
Home Assistant: connection attempt 1/0
Error on Home Assistant websocket: Error: Unexpected server response: 502
Home Assistant: connection attempt 1/0
Error on Home Assistant websocket: Error: Unexpected server response: 502
Home Assistant: connection attempt 1/0
Error on Home Assistant websocket: Error: Unexpected server response: 502
Home Assistant: connection attempt 1/0
Error on Home Assistant websocket: Error: Unexpected server response: 502
Home Assistant: connection attempt 1/0
Error on Home Assistant websocket: Error: Unexpected server response: 502
Home Assistant: connection attempt 1/0
Error on Home Assistant websocket: Error: Unexpected server response: 502
Home Assistant: connection attempt 1/0
Error on Home Assistant websocket: Error: Unexpected server response: 502
Home Assistant: connection attempt 1/0
Error on Home Assistant websocket: Error: Unexpected server response: 502
Home Assistant: connection attempt 1/0
Error on Home Assistant websocket: Error: Unexpected server response: 502
Home Assistant: connection attempt 1/0
Error on Home Assistant websocket: Error: Unexpected server response: 502
Home Assistant: connection attempt 1/0
Error on Home Assistant websocket: Error: Unexpected server response: 502
Home Assistant: connection attempt 1/0
Error on Home Assistant websocket: Error: Unexpected server response: 502
Home Assistant: connection attempt 1/0
Error on Home Assistant websocket: Error: Unexpected server response: 502
Home Assistant: connection attempt 1/0
Error on Home Assistant websocket: Error: Unexpected server response: 502
Home Assistant: connection attempt 1/0
Error on Home Assistant websocket: Error: Unexpected server response: 502
Home Assistant: connection attempt 1/0
Error on Home Assistant websocket: Error: Unexpected server response: 502
Home Assistant: connection attempt 1/0
Error on Home Assistant websocket: Error: Unexpected server response: 502
Home Assistant: connection attempt 1/0
Error on Home Assistant websocket: Error: Unexpected server response: 502
Home Assistant: connection attempt 1/0
Error on Home Assistant websocket: Error: Unexpected server response: 502
Home Assistant: connection attempt 1/0
Error on Home Assistant websocket: Error: Unexpected server response: 502
Home Assistant: connection attempt 1/0
Error on Home Assistant websocket: Error: Unexpected server response: 502
Home Assistant: connection attempt 1/0
Error on Home Assistant websocket: Error: Unexpected server response: 502
Home Assistant: connection attempt 1/0
Error on Home Assistant websocket: Error: Unexpected server response: 502
Home Assistant: connection attempt 1/0
Error on Home Assistant websocket: Error: Unexpected server response: 502
Home Assistant: connection attempt 1/0
Error on Home Assistant websocket: Error: Unexpected server response: 502
Home Assistant: connection attempt 1/0
Error on Home Assistant websocket: Error: Unexpected server response: 502
Home Assistant: connection attempt 1/0
Loaded class definition for com.bing, module type: org.thingpedia.v2, version: 50
Loaded class definition for io.home-assistant, module type: org.thingpedia.v2, version: 22
Loaded class definition for com.bing, module type: org.thingpedia.v2, version: 50
Loaded class definition for io.home-assistant, module type: org.thingpedia.v2, version: 22
Loaded class definition for com.bing, module type: org.thingpedia.v2, version: 50
Loaded class definition for io.home-assistant, module type: org.thingpedia.v2, version: 22
Loaded class definition for com.bing, module type: org.thingpedia.v2, version: 50
Loaded class definition for io.home-assistant, module type: org.thingpedia.v2, version: 22
Loaded class definition for com.bing, module type: org.thingpedia.v2, version: 50
Loaded class definition for io.home-assistant, module type: org.thingpedia.v2, version: 22

Additional information

image

image

github-actions[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

niemyjski commented 3 years ago

This is still a major issue

github-actions[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

niemyjski commented 2 years ago

Still an issue

github-actions[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

niemyjski commented 2 years ago

Still an issue

l-heemann commented 2 years ago

I am having the same issue image c6RmdXp

I don't see these though so they might be unrelated?

Error on Home Assistant websocket: Error: Unexpected server response: 502
Home Assistant: connection attempt 1/0
github-actions[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

niemyjski commented 2 years ago

This is still an issue

dpedestrian commented 2 years ago

I have disabled almost for the time being so I don't have to hear it say hello to me every 16 hours and avoid the load spikes although they are minimal aside from the memory growth.

I have the same issue with almond 2.0.1 I don't have "Ada" installed if that helps at all.

core-2022.2.0 supervisor-2022.01.01 hassos 7.2

Logs show the Unhandled entity errors similarly, but I haven't seen the 502 error responses.

Also saw this repeating: BaseDevice.engine is deprecated and should not be used in new code.

Memory use goes up near 50% (~2GB varies) and crashes starting the whole process over again. Entertainingly it announces the crash via the audible "hello". I'll have to catch the crash error again and post it, but this is very obviously a memory leak. Thankfully it doesn't seem to spike the CPU load much except during restart.

dpedestrian commented 2 years ago

FYI for anyone watching this. It seems Almond will be deprecated based on what I found here. 1.0 Release (Codename "Hey, Genie") | Genie Wiki

Also, I am going to look for this issue here: Issues - stanford-oval/genie-server

Edit: Memory increases until kernel crash - issue #43

mueslo commented 2 years ago

IMG_20220210_110750.jpg same issue, you can see when I installed almond 2 days ago and how it continuously leaks memory until I had to hard reset my raspberry pi.

github-actions[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

niemyjski commented 2 years ago

Still an issue

github-actions[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

niemyjski commented 2 years ago

Still an issue

github-actions[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

niemyjski commented 2 years ago

Still an issue

github-actions[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

niemyjski commented 2 years ago

Still an issue

mdegat01 commented 2 years ago

@niemyjski So you're welcome to keep this open indefinitely but this addon is just repackaging the genie (formerly almond) service. If there is a memory leak it needs to be submitted and fixed here. And from the post above it looks like it already has been submitted: https://github.com/stanford-oval/genie-server/issues/43

I would recommend bumping that issue if you are experiencing this. Once it is fixed in genie we can merge the new version but that's all we can really do here.

github-actions[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.