Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34k
Closed as duplicate
Closed as duplicate
Copy link
Labels
3.13bugs and security fixesbugs and security fixes3.14bugs and security fixesbugs and security fixes3.15new features, bugs and security fixesnew features, bugs and security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)topic-subinterpreterstype-crashA hard crash of the interpreter, possibly with a core dumpA hard crash of the interpreter, possibly with a core dump
Description
Crash report
What happened?
The following code runs a subinterpreter in a new non-daemon thread, where CTRL+C+C interruption causes an assertion failure on debug builds:
fromconcurrentimportinterpretersdeff(): importtimetime.sleep(100) if__name__=='__main__': interp=interpreters.create() print('press CTRL^C twice:') t=interp.call_in_thread(f) t.join()Assertionfailed: !_PyInterpreterState_IsRunningMain(interp), fileC:\rc\Python\pylifecycle.c, line2516The same assert can be triggered without keystrokes:
importthreadingfromconcurrentimportinterpretersinterp=interpreters.create() t=threading.Thread(target=interp.exec, daemon=True, args=('import time; time.sleep(3)',)) t.start()CPython versions tested on:
3.14.0rc1, CPython main branch: 2a87af0
Operating systems tested on:
Windows
Metadata
Metadata
Assignees
Labels
3.13bugs and security fixesbugs and security fixes3.14bugs and security fixesbugs and security fixes3.15new features, bugs and security fixesnew features, bugs and security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)topic-subinterpreterstype-crashA hard crash of the interpreter, possibly with a core dumpA hard crash of the interpreter, possibly with a core dump
Projects
Status
Done