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

bpo-31310: multiprocessing's semaphore tracker should be launched again if crashed#3247

Merged
pitrou merged 4 commits intopython:masterfrom
pitrou:semaphore_tracker_death
Nov 3, 2017
Merged

bpo-31310: multiprocessing's semaphore tracker should be launched again if crashed#3247
pitrou merged 4 commits intopython:masterfrom
pitrou:semaphore_tracker_death

Conversation

@pitrou
Copy link
Member

@pitroupitrou commentedAug 30, 2017
edited by bedevere-bot
Loading

@pitroupitrou merged commitcbe1756 intopython:masterNov 3, 2017
@pitroupitrou deleted the semaphore_tracker_death branchNovember 3, 2017 13:31
pitrou added a commit to pitrou/cpython that referenced this pull requestNov 3, 2017
…ed again if crashed (pythonGH-3247)* bpo-31310: multiprocessing's semaphore tracker should be launched again if crashed* Avoid mucking with process state in test.Add a warning if the semaphore process died, as semaphores may then be leaked.* Add NEWS entry(cherry picked from commit cbe1756)
pitrou added a commit that referenced this pull requestNov 3, 2017
…ed again if crashed (GH-3247) (#4254)*bpo-31310: multiprocessing's semaphore tracker should be launched again if crashed* Avoid mucking with process state in test.Add a warning if the semaphore process died, as semaphores may then be leaked.* Add NEWS entry(cherry picked from commit cbe1756)
embray pushed a commit to embray/cpython that referenced this pull requestNov 9, 2017
…in if crashed (python#3247)* bpo-31310: multiprocessing's semaphore tracker should be launched again if crashed* Avoid mucking with process state in test.Add a warning if the semaphore process died, as semaphores may then be leaked.* Add NEWS entry
@tomMoral
Copy link
Contributor

With this PR, thesemaphore_tracker is not shared with the children anymore and each process launches its own tracker.

The easy fix would be to pass the_pid to the children but the current mechanism to check if thesemaphore_tracker is alive relies onwaitpid which cannot be used in child processes (thesemaphore_tracker is only a sibling of these processes).
I did some experiements with an extra cmd in thesemaphore_tracker in#5172 . The main issue is to have a reliable check that either:

  • The pipe is open. This is what is done here by sending a message. I don't know if there is a more efficient way to check it.
  • Check that a given pid is alive. As we cannot rely onwaitpid, I don't see an efficient mechanism.

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

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@pitrou@tomMoral@the-knights-who-say-ni@bedevere-bot

[8]ページ先頭

©2009-2026 Movatter.jp