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
73.71k stars 30.83k forks source link

Detected blocking call to load_default_certs with args #129463

Open MZBjerg opened 2 weeks ago

MZBjerg commented 2 weeks ago

The problem

My HA running on RPI4 has been unstable for a while, rebooting without any visibel reason. I noticed an entry in the log when trying to locate any issues. See log below.

What version of Home Assistant Core has the issue?

core-2024.10.4

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

No response

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?

Logger: homeassistant.util.loop
Source: util/loop.py:77
First occurred: 21:08:20 (1 occurrences)
Last logged: 21:08:20

Detected blocking call to load_default_certs with args (<ssl.SSLContext object at 0x7f663eb250>, <Purpose.SERVER_AUTH: _ASN1Object(nid=129, shortname='serverAuth', longname='TLS Web Server Authentication', oid='1.3.6.1.5.5.7.3.1')>) in /usr/local/lib/python3.12/ssl.py, line 713: context.load_default_certs(purpose) inside the event loop; This is causing stability issues. Please create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue For developers, please see https://developers.home-assistant.io/docs/asyncio_blocking_operations/#load_default_certs Traceback (most recent call last): File "<frozen runpy>", line 198, in _run_module_as_main File "<frozen runpy>", line 88, in _run_code File "/usr/src/homeassistant/homeassistant/__main__.py", line 223, in <module> 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/local/lib/python3.12/site-packages/pyeasee/easee.py", line 321, in _sr_connect_loop await self.sr_connection.run() File "/usr/local/lib/python3.12/site-packages/pysignalr/client.py", line 92, in run await self._transport.run() File "/usr/local/lib/python3.12/site-packages/pysignalr/transport/websocket.py", line 77, in run await self._loop() File "/usr/local/lib/python3.12/site-packages/pysignalr/transport/websocket.py", line 102, in _loop async for conn in connection_loop: File "/usr/local/lib/python3.12/site-packages/pyeasee/easee.py", line 87, in __aiter__ async with self as protocol: File "/usr/local/lib/python3.12/site-packages/websockets/legacy/client.py", line 629, in __aenter__ return await self File "/usr/local/lib/python3.12/site-packages/websockets/legacy/client.py", line 647, in __await_impl_timeout__ return await self.__await_impl__() File "/usr/local/lib/python3.12/site-packages/websockets/legacy/client.py", line 651, in __await_impl__ _transport, _protocol = await self._create_connection() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1149, in create_connection transport, protocol = await self._create_connection_transport( File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1173, in _create_connection_transport transport = self._make_ssl_transport( File "/usr/local/lib/python3.12/asyncio/selector_events.py", line 83, in _make_ssl_transport ssl_protocol = sslproto.SSLProtocol( File "/usr/local/lib/python3.12/asyncio/sslproto.py", line 295, in __init__ sslcontext = _create_transport_context( File "/usr/local/lib/python3.12/asyncio/sslproto.py", line 55, in _create_transport_context sslcontext = ssl.create_default_context() File "/usr/local/lib/python3.12/ssl.py", line 713, in create_default_context context.load_default_certs(purpose)

Additional information

No response

bdraco commented 1 week ago

pyeasee