Detecting memory leaks through shared function context
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Da chiarire
- Stato di attività
- Ferma
- Stack tecnologico
- javascript, nodejs
- Ambito
- observability
Direzione di ricerca
Start with the linked diagnostics-summit document and the heap-snapshot reconstruction approach described here; no repository files or tests are named. Establish how heap snapshots can identify objects retained by a shared function context, and define a reproducible result that demonstrates the detected pattern.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
This was discussed at the diagnostics summit, and I want to take the discussion here. The document I referred to is this, by my colleague @jakobkummerow.
The gist of the problem is:
const f = (function() {
let a = {};
let b = {};
let c = ()=>a; // forces a to be context-allocated.
let d = ()=>b; // forces b to be context-allocated.
return d; // the function context escapes and is kept alive.
})();
The object assigned to a is no longer accessible though JavaScript, but is kept alive because it is allocated onto the same context as b, which remains accessible through d.
Detecting this pattern at runtime would require the VM to keep track of additional meta-data, which does not pay off. However, we could, based on the information from a heap snapshot reconstruct missing metadata and detect this pattern.
- Lingua principale
- Nessun dato sulla lingua
- Stelle
- 550
- Fork
- 69
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Apri la 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 nodejs/diagnostics
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 65/100
nodejs/diagnostics#648 · 3 commenti ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 20/100
nodejs/diagnostics#690 · 1 reazione ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 20/100
nodejs/diagnostics#689 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 25/100
nodejs/diagnostics#688 ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
nodejs/diagnostics#687 ·
Tutte le issue di nodejs/diagnostics
Issue simili
-
area/distributed-query area/observability kind/bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
-
good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Remote logging updates Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
bcgov/bc-wallet-mobile#4751 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100