Synchronisation of `wait()` and `kill()`
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 22/100
- Tipo de issue
- Error
- Claridad
- Necesita aclaración
- Estado de actividad
- Activo
- Stack tecnológico
- cpp
- Área
- operating-systems
Línea de trabajo
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().
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- C++
- Estrellas
- 6
- Forks
- 35
- Merge medio
- 2 d 5 h
- PR fusionados (30 d)
- 101
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Sin guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de eclipse-score/lifecycle
-
documentation
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
eclipse-score/lifecycle#407 ·
Los mantenedores suelen responder en 1 día
-
cleanup
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
eclipse-score/lifecycle#375 ·
Los mantenedores suelen responder en 1 día
-
Implement support to config RLIMTS for processes launched by Launch ManagerPosiblemente ocupada @NicolasFussberger la tomó hace 5 días. Abiertoenhancement
Dificultad 3/5 1-2 días Aptitud para principiantes 28/100
eclipse-score/lifecycle#784 ·
Los mantenedores suelen responder en 1 día
-
Align C & C++ report_running APIAbiertocleanup good first issue
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
eclipse-score/lifecycle#755 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 1-2 días Aptitud para principiantes 72/100
eclipse-score/lifecycle#727 ·
Los mantenedores suelen responder en 1 día
Todos los issues de eclipse-score/lifecycle
Issues similares
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
Los mantenedores suelen responder en 1 día
-
(S1 - Need confirmation)
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
CleverRaven/Cataclysm-DDA#89182 ·
Los mantenedores suelen responder en 1 día
-
ai_p2
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
ClickHouse/ClickHouse#126833 ·
Los mantenedores suelen responder en 1 día
-
clang:static analyzer
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
llvm/llvm-project#233598 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100