-
Notifications
You must be signed in to change notification settings - Fork 556
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
Runtime errors when launching many shell subprocesses. #93
Comments
Interesting. Thanks for providing a code to reproduce this, I'll take a look. |
Might be worth doing a couple of things;
FYI, I tested this code on a high spec test rig, found it failed fairly frequently when set to length of
|
@kura Well using /dev/urandom was just a cheap way to open file descriptors and generate data, the same problems appear on my computer with the command "yes | head -c %s" and a length of 10,000,000, even after removing the limits on the number of open file descriptors. |
…s_reading(). Fixes issue #93. Implements python/cpython#528 asyncio change.
Fixed in master. A simple race between transports and high-level asyncio streams. A new uvloop version with a fix will be released soon. |
Here's the code to reproduce those issues:
The exact runtime error raised depends on where I run it:
This raises multiple
RuntimeError: Cannot pause_reading() when closing
:PYTHONASYNCIODEBUG
in env?: yesOn the same system with python 3.5.3 this runtime error isn't raised but the assertion fails.
This raises multiple exceptions such as
RuntimeError: unable to perform operation on <ReadUnixTransport closed=True reading=False 0x7efe0d848d00>; the handler is closed
when using /dev/zero instead of /dev/urandom and only needs 2 parallel subprocesses (1 works):PYTHONASYNCIODEBUG
in env?: yesIt also raises multiple times
RuntimeError: Cannot pause_reading() when closing
ifrun_cmd
is launched 200 times instead of 50. Note that this system is on a server with 16G of RAM, while the first one only has 4G (if that makes any difference).Running the same code with asyncio's default loop works in any case.
The text was updated successfully, but these errors were encountered: