cefsharp / CefSharp

.NET (WPF and Windows Forms) bindings for the Chromium Embedded Framework
http://cefsharp.github.io/
Other
9.88k stars 2.92k forks source link

Subprocess crashes on some users #4916

Closed ivan-prodanov closed 2 months ago

ivan-prodanov commented 2 months ago

Is there an existing issue for this?

CefSharp Version

100.0.231

Operating System

Windows 10

Architecture

x64

.Net Version

8.0

Implementation

WinForms

Reproduction Steps

Unfortunately, we do not have a reliable way to reproduce the issue consistently

Expected behavior

The software should run without crashing, and the CefSharp browser subprocess should handle GPU process errors gracefully.

Actual behavior

The software crashes, and the Event Viewer logs show that the crash is related to the GPU process within the CefSharp subprocess.

Regression?

No response

Known Workarounds

No response

Does this problem also occur in the CEF Sample Application

I'm not able to reproduce this issue on my machine using our software, therefore this could also be happening in the sample application.

Other information

We've observed that this crash may be related to specific GPU drivers or hardware, though we're unable to confirm this definitively. Any guidance on how to further diagnose or resolve this issue would be appreciated.

If there are any known workarounds or configuration changes that could mitigate this issue, we would be glad to implement them.

We are seeking advice on how to resolve or mitigate this issue.

Below is a log of the process of our application. Upon Cef initialization, it launcher the Subprocess executable, but for some reason (no log available) the child process crashes, then the main process crashes as per the log below:

` libcef.dll!logging::LogMessage::~LogMessage() Line 909 C++

libcef.dll!content::anonymous namespace'::IntentionallyCrashBrowserForUnusableGpuProcess() Line 448 C++ libcef.dll!content::GpuDataManagerImplPrivate::FallBackToNextGpuMode() Line 1691 C++ libcef.dll!content::GpuDataManagerImpl::FallBackToNextGpuMode() Line 366 C++ libcef.dll!content::GpuProcessHost::RecordProcessCrash() Line 1301 C++ libcef.dll!content::GpuProcessHost::OnProcessCrashed(int exit_code) Line 977 C++ libcef.dll!content::BrowserChildProcessHostImpl::OnChildDisconnected() Line 460 C++ [Inline Frame] libcef.dll!base::OnceCallback<void ()>::Run() Line 142 C++ libcef.dll!mojo::InterfaceEndpointClient::NotifyError(const absl::optional<mojo::DisconnectReason> & reason) Line 688 C++ libcef.dll!IPC::anonymous namespace'::ChannelAssociatedGroupController::NotifyEndpointOfError(IPC::anonymous namespace'::ChannelAssociatedGroupController::Endpoint * endpoint, bool force_async) Line 818 C++ libcef.dll!IPC::anonymous namespace'::ChannelAssociatedGroupController::OnPipeError() Line 800 C++ [Inline Frame] libcef.dll!base::OnceCallback<void ()>::Run() Line 142 C++ libcef.dll!mojo::Connector::HandleError(bool force_pipe_reset, bool force_async_handler) Line 686 C++ [Inline Frame] libcef.dll!base::RepeatingCallback<void (unsigned int, const mojo::HandleSignalsState &)>::Run(unsigned int args, const mojo::HandleSignalsState & args) Line 241 C++ libcef.dll!mojo::SimpleWatcher::OnHandleReady(int watch_id, unsigned int result, const mojo::HandleSignalsState & state) Line 279 C++ [Inline Frame] libcef.dll!base::OnceCallback<void ()>::Run() Line 142 C++ libcef.dll!base::TaskAnnotator::RunTaskImpl(base::PendingTask & pending_task) Line 135 C++ [Inline Frame] libcef.dll!base::TaskAnnotator::RunTask(perfetto::StaticString event_name, base::PendingTask & pending_task, base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWorkImpl:: && args) Line 74 C++ libcef.dll!base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWorkImpl(base::sequence_manager::LazyNow continuation_lazy_now) Line 385 C++ libcef.dll!base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWork() Line 296 C++ libcef.dll!base::MessagePumpForUI::DoRunLoop() Line 222 C++ libcef.dll!base::MessagePumpWin::Run(base::MessagePump::Delegate delegate) Line 80 C++ libcef.dll!base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::Run(bool application_tasks_allowed, base::TimeDelta timeout) Line 500 C++ libcef.dll!base::RunLoop::Run(const base::Location & location) Line 143 C++ libcef.dll!CefMainRunner::RunMessageLoop() Line 289 C++ libcef.dll!CefUIThread::ThreadMain() Line 185 C++ libcef.dll!base::anonymous namespace'::ThreadFunc(void * params) Line 114 C++

Are there known issues related to GPU process crashes in CefSharp? Is there a way to force CefSharp to disable GPU acceleration or handle GPU process crashes more gracefully? Are there any recommended diagnostics or logging we could enable to gather more information? Thank you for your assistance.

We are currently using an older version of CefSharp (100.0.231). Before proceeding with further debugging, we would like to know if this issue has already been identified and resolved in a more recent version of CefSharp. If so, could you please point us to the relevant release notes or commits? This would help us determine if upgrading to a newer version could resolve the problem.