GeezerVison is showing github.com — Revert "gh-129005: _pyio.BufferedIO remove copy on readall (#129454)" by cmaloney · Pull Request #129500 · python/cpython
Conversation
cmaloney
commented
Jan 31, 2025
•
edited by bedevere-app
Bot
Loading
Uh oh!
There was an error while loading. Please reload this page.
This reverts commit e1c4ba9.
This seems to be the commit where bots started failing. Not sure why.
cc: @vstinner
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Ok, let's revert until the issue is understood and fixed.
|
cmaloney reacted with thumbs up emoji
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Example of failure, PPC64LE Fedora Stable 3.x: https://buildbot.python.org/#/builders/90/builds/5505
ERROR: test_nonblock_pipe_write_bigbuf (test.test_io.PyMiscIOTest.test_nonblock_pipe_write_bigbuf)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-ppc64le/build/Lib/_pyio.py", line 1250, in write
self._flush_unlocked()
~~~~~~~~~~~~~~~~~~~~^^
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-ppc64le/build/Lib/_pyio.py", line 1282, in _flush_unlocked
raise BlockingIOError(
errno.EAGAIN,
"write could not complete without blocking", 0)
BlockingIOError: [Errno 11] write could not complete without blocking
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-ppc64le/build/Lib/test/test_io.py", line 4453, in _test_nonblock_pipe_write
wf.write(msg)
~~~~~~~~^^^^^
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-ppc64le/build/Lib/_pyio.py", line 1258, in write
raise BlockingIOError(e.errno, e.strerror, written)
BlockingIOError: [Errno 11] write could not complete without blocking
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-ppc64le/build/Lib/_pyio.py", line 1250, in write
self._flush_unlocked()
~~~~~~~~~~~~~~~~~~~~^^
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-ppc64le/build/Lib/_pyio.py", line 1282, in _flush_unlocked
raise BlockingIOError(
errno.EAGAIN,
"write could not complete without blocking", 0)
BlockingIOError: [Errno 11] write could not complete without blocking
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-ppc64le/build/Lib/test/test_io.py", line 4462, in _test_nonblock_pipe_write
wf.write(msg)
~~~~~~~~^^^^^
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-ppc64le/build/Lib/_pyio.py", line 1258, in write
raise BlockingIOError(e.errno, e.strerror, written)
BlockingIOError: [Errno 11] write could not complete without blocking
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-ppc64le/build/Lib/test/test_io.py", line 4421, in test_nonblock_pipe_write_bigbuf
self._test_nonblock_pipe_write(16*1024)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-ppc64le/build/Lib/test/test_io.py", line 4446, in _test_nonblock_pipe_write
with rf, wf:
^^
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-ppc64le/build/Lib/_pyio.py", line 482, in __exit__
self.close()
~~~~~~~~~~^^
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-ppc64le/build/Lib/_pyio.py", line 1309, in close
self.flush()
~~~~~~~~~~^^
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-ppc64le/build/Lib/_pyio.py", line 1270, in flush
self._flush_unlocked()
~~~~~~~~~~~~~~~~~~~~^^
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-ppc64le/build/Lib/_pyio.py", line 1282, in _flush_unlocked
raise BlockingIOError(
errno.EAGAIN,
"write could not complete without blocking", 0)
BlockingIOError: [Errno 11] write could not complete without blocking
======================================================================
ERROR: test_nonblock_pipe_write_smallbuf (test.test_io.PyMiscIOTest.test_nonblock_pipe_write_smallbuf)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-ppc64le/build/Lib/_pyio.py", line 1250, in write
self._flush_unlocked()
~~~~~~~~~~~~~~~~~~~~^^
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-ppc64le/build/Lib/_pyio.py", line 1282, in _flush_unlocked
raise BlockingIOError(
errno.EAGAIN,
"write could not complete without blocking", 0)
BlockingIOError: [Errno 11] write could not complete without blocking
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-ppc64le/build/Lib/test/test_io.py", line 4453, in _test_nonblock_pipe_write
wf.write(msg)
~~~~~~~~^^^^^
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-ppc64le/build/Lib/_pyio.py", line 1258, in write
raise BlockingIOError(e.errno, e.strerror, written)
BlockingIOError: [Errno 11] write could not complete without blocking
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-ppc64le/build/Lib/_pyio.py", line 1250, in write
self._flush_unlocked()
~~~~~~~~~~~~~~~~~~~~^^
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-ppc64le/build/Lib/_pyio.py", line 1282, in _flush_unlocked
raise BlockingIOError(
errno.EAGAIN,
"write could not complete without blocking", 0)
BlockingIOError: [Errno 11] write could not complete without blocking
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-ppc64le/build/Lib/test/test_io.py", line 4462, in _test_nonblock_pipe_write
wf.write(msg)
~~~~~~~~^^^^^
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-ppc64le/build/Lib/_pyio.py", line 1258, in write
raise BlockingIOError(e.errno, e.strerror, written)
BlockingIOError: [Errno 11] write could not complete without blocking
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-ppc64le/build/Lib/test/test_io.py", line 4427, in test_nonblock_pipe_write_smallbuf
self._test_nonblock_pipe_write(1024)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-ppc64le/build/Lib/test/test_io.py", line 4446, in _test_nonblock_pipe_write
with rf, wf:
^^
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-ppc64le/build/Lib/_pyio.py", line 482, in __exit__
self.close()
~~~~~~~~~~^^
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-ppc64le/build/Lib/_pyio.py", line 1309, in close
self.flush()
~~~~~~~~~~^^
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-ppc64le/build/Lib/_pyio.py", line 1270, in flush
self._flush_unlocked()
~~~~~~~~~~~~~~~~~~~~^^
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-ppc64le/build/Lib/_pyio.py", line 1282, in _flush_unlocked
raise BlockingIOError(
errno.EAGAIN,
"write could not complete without blocking", 0)
BlockingIOError: [Errno 11] write could not complete without blocking
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
The test does a lot of writes until it blocks, catches that exception, then does a "readall" from the pipe (to get it so a write shouldn't block) followed by a small write of "BLOCKED" which is expected to never block. That write blocks, which raises an exception and gets the pile of stack traces. As the test exits, close / flush happens on each of the objects which tries to flush the buffers, resulting in more writes, which also block (and get to the full set of exceptions).
Makes it feel to me like either the .read() / .readall() isn't emptying the pipe, or the fact the pipe is no longer full isn't updating before the next write() occurs. Nothing concrete though. The shortcut made a bit faster, but I'm pretty sure _io.BufferedIO is still faster than _pyio.BufferedIO, and _io.BufferedIO is also run through this test...)
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|