Issue with CEF3 (single_process)

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.

Issue with CEF3 (single_process)

Postby narko » Tue Sep 18, 2018 8:25 am

Hi everyone,

I've been using CEF3 on a pretty old C++ MFC based application. I've never paid attention until soon that I had the line
Code: Select all
settings.single_process = true;
As I read, this single process mode is not recommended at all with CEF3 and it's used for debugging purpose so I wanted to change it.
I don't understand what it is happening because everything works fine with that setting, as soon as I turn it off
Code: Select all
settings.single_process = false;
My application doesn't work anymore.

I'm using CEF 3.3282.1734.g8f26fe0 on a Windows 10 OS. CefSimple is working like a charm so I'm pretty sure there is something I'm doing wrong or that I'm not doing at all :/ but as I mentioned my app is working in single process mode.

Following is the log with settings.single_process disabled :
[0918/090044.192:VERBOSE1:node_controller.cc(172)] Initializing node 714438C1F937FB1F.6CECD48D81480EB2
[0918/090044.316:VERBOSE1:pref_proxy_config_tracker_impl.cc(154)] 1022FC30: set chrome proxy config service to 102A7AF8
[0918/090044.328:VERBOSE1:multi_log_ct_verifier.cc(75)] Adding CT log: Google 'Aviator' log
[0918/090044.329:VERBOSE1:multi_log_ct_verifier.cc(75)] Adding CT log: Google 'Icarus' log
[0918/090044.329:VERBOSE1:multi_log_ct_verifier.cc(75)] Adding CT log: Google 'Pilot' log
[0918/090044.330:VERBOSE1:multi_log_ct_verifier.cc(75)] Adding CT log: Google 'Rocketeer' log
[0918/090044.330:VERBOSE1:multi_log_ct_verifier.cc(75)] Adding CT log: Google 'Skydiver' log
[0918/090044.331:VERBOSE1:multi_log_ct_verifier.cc(75)] Adding CT log: DigiCert Log Server
[0918/090044.331:VERBOSE1:multi_log_ct_verifier.cc(75)] Adding CT log: DigiCert Log Server 2
[0918/090044.331:VERBOSE1:multi_log_ct_verifier.cc(75)] Adding CT log: Symantec log
[0918/090044.332:VERBOSE1:multi_log_ct_verifier.cc(75)] Adding CT log: Symantec 'Vega' log
[0918/090044.332:VERBOSE1:multi_log_ct_verifier.cc(75)] Adding CT log: Symantec 'Sirius' log
[0918/090044.332:VERBOSE1:multi_log_ct_verifier.cc(75)] Adding CT log: WoSign log
[0918/090044.333:VERBOSE1:multi_log_ct_verifier.cc(75)] Adding CT log: Venafi Gen2 CT log
[0918/090044.333:VERBOSE1:multi_log_ct_verifier.cc(75)] Adding CT log: CNNIC CT log
[0918/090044.333:VERBOSE1:multi_log_ct_verifier.cc(75)] Adding CT log: StartCom log
[0918/090044.334:VERBOSE1:multi_log_ct_verifier.cc(75)] Adding CT log: Comodo 'Sabre' CT log
[0918/090044.334:VERBOSE1:multi_log_ct_verifier.cc(75)] Adding CT log: Comodo 'Mammoth' CT log
[0918/090044.335:VERBOSE1:multi_log_ct_verifier.cc(75)] Adding CT log: Izenpe log
[0918/090044.335:VERBOSE1:multi_log_ct_verifier.cc(75)] Adding CT log: Venafi log
[0918/090044.335:VERBOSE1:multi_log_ct_verifier.cc(75)] Adding CT log: Certly.IO log
[0918/090044.337:VERBOSE1:network_connection.cc(30)] Updating NetworkConnection's Cached Data
[0918/090044.339:VERBOSE1:histogram.cc(401)] Histogram: Blink.ColorSpace.Destination.NonlinearFitError has bad minimum: 0
[0918/090044.341:VERBOSE1:webrtc_internals.cc(109)] Could not get the download directory.
[0918/090044.349:VERBOSE1:node.cc(425)] Merging local ports F1D3C9DEBEFB2E5F.B0B10DCCFDD2937@714438C1F937FB1F.6CECD48D81480EB2 and AF2C90C20AFF0827.CD98DAD64FC05026@714438C1F937FB1F.6CECD48D81480EB2
[0918/090044.355:FATAL:context.cc(264)] Check failed: false. context not valid
[0918/090044.431:VERBOSE1:file_util_win.cc(436)] CreateDirectory(GPUCache), directory already exists.
[0918/090044.567:FATAL:context.cc(264)] Check failed: false. context not valid
[0918/090046.673:VERBOSE1:node.cc(435)] Observing lost connection from node 714438C1F937FB1F.6CECD48D81480EB2 to node ABA47A2A9141DEBB.C02C507E4D35D8A5
[0918/090046.771:VERBOSE1:node.cc(435)] Observing lost connection from node 714438C1F937FB1F.6CECD48D81480EB2 to node 3C5D3C2E4484305.2C48D89921711E42
[0918/090046.772:VERBOSE1:browser_gpu_channel_host_factory.cc(147)] Failed to create channel on existing GPU process. Trying to restart GPU process.
[0918/090046.841:FATAL:context.cc(264)] Check failed: false. context not valid
[0918/090047.997:VERBOSE1:node.cc(435)] Observing lost connection from node 714438C1F937FB1F.6CECD48D81480EB2 to node BEBA888F2B1D8ED7.7C4C6A0F33243817
[0918/090047.998:VERBOSE1:browser_gpu_channel_host_factory.cc(147)] Failed to create channel on existing GPU process. Trying to restart GPU process.
[0918/090048.038:FATAL:context.cc(264)] Check failed: false. context not valid
[0918/090049.233:VERBOSE1:node.cc(435)] Observing lost connection from node 714438C1F937FB1F.6CECD48D81480EB2 to node 8815A71248F5268D.D8AC104B57DC2CEE
[0918/090049.234:VERBOSE1:browser_gpu_channel_host_factory.cc(147)] Failed to create channel on existing GPU process. Trying to restart GPU process.
[0918/090049.272:FATAL:context.cc(264)] Check failed: false. context not valid
[0918/090050.422:VERBOSE1:node.cc(435)] Observing lost connection from node 714438C1F937FB1F.6CECD48D81480EB2 to node 55102740DC5BDCC3.F4F6ECF6030A5D7F
[0918/090050.423:VERBOSE1:browser_gpu_channel_host_factory.cc(147)] Failed to create channel on existing GPU process. Trying to restart GPU process.
[0918/090050.470:FATAL:context.cc(264)] Check failed: false. context not valid
[0918/090051.603:VERBOSE1:node.cc(435)] Observing lost connection from node 714438C1F937FB1F.6CECD48D81480EB2 to node 5941035690B820E1.C10A44AAA7621FF4
[0918/090051.604:VERBOSE1:browser_gpu_channel_host_factory.cc(147)] Failed to create channel on existing GPU process. Trying to restart GPU process.
[0918/090051.645:FATAL:context.cc(264)] Check failed: false. context not valid
[0918/090052.910:VERBOSE1:node.cc(435)] Observing lost connection from node 714438C1F937FB1F.6CECD48D81480EB2 to node CA9ADD6DFCEA677D.F51FA35BFC717DBB
[0918/090052.911:VERBOSE1:browser_gpu_channel_host_factory.cc(147)] Failed to create channel on existing GPU process. Trying to restart GPU process.
[0918/090052.948:FATAL:context.cc(264)] Check failed: false. context not valid
[0918/090054.238:VERBOSE1:node.cc(435)] Observing lost connection from node 714438C1F937FB1F.6CECD48D81480EB2 to node 5E1B526CF993F417.8A7458240C150F14
[0918/090054.240:VERBOSE1:browser_gpu_channel_host_factory.cc(147)] Failed to create channel on existing GPU process. Trying to restart GPU process.
[0918/090054.281:FATAL:context.cc(264)] Check failed: false. context not valid
[0918/090055.508:VERBOSE1:node.cc(435)] Observing lost connection from node 714438C1F937FB1F.6CECD48D81480EB2 to node B76BAF318848CA58.16A6E10F00E51FD6
[0918/090055.509:VERBOSE1:browser_gpu_channel_host_factory.cc(147)] Failed to create channel on existing GPU process. Trying to restart GPU process.
[0918/090055.510:ERROR:browser_gpu_channel_host_factory.cc(121)] Failed to launch GPU process.
[0918/090055.511:ERROR:gpu_process_transport_factory.cc(1019)] Lost UI shared context.
[0918/090055.513:VERBOSE1:histogram.cc(401)] Histogram: Compositing.Browser.LayersUpdateTime.0 has bad minimum: 0


I've made some search about those logs :
[0918/090055.510:ERROR:browser_gpu_channel_host_factory.cc(121)] Failed to launch GPU process. => v8_context_snapshot.bin (and all needed files) is there when I'm launching the app.
narko
Newbie
 
Posts: 8
Joined: Thu Jan 25, 2018 11:56 am

Re: Issue with CEF3 (single_process)

Postby ndesktop » Tue Sep 18, 2018 11:40 am

Yes, you need the bin files (natives_blob.bin, snapshot_blob.bin and v8_context_snapshot.bin).

I've just launched cefclient --single-process from a custom 3282 build and is working just fine.
(But consider also the fact that the single process option was removed completely from code, I think in 3440 if I remember well).

The GPU process problem is quite a can of worms.
You can try with the various GPU flags such as --disable-gpu (Peter Beverloo maintains Chromium command line flags here, although quite old it still the most comprehensive).
ndesktop
Master
 
Posts: 756
Joined: Thu Dec 03, 2015 10:10 am

Re: Issue with CEF3 (single_process)

Postby narko » Tue Sep 18, 2018 12:52 pm

Thanks for your answer.

ndesktop wrote:Yes, you need the bin files (natives_blob.bin, snapshot_blob.bin and v8_context_snapshot.bin).
(But consider also the fact that the single process option was removed completely from code, I think in 3440 if I remember well).

I've noticed that when I wanted to update the CEF build used in our application :D

I've tried --disable-gpu, the error log regarding GPU process has disappear but still nothing is shown.

[0918/134139.093:VERBOSE1:node_controller.cc(172)] Initializing node 4D93A0F27E403850.AF4BA012F9B07B0B
[0918/134139.110:ERROR:gpu_process_transport_factory.cc(1019)] Lost UI shared context.
[0918/134139.223:VERBOSE1:pref_proxy_config_tracker_impl.cc(154)] 10708A78: set chrome proxy config service to 1076FB90
[0918/134139.236:VERBOSE1:multi_log_ct_verifier.cc(75)] Adding CT log: Google 'Aviator' log
[0918/134139.237:VERBOSE1:multi_log_ct_verifier.cc(75)] Adding CT log: Google 'Icarus' log
[0918/134139.237:VERBOSE1:multi_log_ct_verifier.cc(75)] Adding CT log: Google 'Pilot' log
[0918/134139.237:VERBOSE1:multi_log_ct_verifier.cc(75)] Adding CT log: Google 'Rocketeer' log
[0918/134139.238:VERBOSE1:multi_log_ct_verifier.cc(75)] Adding CT log: Google 'Skydiver' log
[0918/134139.238:VERBOSE1:multi_log_ct_verifier.cc(75)] Adding CT log: DigiCert Log Server
[0918/134139.239:VERBOSE1:multi_log_ct_verifier.cc(75)] Adding CT log: DigiCert Log Server 2
[0918/134139.239:VERBOSE1:multi_log_ct_verifier.cc(75)] Adding CT log: Symantec log
[0918/134139.240:VERBOSE1:multi_log_ct_verifier.cc(75)] Adding CT log: Symantec 'Vega' log
[0918/134139.240:VERBOSE1:multi_log_ct_verifier.cc(75)] Adding CT log: Symantec 'Sirius' log
[0918/134139.241:VERBOSE1:multi_log_ct_verifier.cc(75)] Adding CT log: WoSign log
[0918/134139.241:VERBOSE1:multi_log_ct_verifier.cc(75)] Adding CT log: Venafi Gen2 CT log
[0918/134139.241:VERBOSE1:multi_log_ct_verifier.cc(75)] Adding CT log: CNNIC CT log
[0918/134139.242:VERBOSE1:multi_log_ct_verifier.cc(75)] Adding CT log: StartCom log
[0918/134139.242:VERBOSE1:multi_log_ct_verifier.cc(75)] Adding CT log: Comodo 'Sabre' CT log
[0918/134139.243:VERBOSE1:multi_log_ct_verifier.cc(75)] Adding CT log: Comodo 'Mammoth' CT log
[0918/134139.243:VERBOSE1:multi_log_ct_verifier.cc(75)] Adding CT log: Izenpe log
[0918/134139.243:VERBOSE1:multi_log_ct_verifier.cc(75)] Adding CT log: Venafi log
[0918/134139.244:VERBOSE1:multi_log_ct_verifier.cc(75)] Adding CT log: Certly.IO log
[0918/134139.245:VERBOSE1:network_connection.cc(30)] Updating NetworkConnection's Cached Data
[0918/134139.248:VERBOSE1:histogram.cc(401)] Histogram: Blink.ColorSpace.Destination.NonlinearFitError has bad minimum: 0
[0918/134139.250:VERBOSE1:webrtc_internals.cc(109)] Could not get the download directory.
[0918/134139.269:VERBOSE1:node.cc(425)] Merging local ports DC1217A705D73619.8BB7274A865BAB8E@4D93A0F27E403850.AF4BA012F9B07B0B and 33B22797C6E29046.4BFA6475F65E3B59@4D93A0F27E403850.AF4BA012F9B07B0B
[0918/134139.386:VERBOSE1:file_util_win.cc(436)] CreateDirectory(GPUCache), directory already exists.
[0918/134139.470:FATAL:context.cc(264)] Check failed: false. context not valid
[0918/134139.470:FATAL:context.cc(264)] Check failed: false. context not valid
[0918/134139.474:VERBOSE1:histogram.cc(401)] Histogram: Compositing.Browser.LayersUpdateTime.0 has bad minimum: 0
[0918/134139.493:VERBOSE1:histogram.cc(401)] Histogram: Compositing.Browser.LayersUpdateTime.0 has bad minimum: 0
[0918/134140.727:VERBOSE1:node.cc(435)] Observing lost connection from node 4D93A0F27E403850.AF4BA012F9B07B0B to node ABB4A3C9CB6C93B3.4C093FC6CA0462F9
[0918/134140.788:FATAL:context.cc(264)] Check failed: false. context not valid
[0918/134140.801:VERBOSE1:node.cc(435)] Observing lost connection from node 4D93A0F27E403850.AF4BA012F9B07B0B to node 89D880FE5CF807DC.F45DEAA9963AA43C
[0918/134140.807:VERBOSE1:histogram.cc(401)] Histogram: Compositing.Browser.LayersUpdateTime.0 has bad minimum: 0
[0918/134142.040:VERBOSE1:node.cc(435)] Observing lost connection from node 4D93A0F27E403850.AF4BA012F9B07B0B to node 942A2F290D062A2C.D58729AEE6C185C
[0918/134142.087:FATAL:context.cc(264)] Check failed: false. context not valid
[0918/134143.281:VERBOSE1:node.cc(435)] Observing lost connection from node 4D93A0F27E403850.AF4BA012F9B07B0B to node 7D966C0B2A34FB9.BD07303E632404D0
[0918/134143.328:FATAL:context.cc(264)] Check failed: false. context not valid
[0918/134144.628:VERBOSE1:node.cc(435)] Observing lost connection from node 4D93A0F27E403850.AF4BA012F9B07B0B to node 9DC2A15C200B995D.C67C513B07055C4D


What mean does lines "[0918/134143.328:FATAL:context.cc(264)] Check failed: false. context not valid" ???
When debugging my application, "OnAfterCreated" callback is reach but not the "OnLoadEnd" one.
narko
Newbie
 
Posts: 8
Joined: Thu Jan 25, 2018 11:56 am

Re: Issue with CEF3 (single_process)

Postby Czarek » Tue Sep 18, 2018 1:04 pm

It might be that you're initializing CEF or running message loop in a wrong process. Take a look at cefsimple/cefclient examples on how you should handle the value returned by CefExecuteProcess.
Maintainer of the CEF Python, PHP Desktop and CEF C API projects. My LinkedIn.
User avatar
Czarek
Virtuoso
 
Posts: 1927
Joined: Sun Nov 06, 2011 2:12 am


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 45 guests