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
panic assertion failed intermitent crash compiled to WASM and running with libwebkit2gtk on Linux #194
Comments
This is most likely a bug in |
@Amanieu done 👍 |
Why do you think so?
It would appear to be this assertion: Line 505 in aa8c30b
A 0 mask indicates a table with no capacity, so |
Yes, but I don't understand why the |
Eh, I don't know what weird things we could be doing to influence |
Wild guess -- maybe there was an allocation failure? Does WASM do anything weird with the OOM hook? That's supposed to diverge, so we'd get undefined behavior if that returned somehow... |
I just had a look at all the functions in the backtrace starting from here and it all looks perfectly standard. At this point I am strongly considering this could be a compiler bug... |
@cuviper some additional context, this problem only seems to occur on startup of the application, so while I guess it's possible to be OOM, it seems unlikely. I'll try to better understand WASM memory allocation and monitor memory usage while testing to see if I can get some better info next time it happens |
Could it also possibly be some unsafe code causing the issue? I don't have any in my code, but perhaps an underlying library, or interaction with Javascript that is broken? So far I haven't encountered this issue on Mac (webkit) or Windows (Edge, not chromium edge), which makes it all the more stranger, but I also haven't done as much testing on those platforms yet, so that is some anecdotal evidence suggesting that it is webkit2gtk specific. I'm hoping to switch my development setup to using Chromium to approach it from a different angle. |
What version of |
I'm using |
Another crash today involving hashbrown using
|
And another crash which seems completely unrelated: [Error] Unhandled Promise Rejection: Error: Unreachable code should not be executed (evaluating 'wasm.__wbindgen_start()')
<?>.wasm-function[__rust_start_panic] (data:text/html,%3C…%3E:746)
<?>.wasm-function[rust_panic]
<?>.wasm-function[std::panicking::rust_panic_with_hook::h6c81660583233495]
<?>.wasm-function[std::panicking::begin_panic_handler::{{closure}}::h35f4baddc401ed83]
<?>.wasm-function[std::sys_common::backtrace::__rust_end_short_backtrace::h9f9c9a1ba07fa30f]
<?>.wasm-function[rust_begin_unwind]
<?>.wasm-function[core::panicking::panic_fmt::h29e09648cb9a0a7a]
<?>.wasm-function[<wasm_bindgen::JsValue as core::ops::drop::Drop>::drop::h8f8e8a7ba387ed46]
<?>.wasm-function[core::ptr::drop_in_place::h5d01315294578898]
<?>.wasm-function[core::ptr::drop_in_place::h8a9fa6b94f654970]
<?>.wasm-function[js_sys::global::get_global_object::h99770ed27eadef53]
<?>.wasm-function[js_sys::global::GLOBAL::__init::h3814f4f2ded02b15]
<?>.wasm-function[core::ops::function::FnOnce::call_once::hba8fa7df53943a1a]
<?>.wasm-function[std::thread::local::lazy::LazyKeyInner<T>::initialize::h74fa9f2fbe1826a9]
<?>.wasm-function[std::thread::local::statik::Key<T>::get::h24b7945b1c67fb6e]
<?>.wasm-function[js_sys::global::GLOBAL::__getit::h6e9410677e1f915b]
<?>.wasm-function[std::thread::local::LocalKey<T>::try_with::h603f7caab0a8af7a]
<?>.wasm-function[std::thread::local::LocalKey<T>::with::he66d6e85b8524a51]
<?>.wasm-function[js_sys::global::hf9ea7e1d6f157a7a]
<?>.wasm-function[web_sys::window::h479c51bd53245a96]
<?>.wasm-function[i18n_embed::requester::WebLanguageRequester::requested_languages::h087a7383ef02efe9]
<?>.wasm-function[<i18n_embed::requester::WebLanguageRequester as i18n_embed::requester::LanguageRequester>::requested_languages::he9b116fc34fb7a29] I've tried running this code about 100 times on a mac using web-view, but I can't replicate the issue there. I may have gotten the crash once on Windows, but can't be sure because there was no stack trace. It's seeming more like it may either be:
And not really a bug specific to |
I'm going to cc @alexcrichton since this is likely a bug in the compiler or in the WASM implementation. |
@kellpossible Could you give us instructions & code to reproduce this locally? |
I'd be happy to help dig in, but yeah having a way to rpeproduce would be quite helpful! |
Thanks @alexcrichton @Amanieu Unfortunately it's not a public project yet, but I'll set aside some time this week to try and recreate it in a small project I can share here. The other problem is that it's very sporadic, maybe one in 30 runs or so. |
I've not had the time to create a reproducible example that I can share, this issue appears to be exclusively occurring on libwebkit2gtk, perhaps it's a bug with the webassembly implementation there. After several weeks running my application in chomium and firefox I've yet to reproduce the issue in those browsers. I've also had some rendering issues exclusive to libwebkit2gtk so probably will ditch it at this point and use some other solution. |
Compiled using wasm-bindgen, via
wasm-pack
using theweb
target, and the--dev
profile. This code is running in thewebkit2gtk 2.28.4-1
browser on Archlinux.Stack trace:
It's possible this may be related to rust-random/rand#1016 Perhaps it's a stability issue in
libwebkit2gtk
.The text was updated successfully, but these errors were encountered: