relax run: heap grows ~4 GB/s about 10 s after the first output since ae7e79d4 (background item checks)

Aperta
#265 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à
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
18/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
rust

Direzione di ricerca

The regression window is ae7e79d4 against its parent 114353a6; start by diffing that commit, focusing on the new background item-check path and where allocations receive their memory tag. Reproduce with RELAX_MEM_REPORT=1 RELAX_MEM_SAMPLE_MS=500 and watch the other tag grow after first output; the reporter can run diagnostic builds against the private 28-crate workspace. Done means the heap stays flat after first output with background item checks enabled.

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

Descrizione

Since ae7e79d4 ("relax run checks every crate's items in the background, not only the bodies"), relax run --allow-c of our app's logic process reaches its first output and then, 8 to 10 s later, grows its heap at 3.5 to 4.5 GB/s until the OOM killer stops it (a 9 GiB and a 12 GiB cgroup cap; uncapped it took a 32 GB machine to 29 GB before systemd-oomd killed it).

Bisect. e2098d3a..148c0924, 9 steps, each a lone child process (no host, no GPU) with stdin kept open and stdout drained, judged over 45 s past its first output:

  • 114353a6 (ae7e79d4's parent): first output at 43 s on a cold cache, then flat; peak 5.3 to 5.6 GiB.
  • ae7e79d4 and every later commit tested, through 148c0924: the runaway.
  • RELAX_O3=0 does not change it (first output later, runaway about 10 s after it).

Heap accounting (RELAX_MEM_REPORT=1 RELAX_MEM_SAMPLE_MS=500, 148c0924): all of the growth is in the other tag; every other tag stays flat.

mem-sample: t=36056ms rss=4140MB live=2737MB other=521 ... typeck=167 ... planner=930
mem-sample: t=36557ms rss=5267MB live=3866MB other=1648 ...
mem-sample: t=37058ms rss=7044MB live=5786MB other=3569 ...
mem-sample: t=37560ms rss=8858MB live=8026MB other=5809 ...
mem-sample: t=38562ms rss=11524MB live=13146MB other=10929 ...

The same program built by cargo holds 425 MiB for 60 s. The app is a 28-crate workspace on wgpu and winit with --allow-c native builds of blake3, cc, rayon-core, rustix and two of its own crates with C++ build scripts. The repository is private; I can run any diagnostic build, trace or environment switch you name and post the output.

Lingua principale
Rust
Stelle
601
Fork
34
Merge medio
1h 58m
PR unite (30g)
45

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 makepad/relax

Tutte le issue di makepad/relax

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.