Synchronisation of `wait()` and `kill()`
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 22/100
- Tipo di issue
- Bug
- Chiarezza
- Da chiarire
- Stato di attività
- Attiva
- Stack tecnologico
- cpp
- Ambito
- operating-systems
Direzione di ricerca
The issue names no files, tests or entry points, so first find where the worker threads call kill() and where the OS handler calls wait(). The open question is the synchronization design: the issue asks that the two never run at the same time for the same process identifier, and that a worker which loses the race backs out. Done means the design is agreed, the race is covered by a test, and a worker that loses the race leaves no stray kill().
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
What
My understanding of POSIX is as follows:
When a process has terminated, it stays in the kernel's table as a zombie process until the parent has read its exit status using wait(). As soon as wait() returns, the kernel is free to delete the process and reuse its identifier.
Therefore, if we attempt to call kill() after wait(), there is a chance that we kill some completely unrelated process.
Although process identifiers are usually sequential, making this very unlikely, there is nothing which says they must be allocated that way. And even if they are, the point where the number wraps around can be arbitrarily low.
Acceptance Criteria (DoD)
- Use of invalid process identifiers is prevented
How
If my understanding is correct, then we must guarantee that these do not happen simultanously:
- Worker threads calling
kill() - The OS handler calling
wait()
If kill() goes first, it will find the zombie process and return ESRCH. We already handle this case properly.
If wait() goes first, and a worker thread is waiting to kill() the same identifier, the worker thread must back out without doing anything.
- Lingua principale
- C++
- Stelle
- 6
- Fork
- 35
- Merge medio
- 2g 5h
- PR unite (30g)
- 101
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Nessuna guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di eclipse-score/lifecycle
-
documentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
eclipse-score/lifecycle#407 ·
I maintainer di solito rispondono entro 1 giorno
-
cleanup
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
eclipse-score/lifecycle#375 ·
I maintainer di solito rispondono entro 1 giorno
-
Implement support to config RLIMTS for processes launched by Launch ManagerForse già presa @NicolasFussberger l’ha presa 5 giorni fa. Apertaenhancement
Difficoltà 3/5 1-2 giorni Idoneità per principianti 28/100
eclipse-score/lifecycle#784 ·
I maintainer di solito rispondono entro 1 giorno
-
cleanup good first issue
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
eclipse-score/lifecycle#755 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 72/100
eclipse-score/lifecycle#727 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di eclipse-score/lifecycle
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
[BUG] Clipboard History: Buffer over-read in WideCharToMultiByte on double-click pasteForse già presa @softmgr l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
notepad-plus-plus/notepad-plus-plus#18519 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
justcallmekoko/ESP32Marauder#1635 ·
I maintainer di solito rispondono entro 1 giorno
-
3.7.6-dev commit 80481ea - files not centered when resolution differs and zoom = "pixel-to-pixel"Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
grizzlypeak3d/DJV#931 ·