Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-88110: clear concurrent.futures.thread._threads_queues after fork#101940

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
marmarek wants to merge3 commits intopython:mainfrommarmarek:bug88110

Conversation

@marmarek
Copy link
Contributor

@marmarekmarmarek commentedFeb 15, 2023
edited by bedevere-bot
Loading

Threads are gone after fork, so clear the queues too. Otherwise the child process (here created via multiprocessing.Process) crashes on interpreter exit with:

Traceback (most recent call last):  File "/usr/lib64/python3.11/multiprocessing/popen_fork.py", line 72, in _launch    code = process_obj._bootstrap(parent_sentinel=child_r)           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  File "/usr/lib64/python3.11/multiprocessing/process.py", line 332, in _bootstrap    threading._shutdown()  File "/usr/lib64/python3.11/threading.py", line 1561, in _shutdown    atexit_call()  File "/usr/lib64/python3.11/concurrent/futures/thread.py", line 31, in _python_exit    t.join()  File "/usr/lib64/python3.11/threading.py", line 1109, in join    raise RuntimeError("cannot join current thread")RuntimeError: cannot join current thread

… forkThreads are gone after fork, so clear the queues too. Otherwise thechild process (here created via multiprocessing.Process) crashes oninterpreter exit with:    Traceback (most recent call last):      File "/usr/lib64/python3.11/multiprocessing/popen_fork.py", line 72, in _launch        code = process_obj._bootstrap(parent_sentinel=child_r)               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^      File "/usr/lib64/python3.11/multiprocessing/process.py", line 332, in _bootstrap        threading._shutdown()      File "/usr/lib64/python3.11/threading.py", line 1561, in _shutdown        atexit_call()      File "/usr/lib64/python3.11/concurrent/futures/thread.py", line 31, in _python_exit        t.join()      File "/usr/lib64/python3.11/threading.py", line 1109, in join        raise RuntimeError("cannot join current thread")    RuntimeError: cannot join current threadFixespython#88110
@bedevere-bot
Copy link

Most changes to Pythonrequire a NEWS entry.

Please add it using theblurb_it web app or theblurb command-line tool.

@arhadthedevarhadthedev added stdlibStandard Library Python modules in the Lib/ directory topic-multiprocessing labelsFeb 16, 2023
@serhiy-storchaka
Copy link
Member

Could you please add tests@marmarek?

@gpshead
Copy link
Member

closing in favor of#126098 which built upon this.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@gpsheadgpsheadAwaiting requested review from gpshead

Assignees

No one assigned

Labels

awaiting reviewstdlibStandard Library Python modules in the Lib/ directorytopic-multiprocessing

Projects

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

6 participants

@marmarek@bedevere-bot@serhiy-storchaka@gpshead@arhadthedev@hauntsaninja

[8]ページ先頭

©2009-2025 Movatter.jp