Frequently hitting 'unreachable' errors with many source maps in memory
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 30/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- javascript, rust, wasm
- Lĩnh vực
- tooling
Hướng nghiên cứu
Bắt đầu trong lib/source-map-consumer.js, tại khu vực quanh BasicSourceMapConsumer._parseMappings, _getMappingsPtr và originalPositionFor, sau đó kiểm tra lib/wasm.js cùng đường dẫn lỗi WebAssembly đã được báo cáo. Tái hiện workload với nhiều SourceMapConsumers và xác nhận liệu lỗi cấp phát có gây ra lỗi unreachable hay không. Hoàn tất khi các bên gọi có thể phân biệt điều kiện bộ nhớ này và khôi phục bằng cách loại bỏ dữ liệu đã được lưu trong bộ nhớ đệm.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
I'm operating a service which sourcemaps JavaScript Self-Profiling data from production. We have several versions of our app running concurrently, with different source maps. The service keeps an LRU cache of SourceMapConsumers with a size limit roughly calculated from smc._mappings.length. This lets us keep around 100 SourceMapConsumers active at a time before running into the WebAssembly memory limit.
However, we often see unreachable errors like the following:
RuntimeError: unreachable
at wasm://wasm/0002f63a:wasm-function[54]:0xb65c
at wasm://wasm/0002f63a:wasm-function[22]:0x9647
at BasicSourceMapConsumer._parseMappings (/work/node_modules/source-map/lib/source-map-consumer.js:306:47)
at BasicSourceMapConsumer._getMappingsPtr (/work/node_modules/source-map/lib/source-map-consumer.js:289:12)
at /work/node_modules/source-map/lib/source-map-consumer.js:500:16
at Object.withMappingCallback (/work/node_modules/source-map/lib/wasm.js:125:13)
at BasicSourceMapConsumer.originalPositionFor (/work/node_modules/source-map/lib/source-map-consumer.js:496:16)
at file:///work/dist/mapTrace.js:44:34
at file:///work/dist/mapTrace.js:53:11
at Array.map (<anonymous>)
I believe this indicates an out-of-memory error, where source-map's rust code tries to allocate something but can't.
Could it be possible to gracefully recover from this? I believe Rust doesn't really support graceful recovery from OOM, but perhaps source-map could check whether there's enough memory available to allocate for a SourceMapConsumer before allocating, and throw some other kind of error? That would allow using that signal to drop some old data from our cache.
- Ngôn ngữ chính
- JavaScript
- Star
- 3.7k
- Fork
- 370
- 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 mozilla/source-map
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
mozilla/source-map#530 ·
-
allow wasm to be bundled Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
mozilla/source-map#527 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
mozilla/source-map#524 · 6 bình luận ·
-
source map seems like not work, is there some hints from the perspective of source-map tool? Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
mozilla/source-map#516 ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 30/100
mozilla/source-map#510 · 1 reaction ·
Tất cả issue của mozilla/source-map
Issue tương tự
-
Bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
Automattic/safe-publish#594 ·
-
内部文件键(绝对路径的 base64)泄漏到界面标签 Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
dream-num/dsh-univer-office#104 ·
-
comp/dashboard invalid P3
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
NousResearch/hermes-agent#121143 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
avniproject/avni-webapp#1811 ·
-
area/auroraboot area/webui bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100