-
Notifications
You must be signed in to change notification settings - Fork 46
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
[Bug]: warning messages in system log about asyncio_blocking_operations #302
Comments
@RenfoJu1 is it a big or only.warnings. please do not report warnings as a bug. |
just followed the instructions in the log: |
@RenfoJu1 this comes from the homeassistant team. |
@RenfoJu1 homeassistant is became a nightmare with all there platform changes. This warning you get comes from a crypto lib. So we can not do anything except ignoring the message. |
ok thanks |
@RenfoJu1 I tried to get the same message like you got. But I can not reproduce it. Do you have the latest pyloxone? |
The version I had was 0.6.14, but now upgraded to 0.6.15 and there is no difference. I have in fact 2 loxone setups in 2 different homes, one of which is gen 1 and the other is gen 2. Both have the same messages. I am running both in Proxmox virtualization environment installed with proxmox helper scripts (HAOS 13.1), but not sure if it is relevant or not. Otherwise they seem to work the same as rasperry pi for example. I have not noticed any drawbacks other to those messages in logs. |
@RenfoJu1 this is only a warning. But as I said I cannot reproduce it. The message is from the home assistant team itself. They want us to use async functions so the home assistant is not blocked by one integration. This could last in a slow home assistant experience. But they exaggerate it with these messages. I have hundreds of these messages from other integrations. What log settings do you have setup? I first want to get this message on my system before I try to fix it. What I can do is suppress these messages. I cannot fix it because it comes from a crypto library which I use. |
Sure, makes sense. I have not made any changes to my log settings, so it is what you get by default when installing a new instance. |
@JoDehli I also have HA log full of these warnings. |
@johny-mnemonic update to the newest version of pyloxone. |
@johny-mnemonic this merge has nothing to do with you logs. The logs are removed some releases ago. Please try to uninstall and instal pyloxone. In the past we had problems with hacks not updating to the newest release. At the moment I have on my system not log messages and I have the latest release installed. |
@JoDehli I know, but getting rid of those pending repairs was more important to me than these warnings in logs. So far I had been too lazy to switch to the master branch though. |
@johny-mnemonic the warnings from the crypto lib will stay until they change something in the library. It is strange that on my dev installation I cannot reproduce the warning but on my local installation I have one log entry. But it is very small and does not bother me. |
Describe the bug
In system log file there are a group of warnings, see log for details
Firmware of your Miniserver
15.0.5.29
HomeAssistant install method
Home Assistant OS (13.1) on Proxmox 8.2.4
Version of HomeAssistant
Core 2024.9.0
Supervisor 2024.08.0
Operating System 13.1
Frontend 20240904.0
Version of Pyloxone
0.6.14
Update pyloxone
already latest(?)
Log
2024-09-05 15:59:43.462 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to open with args ('/lib/gmp', 'rb') inside the event loop by custom integration 'loxone' at custom_components/loxone/api.py, line 852: from Crypto.PublicKey import RSA (offender: /usr/local/lib/python3.12/ctypes/util.py, line 276: with open(filepath, 'rb') as fh:), please create a bug report at https://github.com/JoDehli/PyLoxone/issues
For developers, please see https://developers.home-assistant.io/docs/asyncio_blocking_operations/#open
Traceback (most recent call last):
File "", line 198, in _run_module_as_main
File "", line 88, in _run_code
File "/usr/src/homeassistant/homeassistant/main.py", line 223, in
sys.exit(main())
File "/usr/src/homeassistant/homeassistant/main.py", line 209, in main
exit_code = runner.run(runtime_conf)
File "/usr/src/homeassistant/homeassistant/runner.py", line 189, in run
return loop.run_until_complete(setup_and_run_hass(runtime_config))
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 674, in run_until_complete
self.run_forever()
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 641, in run_forever
self._run_once()
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1990, in _run_once
handle._run()
File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run
self._context.run(self._callback, *self._args)
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 752, in async_setup_locked
await self.async_setup(hass, integration=integration)
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 604, in async_setup
result = await component.async_setup_entry(hass, self)
File "/config/custom_components/loxone/init.py", line 415, in async_setup_entry
res = await miniserver.start_ws()
File "/config/custom_components/loxone/miniserver.py", line 123, in start_ws
res = await self.api.async_init()
File "/config/custom_components/loxone/api.py", line 393, in async_init
rsa_gen = self.init_rsa_cipher()
File "/config/custom_components/loxone/api.py", line 852, in init_rsa_cipher
from Crypto.PublicKey import RSA
2024-09-05 15:59:43.463 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to glob with args ('/lib/libgmp.so',) inside the event loop by custom integration 'loxone' at custom_components/loxone/api.py, line 852: from Crypto.PublicKey import RSA (offender: /usr/local/lib/python3.12/ctypes/util.py, line 302: for f in glob('{0}{1}'.format(prefix, suffix)):), please create a bug report at https://github.com/JoDehli/PyLoxone/issues
For developers, please see https://developers.home-assistant.io/docs/asyncio_blocking_operations/#glob
Traceback (most recent call last):
File "", line 198, in _run_module_as_main
File "", line 88, in _run_code
File "/usr/src/homeassistant/homeassistant/main.py", line 223, in
sys.exit(main())
File "/usr/src/homeassistant/homeassistant/main.py", line 209, in main
exit_code = runner.run(runtime_conf)
File "/usr/src/homeassistant/homeassistant/runner.py", line 189, in run
return loop.run_until_complete(setup_and_run_hass(runtime_config))
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 674, in run_until_complete
self.run_forever()
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 641, in run_forever
self._run_once()
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1990, in _run_once
handle._run()
File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run
self._context.run(self._callback, *self._args)
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 752, in async_setup_locked
await self.async_setup(hass, integration=integration)
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 604, in async_setup
result = await component.async_setup_entry(hass, self)
File "/config/custom_components/loxone/init.py", line 415, in async_setup_entry
res = await miniserver.start_ws()
File "/config/custom_components/loxone/miniserver.py", line 123, in start_ws
res = await self.api.async_init()
File "/config/custom_components/loxone/api.py", line 393, in async_init
rsa_gen = self.init_rsa_cipher()
File "/config/custom_components/loxone/api.py", line 852, in init_rsa_cipher
from Crypto.PublicKey import RSA
2024-09-05 15:59:43.465 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to iglob with args ('/lib/libgmp.so',) inside the event loop by custom integration 'loxone' at custom_components/loxone/api.py, line 852: from Crypto.PublicKey import RSA (offender: /usr/local/lib/python3.12/glob.py, line 28: return list(iglob(pathname, root_dir=root_dir, dir_fd=dir_fd, recursive=recursive,), please create a bug report at https://github.com/JoDehli/PyLoxone/issues
For developers, please see https://developers.home-assistant.io/docs/asyncio_blocking_operations/#iglob
Traceback (most recent call last):
File "", line 198, in _run_module_as_main
File "", line 88, in _run_code
File "/usr/src/homeassistant/homeassistant/main.py", line 223, in
sys.exit(main())
File "/usr/src/homeassistant/homeassistant/main.py", line 209, in main
exit_code = runner.run(runtime_conf)
File "/usr/src/homeassistant/homeassistant/runner.py", line 189, in run
return loop.run_until_complete(setup_and_run_hass(runtime_config))
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 674, in run_until_complete
self.run_forever()
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 641, in run_forever
self._run_once()
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1990, in _run_once
handle._run()
File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run
self._context.run(self._callback, *self._args)
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 752, in async_setup_locked
await self.async_setup(hass, integration=integration)
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 604, in async_setup
result = await component.async_setup_entry(hass, self)
File "/config/custom_components/loxone/init.py", line 415, in async_setup_entry
res = await miniserver.start_ws()
File "/config/custom_components/loxone/miniserver.py", line 123, in start_ws
res = await self.api.async_init()
File "/config/custom_components/loxone/api.py", line 393, in async_init
rsa_gen = self.init_rsa_cipher()
File "/config/custom_components/loxone/api.py", line 852, in init_rsa_cipher
from Crypto.PublicKey import RSA
2024-09-05 15:59:43.466 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to scandir with args ('/lib',) inside the event loop by custom integration 'loxone' at custom_components/loxone/api.py, line 852: from Crypto.PublicKey import RSA (offender: /usr/local/lib/python3.12/glob.py, line 160: with os.scandir(arg) as it:), please create a bug report at https://github.com/JoDehli/PyLoxone/issues
For developers, please see https://developers.home-assistant.io/docs/asyncio_blocking_operations/#scandir
Traceback (most recent call last):
File "", line 198, in _run_module_as_main
File "", line 88, in _run_code
File "/usr/src/homeassistant/homeassistant/main.py", line 223, in
sys.exit(main())
File "/usr/src/homeassistant/homeassistant/main.py", line 209, in main
exit_code = runner.run(runtime_conf)
File "/usr/src/homeassistant/homeassistant/runner.py", line 189, in run
return loop.run_until_complete(setup_and_run_hass(runtime_config))
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 674, in run_until_complete
self.run_forever()
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 641, in run_forever
self._run_once()
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1990, in _run_once
handle._run()
File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run
self._context.run(self._callback, *self._args)
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 752, in async_setup_locked
await self.async_setup(hass, integration=integration)
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 604, in async_setup
result = await component.async_setup_entry(hass, self)
File "/config/custom_components/loxone/init.py", line 415, in async_setup_entry
res = await miniserver.start_ws()
File "/config/custom_components/loxone/miniserver.py", line 123, in start_ws
res = await self.api.async_init()
File "/config/custom_components/loxone/api.py", line 393, in async_init
rsa_gen = self.init_rsa_cipher()
File "/config/custom_components/loxone/api.py", line 852, in init_rsa_cipher
from Crypto.PublicKey import RSA
The text was updated successfully, but these errors were encountered: