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 — SIGSEGV with generators in free-threaded build · Issue #120321 · python/cpython Closed Labels 3.15bugs and security fixesbugs and security fixesinterpreter-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?Trying to iterate on a generator from multiple threads under the free-threaded build results in a segmentation fault. Here is a minimal repro: import concurrent.futures def gen(): while True: yield it = gen() with concurrent.futures.ThreadPoolExecutor() as executor: while True: _ = executor.submit(lambda: next(it)) The issue seems to be specific to generators as other kinds of iterators work well in parallel. CPython versions tested on:CPython main branch Operating systems tested on:Linux Output from running 'python -VV' on the command line:Python 3.14.0a0 experimental free-threading build (heads/main:c3b6dbff2c, Jun 10 2024, 16:54:16) [GCC 11.4.0] Linked PRs
Reacted by Michał Szołucha and Yongtao Huang Activity
MetadataMetadataAssigneesLabels3.15bugs and security fixesbugs and security fixesinterpreter-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. |