Skip to content
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

Add call_unwind to to prevent panics from crashing worker #178

Closed
wants to merge 2 commits into from

Conversation

jspspike
Copy link

@jspspike jspspike commented May 9, 2022

Currently workers crash when a panic breaks the worker until restarted

@zebp
Copy link
Collaborator

zebp commented May 9, 2022

It seems that catch_unwind doesn't work in in WASM as it's default (and only?) behavior is panic=abort (related issue), which will throw a JS error we can't easily catch because of wasm-bindgen-futures async interop. Tested this out and the panic was never caught, and always ended up with an error being thrown by the export for invoking a shared WasmClosure.

I think the best way to fix #166 would be if we had a panic hook (which do get invoked!) that could reset the wasm instance. But it feels like there has to be a better way to reset the wasm state as the somewhat hacky solution i suggested there.

I think until this issue is fixed, we're blocked.

@zebp
Copy link
Collaborator

zebp commented Jul 14, 2022

Closing as this was fixed when we updated wasm-bindgen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants