CefInitialize hangs on linux

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.

CefInitialize hangs on linux

Postby aligre » Mon Feb 19, 2024 11:31 am

Hello

Cef version is : 120.0.6099.234

our linux configuration, buildtime and runtme, is as follow
build of libcef : ubuntu 20
build of libcef wrapper : centos 7.5
exection on a readhat 8.6

We know this configuration is not supported by CEF but we cannot move on a well supported configuration as in our software there are other constraints/components to take into account.
So any help to fix the hang will be appreciate

The hang does not occur on all our computers but only on few

The call stack of the hang is :
libc.so.6!read
> libcef.so!ReadSandboxStatus() Line 58 C++
libcef.so!GetSandboxStatus() Line 327 C++
libcef.so!InitializeZygoteSandboxForBrowserProcess() Line 374 C++
libcef.so!Initialize() Line 1046 C++
libcef.so!ContentMainInitialize() Line 290 C++
libcef.so!ContentMainInitialize() Line 412 C++
libcef.so!Initialize() Line 239 C++
libcef.so!Initialize() Line 479 C++
libcef.so!CefInitialize() Line 310 C++
libcef.so!cef_initialize() Line 114 C++
libCATCefPluginC.so!CefInitialize(CefMainArgs const&, CefStructBase<CefSettingsTraits> const&, scoped_refptr<CefApp>, void*) [/size][/i]

It sounds strange the call to CefInitialize goes into methods about sandbox as we have deactivated the sandboxing :
in the command line:
Code: Select all
 // Sandbox cannot be enabled because we use different executables
    // for the browser process and renderer processes (see include/cef_sandbox_win.h).
    io_settings.no_sandbox = 1;

at CefInitialize :
Code: Select all
// 4th arg: nullptr == no sandbox.
    _bInitialized = CefInitialize(args, initSettings, _spApp.get(), nullptr);


and in CefExecuteProcess
Code: Select all
 // Sandbox can only be enabled if the same executable is used for browser
    // and renderer processes.
    // https://chromium.googlesource.com/chromium/src/+/master/docs/design/sandbox.md

    // 3rd arg: nullptr == no sandbox.
    return CefExecuteProcess(i_args, i_spApp, nullptr);


If someone has any hint on this issue ... thank you in advance
aligre
Techie
 
Posts: 24
Joined: Fri Apr 09, 2021 7:38 am

Re: CefInitialize hangs on linux

Postby bamilab » Sun Feb 25, 2024 6:57 pm

I have the same problem.
But more interestingly, I have two projects in which I included the same CEF binaries & files as far as I know, with the same permissions, and yet, I only have this problem in one of them.
Unfortunately, haven't been able to figure out what the problem actually is.
I've copied the same files to the executable of both projects, and I've checked many times whether the permissions where the same.
I do have the sandbox in place, and do nothing to disable it.

Weird...

I'm using version 121.3.
It doesn't seem to matter whether I specify the browser_subprocess_path or not.

I'm running debian bookworm, and the output of uname -r is: 6.1.0-13-amd64
bamilab
Techie
 
Posts: 14
Joined: Fri Oct 23, 2020 12:32 pm


Return to Support Forum

Who is online

Users browsing this forum: Google [Bot], W3C [Validator] and 215 guests