GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||
GeezerVison is showing github.com — gh-135410: Fix `test_memoryio` refleak buildbots by ZeroIntensity · Pull Request #135430 · python/cpython Conversation
|
|
!buildbot nogil refleak |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
🤖 New build scheduled with the buildbot fleet by @ZeroIntensity for commit b6f2011 🤖 Results will be shown at: https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F135430%2Fmerge The command will test the builders whose names match following regular expression: The builders matched are:
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry for challenging your changes recently, but why don’t we ensure consistent behavior between the pure Python and C versions? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Please hold on: "IMO this change was merged too quickly and I suggest to revert it." #135412 (comment) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
The pure Python will not crash the interpreter while the C implementation can crash and the easiest way to fix the latter is to add critical section. We are trying to fix thread safety in regard to avoid being able to crash the interpreter. Another somewhat related is #130095 where abc's pure Python implementation is not thread safe but it cannot crash the interp so we aren't actively fixing that, rather skipping the pure python tests of it. As for performance, critical sections are optimized for case where single thread acquires it so it is minimal, trying to write to same StringIO object would perform worse but that's not something users should do or we should try to optimize for. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
No worries, I don't take it personally :)
That's effectively what I was trying to do. #135412 was trying to solely fix the segfault. Unfortunately, the only easy way to do that is by slapping a critical section onto I agree with Kumar that this probably won't be noticeable for single-threaded code. I pushed back on locking |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
I know pure Python code doesn’t crash the interpreter, but that’s not the point. The problem is that it behaves differently from the C implementation: the Python version is not thread-safe, while the C version is. We should aim for consistent behavior between them and consider what we’ve done so far toward that goal. That’s why I suggested we revisit our approach to make the behavior consistent between the pure Python and C implementations. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Closing now that the original change has been reverted. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.