Debugging "Pthread <...> completed its main entry point with an `unwind`"

7 views
Skip to first unread message

Maksim Ivanov

unread,
Jan 11, 2023, 6:26:56 PM1/11/23
to emscripten-discuss
Hello, could anyone give tips on debugging the following error:

Pthread 0x2a648 completed its main entry point with an `unwind`, keeping the worker alive for asynchronous operation.

I've been seeing this error consistently in my application; there's no other log about exceptions, even in Debug or ASan modes. The application *seems* to work fine despite it (but the error log would confuse users as chrome://extensions warns about this in red). It's not a recent regression - I saw it on many other Emscripten versions.


Regards,
Maksim

Sam Clegg

unread,
Jan 11, 2023, 11:39:55 PM1/11/23
to emscripte...@googlegroups.com
This isn't an error per-say, and so perhaps we shouldn't be reporting it outside of debug builds.  All it means is that your thread unwound its stack with the runtime still alive.  This can happen if you call `exit_with_live_runtime`, or if you schedule some async work using asyncify.   Are you doing either of those things?   If you set a breakpoint on that message in your worker.js file you should be able to see exactly what is causing the unwind.

cheers,
sam

--
You received this message because you are subscribed to the Google Groups "emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-disc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/emscripten-discuss/a3783d5e-ca4c-464a-9f15-f249a2f8177cn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages