Stop a fiber moving into a sibling fiber's cgroup leaf

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

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
43/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
go, kubernetes, linux

Direzione di ricerca

Read the cgroup delegation and fiber placement code, especially where fiberd delegates and writes cgroup.procs; the issue does not name specific files or tests. Compare the two proposed approaches: separate delegated UIDs or placing fibers with CLONE_INTO_CGROUP from fiberd. Done means a fiber can no longer move its processes into a sibling leaf while grant limits and the GPU guard remain intact.

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

Descrizione

bug

Every fiber leaf of a grant shares one delegated uid, and cgroup.procs is delegated on each leaf and on their common parent so the zygote can place a fiber in its leaf. The kernel's migration check needs write access to the source, the destination and their common ancestor. A fiber has all three for any sibling leaf of the same grant.

So a fiber can move its own processes into a sibling fiber's leaf. It then runs under that sibling's memory.max, memory.oom.group and pids.max instead of its own, and its memory is charged to the sibling. It stays inside the grant's cgroup, so the grant's ceiling still holds, and inside the GPU guard.

This predates the GPU work. The GPU PoC moves the delegation from <grant>/ to <grant>/fibers/, which keeps the same shape.

Options.

  • Give each fiber its own delegated uid, or take back write access to the leaf's cgroup.procs once the fiber is placed.
  • Place the fiber with CLONE_INTO_CGROUP from fiberd's side, so no fiber-owned cgroup.procs is needed at all.
Lingua principale
Go
Stelle
5
Fork
5
Merge medio
15h 27m
PR unite (30g)
41

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

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 Azure/fiberd

Tutte le issue di Azure/fiberd

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.