home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
69.03k stars 28.28k forks source link

minecraft_server integration does blocking I/O in the event loop to import modules #116854

Open def1149 opened 1 week ago

def1149 commented 1 week ago

The problem

Logger: homeassistant.util.loop Source: util/loop.py:99 First occurred: 8:08:58 AM (2 occurrences) Last logged: 8:09:04 AM

Detected blocking call to import_module inside the event loop by integration 'minecraft_server' at homeassistant/components/minecraft_server/api.py, line 78: self._server = await JavaServer.async_lookup(self._address) (offender: /usr/local/lib/python3.12/site-packages/dns/rdata.py, line 660: mod = import_module(), please create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+minecraft_server%22

What version of Home Assistant Core has the issue?

2024.5.1

What was the last working version of Home Assistant Core?

??

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Mincraft

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

home-assistant[bot] commented 1 week ago

Hey there @elmurato, mind taking a look at this issue as it has been labeled with an integration (minecraft_server) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `minecraft_server` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign minecraft_server` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


minecraft_server documentation minecraft_server source (message by IssueLinks)

home-assistant[bot] commented 1 week ago

Hey there @asymworks, mind taking a look at this issue as it has been labeled with an integration (airnow) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `airnow` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign airnow` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


airnow documentation airnow source (message by IssueLinks)

bdraco commented 1 week ago

Please open a separate issue for the airnow problem as once the minecraft codeowner fixes the problem, this issue will get closed and its likely the airnow code owner may miss it.

Detected blocking call to import_module inside the event loop by integration 'airnow' at homeassistant/components/airnow/sensor.py, line 87: .replace(tzinfo=get_time_zone(data[ATTR_API_REPORT_TZ])) (offender: /usr/local/lib/python3.12/importlib/resources/_common.py, line 82: return importlib.import_module(cand)), please create a bug report at [home-assistant/core/issues (is:open label:"integration: airnow")](https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+airnow%22+sort%3Aupdated-desc)
def1149 commented 1 week ago

Didn't notice that there were two similar issues

elmurato commented 1 week ago

@home-assistant rename minecraft_server integration does blocking I/O in the event loop to import modules

elmurato commented 1 week ago

Looks like the root cause of this warning is in dnspython. Will ask the mcstatus devs if my assumption is correct...

elmurato commented 1 week ago

After a discussion with one of the mcstatus devs, this really looks like a problem in dnspython. Reported an issue over there: https://github.com/rthalley/dnspython/issues/1083 Let's see if this is something which can be fixed there...

elmurato commented 1 week ago

@home-assistant add-label problem in dependency