core: Dramatic increase in the number of "Error doing job: Task was destroyed but it is pending!" errors
The problem
I started seeing periodic Error doing job: Task was destroyed but it is pending! messages in 0.114.x, but now I see them pretty regularly with 0.115.0b0, and from different components. I’ll start disabling my custom components, but wanted to get this in in case others are seeing something similar.
Environment
- Home Assistant Core release with the issue: 0.115.0b0
- Last working Home Assistant Core release (if known): 0.113
- Operating environment (OS/Container/Supervised/Core): OS
- Integration causing this issue: Various - recorder, MainThread
- Link to integration documentation on our website: N/A
Problem-relevant configuration.yaml
Without knowing what’s involved in these errors, it’s hard to pick out what might be relevant from configuration.yaml.
Traceback/Error logs
Lots of these logs. I see “recorder” involved (I’m using the MariaDB addon, which is otherwise working fine), MainThread, and Thread-3 in here. There’s no obvious context around the messages to indicate what’s causing them. I can try turning debug on later today.
2020-09-08 09:00:18 ERROR (Recorder) [homeassistant] Error doing job: Task was destroyed but it is pending!
2020-09-08 09:08:39 ERROR (MainThread) [homeassistant] Error doing job: Task was destroyed but it is pending!
2020-09-08 09:09:09 ERROR (Recorder) [homeassistant] Error doing job: Task was destroyed but it is pending!
2020-09-08 09:11:09 ERROR (Recorder) [homeassistant] Error doing job: Task was destroyed but it is pending!
2020-09-08 09:12:39 ERROR (Recorder) [homeassistant] Error doing job: Task was destroyed but it is pending!
2020-09-08 09:13:29 ERROR (Recorder) [homeassistant] Error doing job: Task was destroyed but it is pending!
2020-09-08 09:13:39 ERROR (MainThread) [homeassistant] Error doing job: Task was destroyed but it is pending!
2020-09-08 09:13:59 ERROR (Recorder) [homeassistant] Error doing job: Task was destroyed but it is pending!
2020-09-08 09:19:59 ERROR (Recorder) [homeassistant] Error doing job: Task was destroyed but it is pending!
2020-09-08 09:20:39 ERROR (Recorder) [homeassistant] Error doing job: Task was destroyed but it is pending!
2020-09-08 09:20:49 ERROR (Recorder) [homeassistant] Error doing job: Task was destroyed but it is pending!
2020-09-08 09:25:29 ERROR (MainThread) [homeassistant] Error doing job: Task was destroyed but it is pending!
2020-09-08 09:30:30 INFO (MainThread) [homeassistant.components.automation.keep_water_hot] Keep Water Hot: Running automation actions
2020-09-08 09:30:30 INFO (MainThread) [homeassistant.components.automation.keep_water_hot] Keep Water Hot: Executing step call service
2020-09-08 09:31:59 ERROR (Recorder) [homeassistant] Error doing job: Task was destroyed but it is pending!
2020-09-08 09:34:29 ERROR (Recorder) [homeassistant] Error doing job: Task was destroyed but it is pending!
2020-09-08 09:36:39 ERROR (MainThread) [homeassistant] Error doing job: Task was destroyed but it is pending!
2020-09-08 09:39:59 ERROR (Recorder) [homeassistant] Error doing job: Task was destroyed but it is pending!
2020-09-08 09:40:49 ERROR (Recorder) [homeassistant] Error doing job: Task was destroyed but it is pending!
2020-09-08 09:44:29 ERROR (MainThread) [homeassistant] Error doing job: Task was destroyed but it is pending!
2020-09-08 09:45:30 INFO (MainThread) [homeassistant.components.automation.keep_water_hot] Keep Water Hot: Running automation actions
2020-09-08 09:45:30 INFO (MainThread) [homeassistant.components.automation.keep_water_hot] Keep Water Hot: Executing step call service
2020-09-08 09:47:09 ERROR (MainThread) [homeassistant] Error doing job: Task was destroyed but it is pending!
2020-09-08 09:50:09 ERROR (MainThread) [homeassistant] Error doing job: Task was destroyed but it is pending!
2020-09-08 09:51:49 ERROR (MainThread) [homeassistant] Error doing job: Task was destroyed but it is pending!
2020-09-08 09:52:49 ERROR (Recorder) [homeassistant] Error doing job: Task was destroyed but it is pending!
2020-09-08 10:00:39 ERROR (Recorder) [homeassistant] Error doing job: Task was destroyed but it is pending!
2020-09-08 10:04:39 ERROR (Recorder) [homeassistant] Error doing job: Task was destroyed but it is pending!
2020-09-08 10:06:09 ERROR (Recorder) [homeassistant] Error doing job: Task was destroyed but it is pending!
2020-09-08 10:07:59 ERROR (MainThread) [homeassistant] Error doing job: Task was destroyed but it is pending!
2020-09-08 10:08:59 ERROR (Recorder) [homeassistant] Error doing job: Task was destroyed but it is pending!
sequence
2020-09-08 10:12:29 ERROR (MainThread) [homeassistant] Error doing job: Task was destroyed but it is pending!
2020-09-08 10:12:39 ERROR (Recorder) [homeassistant] Error doing job: Task was destroyed but it is pending!
2020-09-08 10:13:29 ERROR (Thread-3) [homeassistant] Error doing job: Task was destroyed but it is pending!
2020-09-08 10:14:49 ERROR (MainThread) [homeassistant] Error doing job: Task was destroyed but it is pending!
2020-09-08 10:17:29 ERROR (MainThread) [homeassistant] Error doing job: Task was destroyed but it is pending!
2020-09-08 10:19:29 ERROR (Recorder) [homeassistant] Error doing job: Task was destroyed but it is pending!
2020-09-08 10:19:59 ERROR (MainThread) [homeassistant] Error doing job: Task was destroyed but it is pending!
Additional information
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 25 (22 by maintainers)
I’ll continue to try to narrow it down. I ruled out all of my custom components as the cause last night.
It would be really nice if there was a “disable” option for integrations, either in Configuration->Integrations or, for a more complete list, in Configuration->Info next to the issues/documentation links. It used to be simple to comment things out in configuration.yaml, but the UI-based config flow often requires a time-consuming process of removing and re-configuring an integration just for a quick test. The easiest alternative that I’ve found so far is to edit core.config_entries and add a “-1” or similar to the domain for the integrations that I want to disable, but that’s pretty hacky. There’s a feature request for this somewhere in the forum that I can’t find right now.
That seems to be easier said than done. I commented out my
recorder:definition,default_config:, and everything that I thought used it and it’s still being setup by something. This is what I’m using instead ofdefault_config:now:I’m still seeing the errors after restarting with that, both a few during startup and then periodically thereafter.
I have a suspicion that it’s related to AppDaemon and some of the automations that interact with entities manipulated by both, but I haven’t been able to confirm it definitively. I’ll keep poking around.