CEF_USE_SANDBOX impacts process spawning and crash handling

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

CEF_USE_SANDBOX impacts process spawning and crash handling

Postby Plinker1961 » Thu Mar 24, 2016 7:30 am

Just over a month ago I asked about managing crash dumps (http://magpcss.org/ceforum/viewtopic.php?f=6&t=13911) and have since read a number of posts discussing the topic (in particular this: https://bitbucket.org/chromiumembedded/cef/issues/1131/add-breakpad-support), but honestly never got far with a working solution. I have since integrated CrashRpt (http://crashrpt.sourceforge.net/) into the CEF Client and created a CrashFix server (http://crashfix.sourceforge.net/), to which I send any crash reports. This solution has worked very well for me for weeks . . . until recently when I changed the build instructions to #define CEF_USE_SANDBOX 1. For security reasons, we would prefer running sandboxed as we hope to be supporting various plugins (such as Flash).

I have read articles about Chromium Sandboxing (e.g., https://www.chromium.org/developers/design-documents/sandbox and https://www.chromium.org/developers/design-documents/sandbox/Sandbox-FAQ) and those seemed to make sense, but apparently there are things about Sandboxing that I just don't understand. The issue now is that, with sandboxing enabled, the render process no longer catches and reports crash dumps. Debugging this further I find this is happening (for starters) because only the main/browser cefclient.exe process ever actually executes client::RunMain, which is where I have CrashRpt integration. Apparently sandboxed sub-processes are launched in such a way that wWinMain and client::RunMain are somehow bypassed. Even without any changes to the 2623 CEF Client, a sandboxed render process crash will not generate any crash dump (to %LOCALAPPDATA%\CrashDumps) . . . presumably because the process does not have permissions to write to disk and/or to generate such a trace. If one runs the same CEF Client with no sandbox, such render process crashes will generate crash dumps as expected (assuming one has the appropriate Windows Error Reporting registry entry for LocalDumps, https://msdn.microsoft.com/en-us/library/windows/desktop/bb787181(v=vs.85).aspx).

I suppose this is all a feature of Chromium Sandboxing, but is there not any way to integrate something as simple as CrashRpt in a sandboxed CEF Client?
Plinker1961
Mentor
 
Posts: 65
Joined: Thu Feb 26, 2015 5:14 pm

Return to Support Forum

Who is online

Users browsing this forum: Google [Bot] and 216 guests

cron