Crashpad Setup

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.

Crashpad Setup

Postby lucasseries900 » Sat May 05, 2018 10:47 am

My inquiry is how to setup up the crashpad handler for a .net windows form application that uses the CefSharp. I have placed a crash_reporter.cfg file in the bin folder along with my windows form application .exe. My .cfg file is pretty bare bones at this point. I am not getting expected results. See below for contents of the .cfg.

A little background on this. Our production environment is experiencing crashes from the CefSharp.BrowserSubprocess.exe causing our .net windows application to crash as well. I am trying to setup the crash pad correctly to generate a dump with some stack and exception information on the CefSharp.BrowserSubprocess.exe.

When my windows form application loads\invokes the CefSharp browser, it ends up relaunching the main .net windows form .exe as a sub process. I will noticed that the second instance of the application has this as the command line args. --type=crashpad-handler /prefetch:7 --max-uploads=5 --max-db-size=20 --max-db-age=5 --monitor-self-annotation=ptype=crashpad-handler "--database=C:\Users\******\AppData\Local\CEF\User Data\Crashpad" "--metrics-dir=C:\Users\*******\AppData\Local\CEF\User Data" --annotation=platform=win32 --annotation=product=cef --annotation=version=3.3239.1723.g071d1c1 --initial-client-data=0xc90,0xba8,0xa34,0x998,0xa38,0x17789198,0x17789170,0x17789180

I was not expecting this type of behavior. I was expecting the CefSharp.BrowserSubprocess to be invoked with these arguments, not another .net application which is already running. I guess I am missing something to get the crashpad enabled for the CefSharp.BrowserSubprocess.exe that are invoked from my .net windows form application. If anybody can provide what I might be doing wrong in setting up the crashpad. I can provide more details if needed. Thanks in advanced.

crash_reporter.cfg file
[Config]

[CrashKeys]
testkey_small1=small
testkey_small2=small

CefVersion: 63.0.0.0
lucasseries900
Newbie
 
Posts: 2
Joined: Sat May 05, 2018 10:15 am

Re: Crashpad Setup

Postby magreenblatt » Sat May 05, 2018 3:12 pm

You need to set ExternalHandler in the cfg file. See https://bitbucket.org/chromiumembedded/ ... porting.md
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: Crashpad Setup

Postby amaitland » Sat May 05, 2018 5:37 pm

Read the notes section of https://github.com/cefsharp/CefSharp/re ... ag/v63.0.0

The examples also contain crash_reporter.cfg for reference https://github.com/cefsharp/CefSharp/bl ... er.cfg#L27
Maintainer of the CefSharp project.
amaitland
Virtuoso
 
Posts: 1292
Joined: Wed Jan 14, 2015 2:35 am

Re: Crashpad Setup

Postby lucasseries900 » Mon May 07, 2018 2:59 pm

Awesome, thanks for the replies.

So it looks like the first instance (Main CefSharp Process) sub process is getting the command line args for the crash pad handler. But it appears that the gpu type and render sub processes are not. Is this expected, if the gpu processes crash, will a dump still be generated? Do I need to setup the Crash Keys for this? Not sure.

Command Line Args of first instance of CefSharp.BrowserSubprocess: (expected)
C:\{ApplicationPath}\bin\CefSharp.BrowserSubprocess.exe --type=crashpad-handler --max-uploads=5 --max-db-size=20 --max-db-age=5 --monitor-self-annotation=ptype=crashpad-handler "--database=C:\{User App Temp Dir}\CefSharp\User Data\Crashpad" "--metrics-dir=C:\{User App Temp Dir}\CefSharp\User Data" --annotation=platform=win32 --annotation=product=CefSharp --annotation=version=63.0.0.0 --initial-client-data=0xc88,0xc94,0x9d4,0x99c,0xb50,0x9b69198,0x9b69170,0x9b69180

Command Line Args of second instance of CefSharp.BrowserSubprocess: (expecting crashpad args here?)
CefSharp.BrowserSubprocess.exe --type=gpu-process --no-sandbox --lang=en-US --log-file="C:\{ApplicationPath}\bin\debug.log" --log-severity=disable --gpu-vendor-id=0x1002 --gpu-device-id=0x6606 --gpu-driver-vendor="Advanced Micro Devices, Inc." --gpu-driver-version=12.100.14.3000 --gpu-driver-date=3-14-2013 --gpu-secondary-vendor-ids=0x8086 --gpu-secondary-device-ids=0x0416 --amd-switchable --lang=en-US --log-file="C:\{ApplicationPath}\bin\debug.log" --log-severity=disable --service-request-channel-token=85551BBA9B6679A2C9E57AF07DF7540F --mojo-platform-channel-handle=2604 /prefetch:2 --custom-scheme=order|T|F|F|T|T|F;provider|T|F|F|T|T|F;practitioner|T|F|F|T|T|F;customer|T|F|F|T|T|F;wsv3|T|F|F|T|T|F --custom-scheme=order|T|F|F|T|T|F;provider|T|F|F|T|T|F;practitioner|T|F|F|T|T|F;customer|T|F|F|T|T|F;wsv3|T|F|F|T|T|F

Command Line Args of third instance of CefSharp.BrowserSubprocess: (expecting crashpad args here?)
CefSharp.BrowserSubprocess.exe --type=renderer --disable-browser-side-navigation --no-sandbox --service-pipe-token=053C7F9A6D9C40B7AED3602A56CA39BB --lang=en-US --lang=en-US --log-file="C:\{ApplicationPath}\bin\debug.log" --log-severity=disable --enable-system-flash=1 --enable-pinch --device-scale-factor=1 --num-raster-threads=4 --enable-main-frame-before-activation --enable-gpu-async-worker-context --content-image-texture-target=0,0,3553;0,1,3553;0,2,3553;0,3,3553;0,4,3553;0,5,3553;0,6,3553;0,7,3553;0,8,3553;0,9,3553;0,10,3553;0,11,3553;0,12,3553;0,13,3553;0,14,3553;0,15,3553;0,16,3553;0,17,3553;1,0,3553;1,1,3553;1,2,3553;1,3,3553;1,4,3553;1,5,3553;1,6,3553;1,7,3553;1,8,3553;1,9,3553;1,10,3553;1,11,3553;1,12,3553;1,13,3553;1,14,3553;1,15,3553;1,16,3553;1,17,3553;2,0,3553;2,1,3553;2,2,3553;2,3,3553;2,4,3553;2,5,3553;2,6,3553;2,7,3553;2,8,3553;2,9,3553;2,10,3553;2,11,3553;2,12,3553;2,13,3553;2,14,3553;2,15,3553;2,16,3553;2,17,3553;3,0,3553;3,1,3553;3,2,3553;3,3,3553;3,4,3553;3,5,3553;3,6,3553;3,7,3553;3,8,3553;3,9,3553;3,10,3553;3,11,3553;3,12,3553;3,13,3553;3,14,3553;3,15,3553;3,16,3553;3,17,3553;4,0,3553;4,1,3553;4,2,3553;4,3,3553;4,4,3553;4,5,3553;4,6,3553;4,7,3553;4,8,3553;4,9,3553;4,10,3553;4,11,3553;4,12,3553;4,13,3553;4,14,3553;4,15,3553;4,16,3553;4,17,3553;5,0,3553;5,1,3553;5,2,3553;5,3,3553;5,4,3553;5,5,3553;5,6,3553;5,7,3553;5,8,3553;5,9,3553;5,10,3553;5,11,3553;5,12,3553;5,13,3553;5,14,3553;5,15,3553;5,16,3553;5,17,3553;6,0,3553;6,1,3553;6,2,3553;6,3,3553;6,4,3553;6,5,3553;6,6,3553;6,7,3553;6,8,3553;6,9,3553;6,10,3553;6,11,3553;6,12,3553;6,13,3553;6,14,3553;6,15,3553;6,16,3553;6,17,3553 --service-request-channel-token=053C7F9A6D9C40B7AED3602A56CA39BB --renderer-client-id=4 --mojo-platform-channel-handle=3256 /prefetch:1 --wcf-enabled --wcf-host-process-id=17240 --custom-scheme=order|T|F|F|T|T|F;provider|T|F|F|T|T|F;practitioner|T|F|F|T|T|F;customer|T|F|F|T|T|F;wsv3|T|F|F|T|T|F
lucasseries900
Newbie
 
Posts: 2
Joined: Sat May 05, 2018 10:15 am

Re: Crashpad Setup

Postby magreenblatt » Mon May 07, 2018 3:48 pm

Yes, it's expected. You can test crash handling as described on the Wiki page.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm


Return to Support Forum

Who is online

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