Skip to content
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

Blocking Call to load_default_certs in SmartThinq Sensors Causes Performance Issues in Home Assistant #793

Closed
cloudbr34k84 opened this issue Sep 9, 2024 · 4 comments

Comments

@cloudbr34k84
Copy link

Describe the Bug
The custom integration smartthinq_sensors is making a blocking call to ssl.create_default_context() inside the Home Assistant event loop, which leads to performance degradation. The operation to load default SSL certificates should be asynchronous to prevent blocking the event loop.

Expected Behavior
The integration should load SSL certificates asynchronously without causing blocking operations that affect Home Assistant's performance.

Screenshots
No applicable screenshots for this issue.

Environment Details:

Environment (HASSIO, Raspbian, etc): HASSIO
Home Assistant version installed: 2024.9.1
Component version installed: 0.39.2
Last known working version: Not sure
LG device type and model with issue: RC90V9_AUS-Dryer (DRYER), F_V7_Y___W.A__QEUK-FL (WASHER)
by LG

Logs

Logger: homeassistant.util.loop
Source: util/loop.py:136
First occurred: 3:40:10 pm (1 occurrences)

Detected blocking call to load_default_certs with args (<ssl.SSLContext object at 0x7f0ef7dff0d0>, <Purpose.SERVER_AUTH: _ASN1Object(nid=129, shortname='serverAuth', longname='TLS Web Server Authentication', oid='1.3.6.1.5.5.7.3.1')>) inside the event loop by custom integration 'smartthinq_sensors' at custom_components/smartthinq_sensors/wideq/core_async.py, line 149: context = ssl.create_default_context() (offender: /usr/local/lib/python3.12/ssl.py, line 713: context.load_default_certs(purpose)), please create a bug report at https://github.com/ollo69/ha-smartthinq-sensors/issues
@McGiverGim
Copy link

I can confirm the issue, I have seen the same error message.

@McGiverGim
Copy link

I think this PR fixes the issue? #791

If yes, this this is a duplicate of #790

@cloudbr34k84
Copy link
Author

Ok will wait, thankyou

@ollo69
Copy link
Owner

ollo69 commented Oct 6, 2024

Closed by #791

@ollo69 ollo69 closed this as completed Oct 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants