| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
In `_io__Buffered_flush_impl` the macro `CHECK_CLOSED` is used to check the `buffered*` is in a good state to be flushed. That differs slightly from `buffered_closed`. In some cases, that difference would result in `close()` thinking the file needed to be flushed and closed while `flush()` thought the file was already closed. This could happen during GC and would result in an unraisable exception.
|
For this, I also looked at resolving two other ways:
|
Sorry, something went wrong.
|
!buildbot PPC64LE.Fedora.Stable.LTO |
Sorry, something went wrong.
|
🤖 New build scheduled with the buildbot fleet by @encukou for commit 60fe309 🤖 Results will be shown at: https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F138724%2Fmerge The command will test the builders whose names match following regular expression: PPC64LE.Fedora.Stable.LTO The builders matched are:
|
Sorry, something went wrong.
There was a problem hiding this comment.
Thank you! This looks like a correct change.
Sorry, something went wrong.
| # gh-138720: C BufferedRWPair would destruct in a bad order resulting in | ||
| # an unraisable exception. | ||
| support.gc_collect() | ||
|
|
There was a problem hiding this comment.
Is this still necessary?
Sorry, something went wrong.
There was a problem hiding this comment.
The test is way more likely to triggered the issue (fixed behavior) with this change.
Sorry, something went wrong.
There was a problem hiding this comment.
On my dev box (64 bit archlinux) adding the explicit GC takes this from "one in a hundred" -> every time
Sorry, something went wrong.
There was a problem hiding this comment.
OK! I couldn't reproduce it myself, but I'll trust the buildbots :)
Sorry, something went wrong.
|
Should we backport this bugfix? |
Sorry, something went wrong.
|
Can you reproduce it on previous versions? If so, please backport :) |
Sorry, something went wrong.
Oh. I'm unable to reproduce the issue on 3.14. |
Sorry, something went wrong.
|
The code has been the same since the C I/O implementation was added; unless/until someone has an issue on older versions I wouldn't backport. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
In _io__Buffered_flush_impl the macro CHECK_CLOSED is used to check the buffered* is in a good state to be flushed. That differs slightly from buffered_closed.
In some cases, that difference would result in close() (_io__Buffered_close_impl) thinking the file needed to be flushed and closed while flush() thought the file was already closed.
This could happen during GC and would result in an unraisable exception.