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 — Crash when a callable iterator is shared between threads · Issue #161792 · python/cpython Open Labels interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)topic-free-threadingtype-crashA hard crash of the interpreter, possibly with a core dumpA hard crash of the interpreter, possibly with a core dump DescriptionCrash reportWhat happened?In the free-threaded build, an
Reproducer (segfaults within a few seconds on a free-threaded release build of main): import threading N = 2000 def worker(its, barrier): barrier.wait() for it in its: for _ in it: pass for _ in range(200): # Each iterator holds the only reference to its callable. its = [iter(lambda: None, None) for _ in range(N)] barrier = threading.Barrier(4) threads = [threading.Thread(target=worker, args=(its, barrier)) for _ in range(4)] for t in threads: t.start() for t in threads: t.join() The default (GIL) build is not affected. CPython versions tested on:CPython main branch Operating systems tested on:Linux Output from running 'python -VV' on the command line:No response Linked PRsActivity
MetadataMetadataAssigneesLabelsinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)topic-free-threadingtype-crashA hard crash of the interpreter, possibly with a core dumpA hard crash of the interpreter, possibly with a core dump 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. |