[issue19293] test_asyncio hanging for 1 hour

Guido van Rossum report at bugs.python.org
Sun Oct 20 10:42:09 CEST 2013


Guido van Rossum added the comment:

> Apparently, the stdout pipe was closed by the parent process

Could it be that selecting for *read* on the *write* end of a pipe is
always ready? In _UnixWritePipeTransport there's a read handler that
immediately closes the pipe as soon as it called. I vaguely remember a
discussion on python-tulip that this might be Linux-specific behavior. (The
reason is that otherwise you can't find out whether the other end was
closed unless you attempt to write to the pipe.)

To test this theory, it should be sufficient to comment out line 280

self._loop.add_reader(self._fileno, self._read_ready)

from unix_events.py. This will make test_subprocess_kill() hang but it
should not affect test_subprocess_interactive. (So it is not a fix, just a
way to confirm the theory.)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue19293>
_______________________________________


More information about the Python-bugs-list mailing list