HAsmartirrigation icon indicating copy to clipboard operation
HAsmartirrigation copied to clipboard

Log Warning: Detected blocking call

Open dlindnegm opened this issue 10 months ago • 4 comments

What happened?

Started noticing this warning in my HA logs after upgrading to Core 2024.5.0. No issues with the integration as far as I can tell.

How to reproduce

Core 2024.5.0 Supervisor 2024.04.4 Operating System 12.2

config_entry-smart_irrigation-5154ea7f8196b4cbd9986fbae091721b (1).json

Relevant log output

Logger: homeassistant.util.loop
Source: util/loop.py:99
First occurred: May 2, 2024 at 11:45:00 PM (42 occurrences)
Last logged: May 2, 2024 at 11:45:01 PM

Detected blocking call to import_module inside the event loop by custom integration 'smart_irrigation' at custom_components/smart_irrigation/helpers.py, line 436: mod = importlib.import_module( (offender: /config/custom_components/smart_irrigation/helpers.py, line 436: mod = importlib.import_module(), please create a bug report at https://github.com/jeroenterheerdt/HASmartIrrigation/issues

Which version are you running?

v2024.4.3

Diagnostics file

  • [X] I have attached a diagnostics file

Additional information

No response

dlindnegm avatar May 03 '24 17:05 dlindnegm

Just confirming that I have the same in my logs.

And smart watering has not been working for a few weeks now. I think since from around 4th or 5th April - so maybe when I updated HA to 2024.4.

jata1 avatar May 09 '24 22:05 jata1

A warning should not stop the integration from working. Something else is going on, but I can't see it in the info you provided

jeroenterheerdt avatar May 09 '24 23:05 jeroenterheerdt

Isn't this a change of policy from the Home Assistant team? That they don't want to to have blocking calls in the event loop as this can cause a system wide hickup when this call takes some time to return? I think it is worth to investigate if this blocking call can be done in another way.

wauswaus avatar May 12 '24 18:05 wauswaus

Yes, I am investigating it, but it's not an easy fix.

jeroenterheerdt avatar May 12 '24 19:05 jeroenterheerdt

I am also seeing this FWIW.

Logger: homeassistant.util.loop
Source: util/loop.py:99
First occurred: 1:58:43 PM (15 occurrences)
Last logged: 4:50:16 PM

Detected blocking call to import_module inside the event loop by custom integration 'smart_irrigation' at custom_components/smart_irrigation/helpers.py, line 436: mod = importlib.import_module( (offender: /config/custom_components/smart_irrigation/helpers.py, line 436: mod = importlib.import_module(), please create a bug report at https://github.com/jeroenterheerdt/HASmartIrrigation/issues

david-j-duran avatar May 22 '24 23:05 david-j-duran