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

crash on cef init due to signal handlers conflict #355

Open
magreenblatt opened this issue Oct 9, 2019 · 0 comments
Open

crash on cef init due to signal handlers conflict #355

magreenblatt opened this issue Oct 9, 2019 · 0 comments
Labels
bug Bug report

Comments

@magreenblatt
Copy link
Collaborator

Original report by Anton Tarasov (Bitbucket: Anton Tarasov).


Reproducible on macOS (likely on Linux as well).

Chromium sets BSD signals (SIGBUS, SIGSEGV etc.) handlers, erasing previously set JDK handlers. This leads to sporadic crashes. The problem is known, it was first discussed here: #41/mac-jcef-frequently-crashing-in-thread

In JCEF it has been resolved via storing/restoring JDK handlers right after CEF has been initialised. However, the problem is still actual for the CEF init phase. Chromium has an option --disable-in-process-stack-traces that seems to fit - it just disallows Chromium to install the handlers. However, there’s another problem with passing this option in time.

Current JCEF approach assumes passing options via the callback - CefAppHandlerAdapter.onBeforeCommandLineProcessing. However the callback is called from CEF too late, after first signal handlers are already set (see chromium/services/service_manager/embedder/main.cc::SetupSignalHandlers).

It should be somehow possible to pass the option to CefMainArgs, right here:
java-cef/native/context.cpp::Context::Initialize

It seems like currently it’s not possible…

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

No branches or pull requests

1 participant