Skip to content

Fix exception that asyncio throws on GC #5851

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

Closed
wants to merge 1 commit into from

Conversation

andrey-git
Copy link
Contributor

Description:

check_config script, which is now run during restart prints an exception due to asyncio/python bug: python/asyncio#456

Exception ignored in: <bound method _UnixSelectorEventLoop.__del__ of <_UnixSelectorEventLoop running=False closed=True debug=False>>
Traceback (most recent call last):
  File "/srv/hass/lib/python3.4/site-packages/asyncio/base_events.py", line 361, in __del__
  File "/srv/hass/lib/python3.4/site-packages/asyncio/unix_events.py", line 57, in close
  File "/srv/hass/lib/python3.4/site-packages/asyncio/unix_events.py", line 138, in remove_signal_handler
TypeError: signal handler must be signal.SIG_IGN, signal.SIG_DFL, or a callable object

This PR works around it by closing the asyncio loop before exit.

@mention-bot
Copy link

@andrey-git, thanks for your PR! By analyzing the history of the files in this pull request, we identified @rmkraus, @balloob and @jaharkes to be potential reviewers.

@pvizeli
Copy link
Member

pvizeli commented Feb 10, 2017

I can fix it without Workaround :) We Need mock the helper/Signal.py on check_config script and the Problem go away. This also not correct works on windows while we not use the default loop.

@pvizeli pvizeli mentioned this pull request Feb 10, 2017
@andrey-git andrey-git deleted the asyncio branch February 12, 2017 17:50
@home-assistant home-assistant locked and limited conversation to collaborators May 19, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants