Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

pidfd for a thread or CLONE_VM child never reports exit

Aperta
#441 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 3 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
c

Direzione di ricerca

Start in src/runtime/forkipc.c, where a VM child's vm_exit_status is published, and find the thread exit path, then check where proc_pidfd_notify_exit is called. Trace how pidfd_set_target binds a pidfd to its task so an exit recorded before that bind is not lost. Done means a pidfd for a thread or CLONE_VM child becomes readable on exit, and an early exit is still reported.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

A pidfd that clone or clone3 makes with CLONE_PIDFD for a thread or a CLONE_VM child never becomes readable. No monitor runs for a task with no host pid, and neither the thread exit path nor the site that publishes a VM child's vm_exit_status (src/runtime/forkipc.c) calls proc_pidfd_notify_exit. A guest that polls the pidfd for the child's exit waits forever, where Linux reports POLLIN.

A fix would notify at both exit sites, and record an exit that lands before pidfd_set_target, since the child can finish before the parent binds the pidfd to it.

Raised in review of #421, where clone(CLONE_VM|CLONE_PIDFD) became able to make such a pidfd; before it only clone3 could.

Lingua principale
C
Stelle
273
Fork
29
Merge medio
2g 10h
PR unite (30g)
17

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di sysprog21/elfuse

Tutte le issue di sysprog21/elfuse

Issue simili

Altre issue su C

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.