Skip to content

Instantly share code, notes, and snippets.

@benkant
Last active March 19, 2024 02:31
Show Gist options
  • Save benkant/67a38f5b81b3c07ec009b55616f85869 to your computer and use it in GitHub Desktop.
Save benkant/67a38f5b81b3c07ec009b55616f85869 to your computer and use it in GitHub Desktop.
Debugging Chromium on Linux

Use the following to get runtime logs:

browser() {
    chromium-browser --ozone-platform=wayland --enable-features=UseOzonePlatform,VaapiVideoDecoder --allow-sandbox-debugging --enable-logging=stderr --v=1 "$@"
}

After enabling coredumps (see instructions here), test chromium dumps cores to /var/coredumps:

WARNING: This will kill all running Chromium processes. Potentially sensitive information will be in the coredumps. Delete them after encrypting and sending them to your systems engineer.

pid=$(pgrep chromium)
kill -SIGQUIT $pid
ls -la /var/coredumps

Add the following to /etc/security/limits.conf:

* soft core unlimited
* hard core unlimited

Add this to /etc/sysctl.conf:

kernel.core_pattern=/var/coredumps/core.%e.%p.%h.%t
fs.suid_dumpable=1

Apply changes:

sudo sysctl -p

Append this to ~/.bashrc.local:

ulimit -c unlimited

Create a directory for the coredumps and give write permission for all:

sudo mkdir -p /var/coredumps && sudo chmod a+w /var/coredumps
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment