emscripten-core / emscripten-core/emscripten
[asyncify]: asyncify_stop_unwind throws a RuntimeError: unreachable
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- C++
- Star
- 27.6k
- Fork
- 3.6k
- Merge trung bình
- 1 ngày 14 giờ
- Pull request đã merge (30 ngày)
- 125
Mô tả
Hi,
I am hitting an abort() when maybeStopUnwind is called after I refactored a pthread_create wrapper that sets and cancels the mainloop (to allow correctly joining the thread as a workaround to #17552).
Replacing the abort in runAndAbortIfError with a console.error to get the exception I get this trace :
RuntimeError: unreachable
at asyncify_stop_unwind (experimental.wasm:0x35470b3)
at ret.<computed> (experimental.js:7561:35)
at experimental.js:1152:22
at runAndAbortIfError (experimental.js:7449:16)
at Object.maybeStopUnwind (experimental.js:7584:11)
at ret.<computed> (experimental.js:7566:30)
at Object.doRewind (experimental.js:7628:16)
at experimental.js:7661:47
runAndAbortIfError @ experimental.js:7451
maybeStopUnwind @ experimental.js:7584
ret.<computed> @ experimental.js:7566
doRewind @ experimental.js:7628
(anonymous) @ experimental.js:7661
Promise.then (async)
(anonymous) @ experimental.js:7721
handleSleep @ experimental.js:7639
handleAsync @ experimental.js:7719
__asyncjs__init_js_file @ experimental.js:1360
imports.<computed> @ experimental.js:7527
$EmFileOpen @ experimental.wasm:0x45dd42
$generic_start @ experimental.wasm:0x31c049c
$vlc_module_load @ experimental.wasm:0x31bfcfa
$module_need @ experimental.wasm:0x31c0194
$access_New @ experimental.wasm:0x3279fa4
...
Sorry for not being able to provide a short sample, I tried fiddling with the one in #17552 but could not reproduce.
asyncify_stop_unwind is called regularly, and when it is called after this function or this function, I am having this abort().
Version of emscripten/emsdk:
$ emcc -v
emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 3.1.17 (fbc532773d84d2bd7da876275671970e792ad1cd)
clang version 15.0.0 (https://github.com/llvm/llvm-project 17e4c217b66305e60657a48f10fe3c428c2fe4d2)
Target: wasm32-unknown-emscripten
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.
Hướng nghiên cứu
Bắt đầu với src/library_async.js, quanh runAndAbortIfError, maybeStopUnwind và doRewind, sau đó kiểm tra lệnh gọi asyncify_stop_unwind trong trace được tạo. Tái hiện và thu gọn kịch bản VLC pthread/mainloop được liên kết, bao gồm các hàm được tham chiếu, để cô lập lỗi; công việc được xem là hoàn tất khi đã xác nhận nguyên nhân kèm theo coverage hồi quy hoặc một hướng sửa lỗi chính xác được maintainer phê duyệt.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- javascript, wasm
- Lĩnh vực
- compilers
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 25/100