scaling_max_freq crash, windowless in Kubernetes (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.

scaling_max_freq crash, windowless in Kubernetes (xvfb-run)

Postby mezz » Thu Mar 07, 2024 3:52 am

Hi,

at least starting from this CEF release: 120.2.7+g4bc6a59+chromium-120.0.6099.234, on Linux (docker base image Ubuntu 22.04 in Kubernetes 1.24) every now and then there are crashes in the main process apparently with these logs:

[0306/043608.630588:ERROR:file_io_posix.cc(145)] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq: No such file or directory (2)
[0306/043608.630506:ERROR:file_io_posix.cc(145)] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq: No such file or directory (2)


The custom CEF client is running within docker (Ubuntu 22.04 base image) with xvfb-run in windowless (off-screen) rendering mode.
The container is running in Kubernetes 1.24.

Is there a combination of CEF parameters we should try to avoid this error?
Thank you, below the details

The processes in the Docker container

1) The main Docker process:

Code: Select all
/bin/sh /usr/bin/xvfb-run -f /home/wuser/rwr/.auth/xvfb.auth -a --server-args=-screen 0, 1024x768x24 [executable path]


2) child CEF zygote process

Code: Select all
[executable path] --type=zygote --no-zygote-sandbox --no-sandbox --log-severity=disable --lang=en-US --user-data-dir=/tmp/rwr --log-file=/reporting-web-renderer/debug.log --crashpad-handler-pid=31


3) child CEF gpu process:

Code: Select all
[executable path] --type=gpu-process --no-sandbox --disable-dev-shm-usage --log-severity=disable --lang=en-US --user-data-dir=/tmp/rwr --crashpad-handler-pid=31 --gpu-preferences=WAAAAAAAAAAgAAAEAAAAAAAAAAAAAAAAAABgAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAGAAAAAAAAAAYAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAA== --use-gl=angle --use-angle=swiftshader-webgl --shared-files --field-trial-handle=0,i,86735786741557433,1928179002731231943,262144 --disable-


The process tree: "ps aux --forest":

Code: Select all
/bin/sh /usr/bin/xvfb-run -f /home/wuser/rwr/.auth/xvfb.auth -a --server-args=-screen 0, 1024x768x24 /[executable path]
\_ Xvfb :99 -screen 0, 1024x768x24 -nolisten tcp -auth /home/wuser/rwr/.auth/xvfb.auth
   \_ /[executable path]
      \_ /[executable path] --type=zygote --no-zygote-sandbox --no-sandbox --log-severity=disable --lang=en-US --user-data-dir=/tmp/rwr --log-file=/mycefclient/debug.log --crashpad-handler-pid=31
      |  \_ /[executable path] --type=gpu-process --no-sandbox --disable-dev-shm-usage --log-severity=disable --lang=en-US --user-data-dir=/tmp/rwr --crashpad-handler-pid=31 --gpu-preferences=WAAAAAAAAAAgAAAEAAAAAAAAAAAAAAAAAABgAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAGAAAAAAAAAAYAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAA== --use-gl=angle --use-angle=swiftshader-webgl --log-file=/mycefclient/debug.log --shared-files --field-trial-handle=0,i,86735786741557433,1928179002731231943,262144 --disable-
      \_ /[executable path] --type=zygote --no-sandbox --log-severity=disable --lang=en-US --user-data-dir=/tmp/rwr --log-file=/mycefclient/debug.log --crashpad-handler-pid=31
      \_ /[executable path] --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --ignore-certificate-errors --ignore-certificate-errors --log-severity=disable --lang=en-US --user-data-dir=/tmp/rwr --crashpad-handler-pid=31 --log-file=/mycefclient/debug.log --shared-files=v8_context_snapshot_data:100 --field-trial-handle=0,i,86735786741557433,1928179002731231943,262144 --disable-features=BackForwardCache,DocumentPictureInPictureAPI --variations-seed-version
/[executable path] --monitor-self-annotation=ptype=crashpad-handler --type=crashpad-handler --no-rate-limit --max-db-size=20 --max-db-age=5 --database=/tmp/rwr --annotation=lsb-release=Ubuntu 22.04.4 LTS --annotation=platform=linux64 --annotation=product=mycefclient --annotation=version=1.0.0 --initial-client-fd=5 --shared-client-connection
Last edited by mezz on Thu Mar 07, 2024 11:25 am, edited 3 times in total.
mezz
Techie
 
Posts: 15
Joined: Wed Oct 18, 2017 4:10 pm

Re: "scaling_max_freq" crash, windowless in docker (xvfb-run

Postby magreenblatt » Thu Mar 07, 2024 9:22 am

ERROR messages are generally not fatal. Can you get a symbolized stack trace for the crash?
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: "scaling_max_freq" crash, windowless in docker (xvfb-run

Postby mezz » Thu Mar 07, 2024 11:20 am

Thank you for your reply,

the docker image is actually running within Kubernetes and upon further investigation I see these logs before the container crashes and then gets restarted.

[0306/043608.630506:ERROR:file_io_posix.cc(145)] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq: No such file or directory (2)
[0306/043608.630588:ERROR:file_io_posix.cc(145)] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq: No such file or directory (2)
Bus error
EXITING WITH CODE 135


I don't know if it could be related to this: https://github.com/docker-library/postgres/issues/451, and the CEF version was a matter of same timing of a k8s release, but I don't think so since the issue started appearing just after the new CEF release.
How could I get a symbolized stack trace for the crash?
I will try to use a posix signal handler and boost::stacktrace::stacktrace() to print out the stack.

Cheers
mezz
Techie
 
Posts: 15
Joined: Wed Oct 18, 2017 4:10 pm

Re: scaling_max_freq crash, windowless in Kubernetes (xvfb-r

Postby magreenblatt » Thu Mar 07, 2024 3:17 pm

How could I get a symbolized stack trace for the crash?

I'm not sure how to get stack traces in Kubernetes specifically, but symbols are already available provided you don't strip libcef.so.
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 188 guests