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 — ThreadSanitizer: data race in _struct module initialization with InterpreterPoolExecutor (free-threading build) · Issue #140260 · python/cpython Closed Labels extension-modulesC modules in the Modules dirC modules in the Modules dirinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)topic-subinterpreterstype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error DescriptionBug reportBug description:ThreadSanitizer detects a data race when using The race occurs at:
Both threads are executing through How to ReproduceBuild configuration: CC=clang CXX=clang++ ./configure --with-thread-sanitizer --with-pydebug --enable-experimental-jit=yes --with-lto=full --with-tail-call-interp --disable-gil make -j Run command: TSAN_OPTIONS=handle_segv=0 ./python -X dev -X showrefcount bug.py Test script (bug.py): from concurrent.futures import InterpreterPoolExecutor from functools import lru_cache @lru_cache(maxsize=512) def fib(n): """Function that JIT will compile""" if n < 2: return n return fib(n-1) + fib(n-2) if __name__ == '__main__': with InterpreterPoolExecutor() as t: for i in range(2): t.submit(fib, i) Note: The race occurs with any loop iteration count (range(1), range(2), etc.) TSAN OutputEnvironment
Additional InformationA second similar data race is also reported for another write in Both races involve 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 dirinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)topic-subinterpreterstype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error Projects
MilestoneRelationshipsDevelopmentIssue 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. |