Detecting memory leaks through shared function context
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- javascript, nodejs
- Lĩnh vực
- observability
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Không có dữ liệu ngôn ngữ
- Star
- 550
- Fork
- 69
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của nodejs/diagnostics
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 65/100
nodejs/diagnostics#648 · 3 bình luận ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 20/100
nodejs/diagnostics#690 · 1 reaction ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 20/100
nodejs/diagnostics#689 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 25/100
nodejs/diagnostics#688 ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
nodejs/diagnostics#687 ·
Tất cả issue của nodejs/diagnostics
Issue tương tự
-
area/distributed-query area/observability kind/bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
-
good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Remote logging updates Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
bcgov/bc-wallet-mobile#4751 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100