X Tutup
The Wayback Machine - https://web.archive.org/web/20200906150150/https://github.com/MagicStack/uvloop/issues/351
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

Issue with graceful shutdown #351

Open
healfy opened this issue Jun 17, 2020 · 0 comments
Open

Issue with graceful shutdown #351

healfy opened this issue Jun 17, 2020 · 0 comments

Comments

@healfy
Copy link

@healfy healfy commented Jun 17, 2020

  • uvloop 0.14:
  • Python 3.8.2:
  • Platform Linux:
  • Can you reproduce the bug with PYTHONASYNCIODEBUG in env?: yes
  • Does uvloop behave differently from vanilla asyncio? : yes. vanilla asyncio shutdown correctly

When i send SIGTERM signal to main procces i get this exceptions and it doesnt stop loop
In Python 3.6.1 it work fine, we tried to upgrade to the new version Python

Traceback (most recent call last): File "/home/debian/PycharmProjects/AES/src/aes/core/loop.py", line 109, in _finalize_new_loop _cancel_all_tasks(loop) File "/home/debian/PycharmProjects/AES/src/aes/core/loop.py", line 126, in _cancel_all_tasks loop.run_until_complete( File "uvloop/loop.pyx", line 1450, in uvloop.loop.Loop.run_until_complete File "uvloop/loop.pyx", line 1443, in uvloop.loop.Loop.run_until_complete File "uvloop/loop.pyx", line 1351, in uvloop.loop.Loop.run_forever File "uvloop/loop.pyx", line 480, in uvloop.loop.Loop._run RuntimeError: this event loop is already running.

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "uvloop/cbhandles.pyx", line 68, in uvloop.loop.Handle._run File "/home/debian/PycharmProjects/AES/src/aes/core/loop.py", line 30, in stopper finalize_loop(loop) File "/home/debian/PycharmProjects/AES/src/aes/core/loop.py", line 80, in finalize_loop return _finalize_new_loop(loop) File "/home/debian/PycharmProjects/AES/src/aes/core/loop.py", line 115, in _finalize_new_loop loop.close() File "uvloop/loop.pyx", line 1366, in uvloop.loop.Loop.close File "uvloop/loop.pyx", line 525, in uvloop.loop.Loop._close RuntimeError: Cannot close a running event loop

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.
X Tutup