I'm seeing something very similar, might not be same root cause, but I'll reply here anyway because of the similar stack. I have a local build of cef built with
- Code: Select all
export CEF_USE_GN=1
export GN_DEFINES="is_official_build=true use_sysroot=false use_allocator=none symbol_level=1"
export GYP_DEFINES="disable_nacl=1 use_sysroot=0 buildtype=Official use_allocator=none"
export CEF_ARCHIVE_FORMAT=tar.bz2
python automate-git.py --minimal-distrib --client-distrib --force-clean --x64-build --build-target=cefsimple \
--url="$(pwd)/.git" \
--download-dir="$(pwd)/tmp/downloadedsrc" \
--branch="$CEFBRANCH"
Our client app worked with 2704 (which may have been built with slightly different options,
see
https://bitbucket.org/chromiumembedded/ ... buntu-1604),
but hangs in CefInitialize with 3112:
- Code: Select all
(gdb) bt
#0 0x00007fffebe67a4f in futex_wait (private=0, expected=1, futex_word=0x7ffff5c51df0 <content::g_libc_localtime_funcs_guard>) at ../sysdeps/unix/sysv/linux/futex-internal.h:61
#1 futex_wait_simple (private=0, expected=1, futex_word=0x7ffff5c51df0 <content::g_libc_localtime_funcs_guard>) at ../sysdeps/nptl/futex-internal.h:135
#2 __pthread_once_slow (once_control=0x7ffff5c51df0 <content::g_libc_localtime_funcs_guard>, init_routine=0x7fffed7c5fa0 <InitLibcLocaltimeFunctions()>) at pthread_once.c:105
#3 0x00007fffed7c6151 in localtime_r () at ../../content/zygote/zygote_main_linux.cc:285
#4 0x00007fffeece0c56 in Init () at ../../base/logging.cc:808
#5 0x00007fffed7c6063 in InitLibcLocaltimeFunctions () at ../../content/zygote/zygote_main_linux.cc:207
#6 0x00007fffebe67a99 in __pthread_once_slow (once_control=0x7ffff5c51df0 <content::g_libc_localtime_funcs_guard>, init_routine=0x7fffed7c5fa0 <InitLibcLocaltimeFunctions()>) at pthread_once.c:116
#7 0x00007fffed7c6151 in localtime_r () at ../../content/zygote/zygote_main_linux.cc:285
#8 0x00007fffeece0c56 in Init () at ../../base/logging.cc:808
#9 0x00007fffef9b177e in LoadLocaleResources () at ../../ui/base/resource/resource_bundle.cc:353
#10 0x00007fffef9b1128 in InitSharedInstanceWithLocale () at ../../ui/base/resource/resource_bundle.cc:204
#11 0x00007fffeec2d492 in InitializeResourceBundle () at ../../cef/libcef/common/main_delegate.cc:662
#12 0x00007fffeec2cc15 in PreSandboxStartup () at ../../cef/libcef/common/main_delegate.cc:531
#13 0x00007fffeeb4e7cd in Initialize () at ../../content/app/content_main_runner.cc:646
#14 0x00007ffff07f136f in MainInitialize () at ../../services/service_manager/embedder/main.cc:435
#15 0x00007fffeeb9186b in Initialize () at ../../cef/libcef/browser/context.cc:382
#16 0x00007fffeeb91508 in CefInitialize () at ../../cef/libcef/browser/context.cc:235
#17 0x00007fffed2422a5 in cef_initialize () at ../../cef/libcef_dll/libcef_dll.cc:227
#18 0x00007ffff7a720a8 in CefInitialize (args=..., settings=..., application=..., windows_sandbox_info=0x0)
at /home/buildbot/slave-state/ubu1604/g-speak-rbb-ubu1604-9-ubu1604/oblong-cef-ubu1604-rel-3_3112-yobuild11/build/btmp/cef_binary_3.3112.1649.g7bc3395_linux64/libcef_dll/wrapper/libcef_dll_wrapper.cc:221
#19 0x00007ffff7a30b15 in initialize_cef (wt_settings=...)
In both your stack trace and mine, it looks like this line in zygote_main_linux.cc's localtime_r() is recursing
because it calls LOG(), and the nested call to pthread_once in
CHECK_EQ(0, pthread_once(&g_libc_localtime_funcs_guard,
InitLibcLocaltimeFunctions));
hangs. Using gdb, I verified that this is the LOG that triggers the recursion:
- Code: Select all
static void InitLibcLocaltimeFunctions() {
g_libc_localtime = reinterpret_cast<LocaltimeFunction>(
dlsym(RTLD_NEXT, "localtime"));
...
if (!g_libc_localtime || !g_libc_localtime_r) {
// http://code.google.com/p/chromium/issues/detail?id=16800
//
// Nvidia's libGL.so overrides dlsym for an unknown reason and replaces
// it with a version which doesn't work. In this case we'll get a NULL
// result. There's not a lot we can do at this point, so we just bodge it!
LOG(ERROR) << "Your system is broken: dlsym doesn't work! This has been "
"reported to be caused by Nvidia's libGL. You should expect"
" time related functions to misbehave. "
"http://code.google.com/p/chromium/issues/detail?id=16800";
}
which is strange. The libGL bug that refers to was fixed ages ago, and I'm not using nvidia anyway.
Stepping through dlsym verifies that it's returning null:
- Code: Select all
(gdb} break dlsym
(gdb) finish
Run till exit from #0 __dlsym (handle=<optimized out>, name=<optimized out>) at dlsym.c:74
InitLibcLocaltimeFunctions () at ../../content/zygote/zygote_main_linux.cc:192
192 ../../content/zygote/zygote_main_linux.cc: No such file or directory.
Value returned is $4 = (void *) 0x0
(sudo apt source glibc gets the matching source nicely, and dir /home/dank/xsrc/glibc-2.23/dlfcn let list work.)
So, uh, I dunno. I guess I should try building cef with use_sysroot=1 etc. instead to get back into the path more travelled.