windowless ceftests in debug mode fail in docker (xvfb-run)

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.

windowless ceftests in debug mode fail in docker (xvfb-run)

Postby mezz » Wed Jul 28, 2021 9:10 am

Hi,

with the latest CEF version: https://cef-builds.spotifycdn.com/cef_b ... 64.tar.bz2

when compiled in debug mode the ceftests fail when they run in a docker container in windowless mode. The release compiled version works.

Steps to reproduce:

1) Create a docker container (eg. Ubuntu 20.04) with all the required dependencies and compile CEF inside docker in Debug mode
2) Install xvfb-run
3) From the build folder:

Code: Select all
cd tests/ceftests/Debug/
/usr/bin/xvfb-run -a --server-args='-screen 0, 1024x768x24' ./ceftests --gtest_filter=OSRTest.Windowless* --no-sandbox --off-screen-rendering-enabled


The result is:

Code: Select all
[0728/140607.760331:WARNING:task_impl.cc(19)] No task runner for threadId 0
[0728/140607.760490:WARNING:task_impl.cc(19)] No task runner for threadId 5
[0728/140607.863756:ERROR:power_monitor_device_source_stub.cc(11)] Not implemented reached in virtual bool base::PowerMonitorDeviceSource::IsOnBatteryPower()
[0728/140607.865064:INFO:content_main_runner_impl.cc(1078)] Chrome is running in full browser mode.
[0728/140607.953811:ERROR:gpu_init.cc(440)] Passthrough is not supported, GL is swiftshader
Note: Google Test filter = OSRTest.Windowless*
[==========] Running 2 tests from 1 test suite.
[----------] Global test environment set-up.
[----------] 2 tests from OSRTest
[ RUN      ] OSRTest.Windowless
[       OK ] OSRTest.Windowless (78 ms)
[ RUN      ] OSRTest.Windowless2x
[0728/140608.070550:FATAL:process_linux.cc(143)] Check failed: result == 0. : Permission denied (13)
Trace/breakpoint trap (core dumped)


The gdb stacktrace is:

Code: Select all
Core was generated by `./ceftests --gtest_filter=OSRTest.Windowless* --no-sandbox --off-screen-renderi'.
Program terminated with signal SIGTRAP, Trace/breakpoint trap.
#0  0x00007f7fa31aeec3 in operator() () at ../../base/logging.cc:886
886   ../../base/logging.cc: No such file or directory.
[Current thread is 1 (Thread 0x7f7f6effd700 (LWP 7801))]
(gdb) bt
#0  0x00007f7fa31aeec3 in operator() () at ../../base/logging.cc:886
#1  ~LogMessage() () at ../../base/logging.cc:886
#2  0x00007f7fa31af3ca in ~ErrnoLogMessage() () at ../../base/logging.cc:1030
#3  0x00007f7fa31af3ee in logging::ErrnoLogMessage::~ErrnoLogMessage() () at ../../base/logging.cc:1024
#4  0x00007f7fa328106e in SetProcessBackgrounded() () at ../../base/process/process_linux.cc:143
#5  0x00007f7fa0763ba4 in content::internal::ChildProcessLauncherHelper::SetProcessPriorityOnLauncherThread(base::Process, content::ChildProcessLauncherPriority const&) ()
    at ../../content/browser/child_process_launcher_helper_linux.cc:158
#6  0x00007f7fa016e96c in Invoke<void (content::internal::ChildProcessLauncherHelper::*)(base::Process, content::ChildProcessLauncherPriority const&), scoped_refptr<content::internal::ChildProcessLauncherHelper>, base::Process, content::ChildProcessLauncherPriority> () at ../../base/bind_internal.h:509
#7  MakeItSo<void (content::internal::ChildProcessLauncherHelper::*)(base::Process, content::ChildProcessLauncherPriority const&), scoped_refptr<content::internal::ChildProcessLauncherHelper>, base::Process, content::ChildProcessLauncherPriority> () at ../../base/bind_internal.h:648
#8  RunImpl<void (content::internal::ChildProcessLauncherHelper::*)(base::Process, content::ChildProcessLauncherPriority const&), std::tuple<scoped_refptr<content::internal::ChildProcessLauncherHelper>, base::Process, content::ChildProcessLauncherPriority>, 0, 1, 2> () at ../../base/bind_internal.h:721
#9  RunOnce() () at ../../base/bind_internal.h:690
#10 0x00007f7fa320422c in Run () at ../../base/callback.h:101
#11 RunTask() () at ../../base/task/common/task_annotator.cc:173
#12 0x00007f7fa3237c87 in base::internal::TaskTracker::RunBlockShutdown(base::internal::Task*) () at ../../base/task/thread_pool/task_tracker.cc:668
#13 0x00007f7fa3237482 in RunTaskWithShutdownBehavior () at ../../base/task/thread_pool/task_tracker.cc:682
#14 RunTask() () at ../../base/task/thread_pool/task_tracker.cc:525
#15 0x00007f7fa32787c7 in RunTask() () at ../../base/task/thread_pool/task_tracker_posix.cc:22
#16 0x00007f7fa3236e16 in RunAndPopNextTask() () at ../../base/task/thread_pool/task_tracker.cc:432
#17 0x00007f7fa3241581 in RunWorker() () at ../../base/task/thread_pool/worker_thread.cc:330
#18 0x00007f7fa324120d in base::internal::WorkerThread::RunDedicatedWorker() () at ../../base/task/thread_pool/worker_thread.cc:244
#19 0x00007f7fa32791fe in ThreadFunc() () at ../../base/threading/platform_thread_posix.cc:87
#20 0x00007f7f9c288609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#21 0x00007f7f9c1af293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95



An older CEF version fails as well (for instance: 87.1.11+g8bb7705+chromium-87.0.4280.66) but was working fine with a different Docker image based on Ubuntu 18.04.
Last edited by mezz on Tue Aug 03, 2021 2:27 pm, edited 3 times in total.
mezz
Techie
 
Posts: 13
Joined: Wed Oct 18, 2017 4:10 pm

Re: windowless ceftests in debug mode fail in docker (xvfb-r

Postby magreenblatt » Wed Jul 28, 2021 9:59 am

It looks like you're hitting the DCHECK here. That code isn't new, so I don't know why it only started failing for you recently. Are you using the same docker container for running the old and new CEF versions?
magreenblatt
Site Admin
 
Posts: 11093
Joined: Fri May 29, 2009 6:57 pm

Re: windowless ceftests in debug mode fail in docker (xvfb-r

Postby mezz » Mon Aug 02, 2021 3:08 am

Hi,

thank you for your reply, I confirm that the tests fail with an older CEF version as well (https://cef-builds.spotifycdn.com/cef_b ... 64.tar.bz2).

So it looks like it depends on the Docker container, the main difference in the docker container is the base system version and the libgtk.
As said on a Ubuntu 20.04 physical machine and same library everything seems to work.

Any idea as to why the DCHECK fails and a "Permission denied (13)" is raised?
Thanks

Below the changes in red.

-------------------------------------------------------------------------

FROM ubuntu:18.04 -> ubuntu:20.04

# Install required reporting-web-renderer libraries
ENV DEBIAN_FRONTEND noninteractive
# Install basics libraries
RUN apt-get update && \
apt-get -y install --no-install-recommends \
xvfb \
libgtk2.0-0 \ -> libgtk-3-0

libnss3 \
libxtst6 \
libxss1 \
libgbm1 \
libgconf-2-4 \
libasound2 \
wget \
ca-certificates \
apt-utils \
libpng16-16 \
libatk-bridge2.0-0 \
libxkbcommon-x11-0
mezz
Techie
 
Posts: 13
Joined: Wed Oct 18, 2017 4:10 pm


Return to Support Forum

Who is online

Users browsing this forum: Majestic-12 [Bot] and 19 guests