[webkit-dev] Obtaining backtraces

Michael Catanzaro mcatanzaro at redhat.com
Fri Sep 6 15:28:06 PDT 2024


Hey, sorry you had a bad time. Unfortunately everything on 
https://trac.webkit.org is obsolete. All documentation is on 
https://docs.webkit.org/ nowadays. But we don't yet have any warning 
banner to tell you of this. I have created an issue report: 
https://github.com/WebKit/Documentation/issues/99

Anyway, that documentation has not actually been migrated to the new 
docs website, so there is no newer documentation to point you to. :(

> * Core dumps don't happen any more because of bubblewrap

Hm, I guess the "without systemd" instructions from that wiki page will 
not work anymore, since the core dump is probably created inside the 
sandbox now instead of on your host system? I had never considered this.

I strongly recommend using systemd-coredump. Manual handling of core 
dumps is primitive and, as you've discovered, a waste of your time. I 
wrote a blog post on how to enable this if you haven't already:

https://blogs.gnome.org/mcatanzaro/2021/09/18/creating-quality-backtraces-for-crash-reports/

There is just one trick with WebKit: you have to raise the core size 
limit to prevent systemd from discarding the core dump. Both the trac 
wiki page and my blog post contain instructions for how to do this. We 
really ought to document that somewhere on https://docs.webkit.org.

>  * WEBKIT2_PAUSE_WEB_PROCESS_ON_LAUNCH quietly does nothing
>    unless you happen to have built with DEVELOPER_MODE (won't
>    be the case on a linux distro)

I agree that limiting this to developer mode only makes debugging 
unnecessarily difficult. We should probably change that; I can't think 
of any good reason for limiting it. (But don't use this just to take a 
backtrace, since it's too much effort and a waste of your time.)

> One idea: how hard would it be to skip bubblewrap in a release build 
> if
> some environment variable is set?

Use the environment variable 
WEBKIT_DISABLE_SANDBOX_THIS_IS_DANGEROUS=1. (But certainly don't use 
this just to take a backtrace!)

Michael




More information about the webkit-dev mailing list