-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[browser][MT] mono_download_assets - RangeError: Start offset -1 is outside the bounds of the buffer #102196
Comments
Tagging subscribers to 'arch-wasm': @lewing |
cc @kg |
I think this would indicate that malloc/sbrk/mmap failed during startup. Seems like a threading bug (emscripten libc bug?) |
This one is the same thing from firefox
|
Maybe emscripten update could help. See emscripten-core/emscripten@6a41187 |
The structure of emscripten's implementation of sbrk and v8's implementation of memory.grow both imply that it shouldn't be possible to get -1 unless we run out of memory. However, looking closer at v8's underlying implementation, if you're using an SAB and multiple threads are racing to grow the heap, it looks like if mprotect() were to fail for any reason, the grow would immediately fail and return -1 even if you're not out of memory (there's no retry/loop in the implementation, regardless of what error code mprotect returns). I only consider this remotely plausible since (AFAIK) this failure is only happening on ubuntu and only affects MT lanes, since this logic is specifically different in V8 for SABs. Still feels highly unlikely, though... |
It looks like it's possible for mprotect to return EINTR despite what the docs say, so that could be happening here. |
I think we could lock around our allocations or retry |
I looked into doing this before, but it seems very risky. It could cause problems in emscripten dlmalloc/mimalloc/emmalloc if we were to manage the heap size ourselves. |
24 hour hit count is 0, closing |
Log
Build Information
Build: https://dev.azure.com/dnceng-public/public/_build/results?buildId=674731
Build error leg or test failing:
Error Message
Fill the error message using step by step known issues guidance.
Known issue validation
Build: 🔎 https://dev.azure.com/dnceng-public/public/_build/results?buildId=674731
Error message validated:
[mono_download_assets RangeError
]Result validation: ✅ Known issue matched with the provided build.
Validation performed at: 5/15/2024 10:05:35 AM UTC
Report
Summary
The text was updated successfully, but these errors were encountered: