Detecting memory leaks through shared function context
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 25/100
- issue の種類
- 機能追加
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- javascript, nodejs
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- 言語のデータがありません
- スター
- 550
- フォーク
- 69
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
nodejs/diagnostics のほかの issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 65/100
nodejs/diagnostics#648 · コメント 3 件 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 20/100
nodejs/diagnostics#690 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 20/100
nodejs/diagnostics#689 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 25/100
nodejs/diagnostics#688 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
nodejs/diagnostics#687 ·