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 — Data race between `resize_buffer_lock_held` and `_Py_DecRefShared` on a shared `BytesIO` buffer · Issue #151640 · python/cpython Closed Labels extension-modulesC modules in the Modules dirC modules in the Modules dirtopic-free-threadingtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error DescriptionBug reportBug description:In the free-threaded build, a whole-buffer Lines 432 to 437 in 9e863fa
so Lines 171 to 178 in 9e863fa
while another thread concurrently decrefs the read-returned reference ( Reproducer: import io from threading import Thread, Barrier shared = io.BytesIO(b'x' * 64) N_W, N_R = 2, 8 barrier = Barrier(N_W + N_R) def writer(): barrier.wait() for i in range(20000): try: shared.seek(0) shared.write(b'a' * (64 + (i & 63))) except Exception: pass def reader(): barrier.wait() for _ in range(20000): try: shared.seek(0) shared.read() except Exception: pass if __name__ == "__main__": threads = [Thread(target=writer) for _ in range(N_W)] threads += [Thread(target=reader) for _ in range(N_R)] for t in threads: t.start() for t in threads: t.join() TSAN Report: CPython versions tested on:CPython main branch Operating systems tested on:Linux Linked PRsActivity
MetadataMetadataAssigneesLabelsextension-modulesC modules in the Modules dirC modules in the Modules dirtopic-free-threadingtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error ProjectsMilestoneRelationshipsDevelopmentIssue actions | ||||||||||||||||||||||||||||
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |