CINXE.COM
Stack Traces - GNOME Project Handbook
<!doctype html> <html class="no-js" lang="en" data-content_root=""> <head><meta charset="utf-8"/> <meta name="viewport" content="width=device-width,initial-scale=1"/> <meta name="color-scheme" content="light dark"><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" /> <meta property="og:title" content="Stack Traces" /> <meta property="og:type" content="website" /> <meta property="og:url" content="https://handbook.gnome.org/issues/stack-traces.html" /> <meta property="og:site_name" content="GNOME Project Handbook" /> <meta property="og:description" content="When a program on your computer crashes, a core dump is generated which stores the state of the program at the time of the crash. The core dump can be used to generate a stack trace, which allows d..." /> <meta property="og:image:width" content="1146" /> <meta property="og:image:height" content="600" /> <meta property="og:image" content="https://handbook.gnome.org/_images/social_previews/summary_issues_stack-traces_aafcc707.png" /> <meta property="og:image:alt" content="When a program on your computer crashes, a core dump is generated which stores the state of the program at the time of the crash. The core dump can be used t..." /> <meta name="description" content="When a program on your computer crashes, a core dump is generated which stores the state of the program at the time of the crash. The core dump can be used to generate a stack trace, which allows d..." /> <meta name="twitter:card" content="summary_large_image" /> <link rel="index" title="Index" href="../genindex.html" /><link rel="search" title="Search" href="../search.html" /><link rel="next" title="Issue Management" href="management.html" /><link rel="prev" title="Issue Reporting" href="reporting.html" /> <link rel="shortcut icon" href="../_static/handbook.ico"/><!-- Generated with Sphinx 6.2.1 and Furo 2024.01.29 --> <title>Stack Traces - GNOME Project Handbook</title> <link rel="stylesheet" type="text/css" href="../_static/pygments.css" /> <link rel="stylesheet" type="text/css" href="../_static/styles/furo.css?digest=369552022d0b975c8e74270ce6eabe0fb7978f24" /> <link rel="stylesheet" type="text/css" href="../_static/styles/furo-extensions.css?digest=30d1aed668e5c3a91c3e3bf6a60b675221979f0e" /> <link rel="stylesheet" type="text/css" href="../_static/gnome.css" /> <style> body { --color-code-background: #f8f8f8; --color-code-foreground: black; --color-brand-primary: #4a86cf; --color-brand-content: #4a86cf; } @media not print { body[data-theme="dark"] { --color-code-background: #202020; --color-code-foreground: #d0d0d0; } @media (prefers-color-scheme: dark) { body:not([data-theme="light"]) { --color-code-background: #202020; --color-code-foreground: #d0d0d0; } } } </style> <!-- Matomo --> <script> var _paq = window._paq = window._paq || []; /* tracker methods like "setCustomDimension" should be called before "trackPageView" */ _paq.push(['trackPageView']); _paq.push(['enableLinkTracking']); (function() { var u="//webstats.gnome.org/"; _paq.push(['setTrackerUrl', u+'matomo.php']); _paq.push(['setSiteId', '46']); var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s); })(); </script> <!-- End Matomo Code --> </head> <body> <script> document.body.dataset.theme = localStorage.getItem("theme") || "auto"; </script> <svg xmlns="http://www.w3.org/2000/svg" style="display: none;"> <symbol id="svg-toc" viewBox="0 0 24 24"> <title>Contents</title> <svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 1024 1024"> <path d="M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM115.4 518.9L271.7 642c5.8 4.6 14.4.5 14.4-6.9V388.9c0-7.4-8.5-11.5-14.4-6.9L115.4 505.1a8.74 8.74 0 0 0 0 13.8z"/> </svg> </symbol> <symbol id="svg-menu" viewBox="0 0 24 24"> <title>Menu</title> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather-menu"> <line x1="3" y1="12" x2="21" y2="12"></line> <line x1="3" y1="6" x2="21" y2="6"></line> <line x1="3" y1="18" x2="21" y2="18"></line> </svg> </symbol> <symbol id="svg-arrow-right" viewBox="0 0 24 24"> <title>Expand</title> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather-chevron-right"> <polyline points="9 18 15 12 9 6"></polyline> </svg> </symbol> <symbol id="svg-sun" viewBox="0 0 24 24"> <title>Light mode</title> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="feather-sun"> <circle cx="12" cy="12" r="5"></circle> <line x1="12" y1="1" x2="12" y2="3"></line> <line x1="12" y1="21" x2="12" y2="23"></line> <line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line> <line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line> <line x1="1" y1="12" x2="3" y2="12"></line> <line x1="21" y1="12" x2="23" y2="12"></line> <line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line> <line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line> </svg> </symbol> <symbol id="svg-moon" viewBox="0 0 24 24"> <title>Dark mode</title> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-moon"> <path stroke="none" d="M0 0h24v24H0z" fill="none" /> <path d="M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454z" /> </svg> </symbol> <symbol id="svg-sun-half" viewBox="0 0 24 24"> <title>Auto light/dark mode</title> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-shadow"> <path stroke="none" d="M0 0h24v24H0z" fill="none"/> <circle cx="12" cy="12" r="9" /> <path d="M13 12h5" /> <path d="M13 15h4" /> <path d="M13 18h1" /> <path d="M13 9h4" /> <path d="M13 6h1" /> </svg> </symbol> </svg> <input type="checkbox" class="sidebar-toggle" name="__navigation" id="__navigation"> <input type="checkbox" class="sidebar-toggle" name="__toc" id="__toc"> <label class="overlay sidebar-overlay" for="__navigation"></label> <label class="overlay toc-overlay" for="__toc"></label> <div class="page"> <header class="mobile-header"> <div class="header-left"> <label class="nav-overlay-icon" for="__navigation"> <i class="icon"><svg><use href="#svg-menu"></use></svg></i> </label> </div> <div class="header-center"> <a href="../index.html"><div class="brand">GNOME Project Handbook</div></a> </div> <div class="header-right"> <div class="theme-toggle-container theme-toggle-header"> <button class="theme-toggle"> <div class="visually-hidden">Toggle Light / Dark / Auto color theme</div> <svg class="theme-icon-when-auto"><use href="#svg-sun-half"></use></svg> <svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg> <svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg> </button> </div> <label class="toc-overlay-icon toc-header-icon" for="__toc"> <div class="visually-hidden">Toggle table of contents sidebar</div> <i class="icon"><svg><use href="#svg-toc"></use></svg></i> </label> </div> </header> <aside class="sidebar-drawer"> <div class="sidebar-container"> <div class="sidebar-sticky"><a class="sidebar-brand" href="../index.html"> <span class="sidebar-brand-text">GNOME Project Handbook</span> </a><form class="sidebar-search-container" method="get" action="../search.html" role="search"> <input class="sidebar-search" placeholder="Search" name="q" aria-label="Search"> <input type="hidden" name="check_keywords" value="yes"> <input type="hidden" name="area" value="default"> </form> <div id="searchbox"></div><div class="sidebar-scroll"><div class="sidebar-tree"> <ul class="current"> <li class="toctree-l1 has-children"><a class="reference internal" href="../get-in-touch.html">Get in Touch</a><input class="toctree-checkbox" id="toctree-checkbox-1" name="toctree-checkbox-1" role="switch" type="checkbox"/><label for="toctree-checkbox-1"><div class="visually-hidden">Toggle navigation of Get in Touch</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul> <li class="toctree-l2"><a class="reference internal" href="../get-in-touch/matrix.html">Matrix</a></li> <li class="toctree-l2"><a class="reference internal" href="../get-in-touch/discourse.html">Discourse</a></li> </ul> </li> <li class="toctree-l1 has-children"><a class="reference internal" href="../news.html">Project News</a><input class="toctree-checkbox" id="toctree-checkbox-2" name="toctree-checkbox-2" role="switch" type="checkbox"/><label for="toctree-checkbox-2"><div class="visually-hidden">Toggle navigation of Project News</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul> <li class="toctree-l2"><a class="reference internal" href="../news/planet-gnome.html">Planet GNOME</a></li> </ul> </li> <li class="toctree-l1"><a class="reference internal" href="../teams.html">Teams</a></li> <li class="toctree-l1"><a class="reference internal" href="../governance.html">Governance</a></li> <li class="toctree-l1 has-children"><a class="reference internal" href="../foundation.html">Foundation</a><input class="toctree-checkbox" id="toctree-checkbox-3" name="toctree-checkbox-3" role="switch" type="checkbox"/><label for="toctree-checkbox-3"><div class="visually-hidden">Toggle navigation of Foundation</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul> <li class="toctree-l2 has-children"><a class="reference internal" href="../foundation/board-of-directors.html">Board of Directors</a><input class="toctree-checkbox" id="toctree-checkbox-4" name="toctree-checkbox-4" role="switch" type="checkbox"/><label for="toctree-checkbox-4"><div class="visually-hidden">Toggle navigation of Board of Directors</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul> <li class="toctree-l3"><a class="reference internal" href="../foundation/board-of-directors/officers.html">Officers</a></li> <li class="toctree-l3"><a class="reference internal" href="../foundation/board-of-directors/previous-boards.html">Previous Boards</a></li> </ul> </li> <li class="toctree-l2 has-children"><a class="reference internal" href="../foundation/committees.html">Committees</a><input class="toctree-checkbox" id="toctree-checkbox-5" name="toctree-checkbox-5" role="switch" type="checkbox"/><label for="toctree-checkbox-5"><div class="visually-hidden">Toggle navigation of Committees</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul> <li class="toctree-l3"><a class="reference internal" href="../foundation/committees/circle.html">Circle Committee</a></li> <li class="toctree-l3"><a class="reference internal" href="../foundation/committees/coc.html">Code of Conduct Committee</a></li> <li class="toctree-l3"><a class="reference internal" href="../foundation/committees/compensation.html">Compensation Committee</a></li> <li class="toctree-l3"><a class="reference internal" href="../foundation/committees/executive.html">Executive Committee</a></li> <li class="toctree-l3"><a class="reference internal" href="../foundation/committees/finance.html">Finance Committee</a></li> <li class="toctree-l3"><a class="reference internal" href="../foundation/committees/governance.html">Governance Committee</a></li> <li class="toctree-l3"><a class="reference internal" href="../foundation/committees/governance.html#committee-charter">Committee Charter</a></li> <li class="toctree-l3"><a class="reference internal" href="../foundation/committees/internship.html">Internship Committee</a></li> <li class="toctree-l3"><a class="reference internal" href="../foundation/committees/membership-and-elections.html">Membership & Elections Committee</a></li> <li class="toctree-l3"><a class="reference internal" href="../foundation/committees/travel.html">Travel Committee</a></li> </ul> </li> <li class="toctree-l2"><a class="reference internal" href="../foundation/membership-benefits.html">Membership Benefits</a></li> </ul> </li> <li class="toctree-l1 has-children"><a class="reference internal" href="../infrastructure.html">Infrastructure</a><input class="toctree-checkbox" id="toctree-checkbox-6" name="toctree-checkbox-6" role="switch" type="checkbox"/><label for="toctree-checkbox-6"><div class="visually-hidden">Toggle navigation of Infrastructure</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul> <li class="toctree-l2"><a class="reference internal" href="../infrastructure/developer-access.html">Developer Access</a></li> <li class="toctree-l2 has-children"><a class="reference internal" href="../infrastructure/accounts.html">Accounts</a><input class="toctree-checkbox" id="toctree-checkbox-7" name="toctree-checkbox-7" role="switch" type="checkbox"/><label for="toctree-checkbox-7"><div class="visually-hidden">Toggle navigation of Accounts</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul> <li class="toctree-l3"><a class="reference internal" href="../infrastructure/accounts/managing-accounts.html">Managing Accounts</a></li> </ul> </li> <li class="toctree-l2"><a class="reference internal" href="../infrastructure/email-aliases.html">Email Aliases</a></li> <li class="toctree-l2"><a class="reference internal" href="../infrastructure/blog-hosting.html">Blog Hosting</a></li> <li class="toctree-l2 has-children"><a class="reference internal" href="../infrastructure/gitlab.html">GitLab</a><input class="toctree-checkbox" id="toctree-checkbox-8" name="toctree-checkbox-8" role="switch" type="checkbox"/><label for="toctree-checkbox-8"><div class="visually-hidden">Toggle navigation of GitLab</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul> <li class="toctree-l3"><a class="reference internal" href="../infrastructure/gitlab/hosting-requirements.html">Hosting Requirements</a></li> <li class="toctree-l3"><a class="reference internal" href="../infrastructure/gitlab/new-gnome-project.html">New GNOME Projects</a></li> </ul> </li> <li class="toctree-l2"><a class="reference internal" href="../infrastructure/ssh-keys.html">SSH Keys</a></li> <li class="toctree-l2"><a class="reference internal" href="../infrastructure/contact.html">Contact</a></li> </ul> </li> <li class="toctree-l1 has-children"><a class="reference internal" href="../release-planning.html">Release Planning</a><input class="toctree-checkbox" id="toctree-checkbox-9" name="toctree-checkbox-9" role="switch" type="checkbox"/><label for="toctree-checkbox-9"><div class="visually-hidden">Toggle navigation of Release Planning</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul> <li class="toctree-l2"><a class="reference internal" href="../release-planning/freezes.html">Freezes</a></li> <li class="toctree-l2"><a class="reference internal" href="../release-planning/release-team.html">Release Team</a></li> </ul> </li> <li class="toctree-l1 has-children"><a class="reference internal" href="../development.html">Development</a><input class="toctree-checkbox" id="toctree-checkbox-10" name="toctree-checkbox-10" role="switch" type="checkbox"/><label for="toctree-checkbox-10"><div class="visually-hidden">Toggle navigation of Development</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul> <li class="toctree-l2"><a class="reference internal" href="../development/change-submission.html">Change Submission</a></li> <li class="toctree-l2"><a class="reference internal" href="../development/commit-messages.html">Commit Messages</a></li> <li class="toctree-l2"><a class="reference internal" href="../development/building.html">Building</a></li> <li class="toctree-l2"><a class="reference internal" href="../development/toolbx.html">Building With Toolbx</a></li> <li class="toctree-l2"><a class="reference internal" href="../development/legal.html">Legal</a></li> </ul> </li> <li class="toctree-l1"><a class="reference internal" href="../testing.html">Testing</a></li> <li class="toctree-l1 current has-children"><a class="reference internal" href="../issues.html">Issue Tracking</a><input checked="" class="toctree-checkbox" id="toctree-checkbox-11" name="toctree-checkbox-11" role="switch" type="checkbox"/><label for="toctree-checkbox-11"><div class="visually-hidden">Toggle navigation of Issue Tracking</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul class="current"> <li class="toctree-l2"><a class="reference internal" href="reporting.html">Issue Reporting</a></li> <li class="toctree-l2 current current-page"><a class="current reference internal" href="#">Stack Traces</a></li> <li class="toctree-l2"><a class="reference internal" href="management.html">Issue Management</a></li> <li class="toctree-l2"><a class="reference internal" href="review.html">Issue Review</a></li> <li class="toctree-l2"><a class="reference internal" href="stock-responses.html">Stock Responses</a></li> <li class="toctree-l2"><a class="reference internal" href="template.html">New Issue Template</a></li> </ul> </li> <li class="toctree-l1 has-children"><a class="reference internal" href="../maintainers.html">Maintainers</a><input class="toctree-checkbox" id="toctree-checkbox-12" name="toctree-checkbox-12" role="switch" type="checkbox"/><label for="toctree-checkbox-12"><div class="visually-hidden">Toggle navigation of Maintainers</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul> <li class="toctree-l2"><a class="reference internal" href="../maintainers/making-a-release.html">Making a Release</a></li> <li class="toctree-l2"><a class="reference internal" href="../maintainers/signing-releases.html">Release Signing</a></li> <li class="toctree-l2"><a class="reference internal" href="../maintainers/release-pipeline.html">Release Pipeline</a></li> <li class="toctree-l2"><a class="reference internal" href="../maintainers/branches.html">Branches</a></li> <li class="toctree-l2"><a class="reference internal" href="../maintainers/issue-management.html">Issue Management</a></li> </ul> </li> <li class="toctree-l1 has-children"><a class="reference internal" href="../events.html">Events</a><input class="toctree-checkbox" id="toctree-checkbox-13" name="toctree-checkbox-13" role="switch" type="checkbox"/><label for="toctree-checkbox-13"><div class="visually-hidden">Toggle navigation of Events</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul> <li class="toctree-l2"><a class="reference internal" href="../events/guadec.html">GUADEC</a></li> <li class="toctree-l2"><a class="reference internal" href="../events/gnome.asia.html">GNOME.Asia</a></li> <li class="toctree-l2 has-children"><a class="reference internal" href="../events/hackfests.html">Hackfests</a><input class="toctree-checkbox" id="toctree-checkbox-14" name="toctree-checkbox-14" role="switch" type="checkbox"/><label for="toctree-checkbox-14"><div class="visually-hidden">Toggle navigation of Hackfests</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul> <li class="toctree-l3"><a class="reference internal" href="../events/hackfests/organizing.html">Organize a Hackfest</a></li> <li class="toctree-l3"><a class="reference internal" href="../events/hackfests/template.html">Hackfest Template</a></li> </ul> </li> <li class="toctree-l2 has-children"><a class="reference internal" href="../events/travel.html">Travel</a><input class="toctree-checkbox" id="toctree-checkbox-15" name="toctree-checkbox-15" role="switch" type="checkbox"/><label for="toctree-checkbox-15"><div class="visually-hidden">Toggle navigation of Travel</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul> <li class="toctree-l3"><a class="reference internal" href="../events/travel/sponsorship-policy.html">Travel Sponsorship Policy</a></li> </ul> </li> </ul> </li> </ul> </div> </div> </div> </div> </aside> <div class="main"> <div class="content"> <div class="article-container"> <a href="#" class="back-to-top muted-link"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"> <path d="M13 20h-2V8l-5.5 5.5-1.42-1.42L12 4.16l7.92 7.92-1.42 1.42L13 8v12z"></path> </svg> <span>Back to top</span> </a> <div class="content-icon-container"> <div class="edit-this-page"> <a class="muted-link" href="https://gitlab.gnome.org/Teams/Websites/handbook.gnome.org/-/edit/main/source/issues/stack-traces.rst" title="Edit this page"> <svg aria-hidden="true" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"/> <path d="M4 20h4l10.5 -10.5a1.5 1.5 0 0 0 -4 -4l-10.5 10.5v4" /> <line x1="13.5" y1="6.5" x2="17.5" y2="10.5" /> </svg> <span class="visually-hidden">Edit this page</span> </a> </div><div class="theme-toggle-container theme-toggle-content"> <button class="theme-toggle"> <div class="visually-hidden">Toggle Light / Dark / Auto color theme</div> <svg class="theme-icon-when-auto"><use href="#svg-sun-half"></use></svg> <svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg> <svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg> </button> </div> <label class="toc-overlay-icon toc-content-icon" for="__toc"> <div class="visually-hidden">Toggle table of contents sidebar</div> <i class="icon"><svg><use href="#svg-toc"></use></svg></i> </label> </div> <article role="main" id="furo-main-content"> <section id="stack-traces"> <h1>Stack Traces<a class="headerlink" href="#stack-traces" title="Permalink to this heading">#</a></h1> <p>When a program on your computer crashes, a core dump is generated which stores the state of the program at the time of the crash. The core dump can be used to generate a stack trace, which allows developers to investigate and hopefully fix the crash. Developers expect you to attach a stack trace to your issue report whenever reporting a crash. This page describes how to generate this stack trace.</p> <p>Stack traces are also called “backtraces.” They are the same thing.</p> <section id="prerequisites"> <h2>Prerequisites<a class="headerlink" href="#prerequisites" title="Permalink to this heading">#</a></h2> <p>This guide uses a simple method to generate stack traces, which works on many modern Linux systems. To check whether you can use this simple method, you need to verify whether your system has both systemd-coredump and debuginfod enabled.</p> <p>To check whether systemd-coredump is enabled, run:</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ cat /proc/sys/kernel/core_pattern </pre></div> </div> <p>This should return some text that includes <code class="docutils literal notranslate"><span class="pre">systemd-coredump</span></code>.</p> <p>To check whether debuginfod is enabled, run:</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ echo $DEBUGINFOD_URLS </pre></div> </div> <p>This should return a URL.</p> <p>If either of these tests fail, then you will need to get the stack trace manually. See <a class="reference external" href="https://blogs.gnome.org/mcatanzaro/2021/09/18/creating-quality-backtraces-for-crash-reports/">this blog post</a> for details on how to do this.</p> </section> <section id="simple-stack-traces"> <h2>Simple stack traces<a class="headerlink" href="#simple-stack-traces" title="Permalink to this heading">#</a></h2> <p>If your system has the prerequisites described above, and the crash you are reporting is not from a Flatpak app, you can follow the steps below.</p> <p>First install <code class="docutils literal notranslate"><span class="pre">gdb</span></code>, the GNU debugger, if it’s not already installed. Then simply run these commands:</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ coredumpctl gdb (gdb) bt full </pre></div> </div> <p>This will generate a stack trace for the last crash that happened on the system. As this happens you will likely be asked some questions:</p> <ul class="simple"> <li><p>If you are asked <code class="docutils literal notranslate"><span class="pre">Enable</span> <span class="pre">debuginfod</span> <span class="pre">for</span> <span class="pre">this</span> <span class="pre">session?</span> <span class="pre">(y</span> <span class="pre">or</span> <span class="pre">[n])</span></code>, enter <code class="docutils literal notranslate"><span class="pre">y</span></code> and press return.</p></li> <li><p>If you are asked whether to continue without paging, enter <code class="docutils literal notranslate"><span class="pre">c</span></code> and press return. (You may need to do this multiple times.)</p></li> <li><p>Once the prompt shows <code class="docutils literal notranslate"><span class="pre">(gdb)</span></code> again, then the full stack trace has been printed. Enter <code class="docutils literal notranslate"><span class="pre">q</span></code> and press return to quit.</p></li> </ul> <p>Now copy everything that printed after you typed <cite>bt full</cite> into a text file and attach it to your issue report. That’s it! You’re done.</p> </section> <section id="stack-traces-for-flatpak-apps"> <h2>Stack traces for Flatpak apps<a class="headerlink" href="#stack-traces-for-flatpak-apps" title="Permalink to this heading">#</a></h2> <p>Getting a stack trace for a Flatpak app is very similar to the method described above, but requires some extra setup steps.</p> <section id="install-debug-extensions"> <h3>Install debug extensions<a class="headerlink" href="#install-debug-extensions" title="Permalink to this heading">#</a></h3> <p>To get a stack trace for most Flatpak apps, including those distributed by GNOME or by Flathub, you have to first install debug extensions for both the Flatpak app and the runtime that it uses.</p> <p>To start, get the ID of the app that you want to generate the stack trace for. To do this, run <code class="docutils literal notranslate"><span class="pre">flatpak</span> <span class="pre">list</span></code> and check the Application ID column for the app. For example, for GNOME Web the app ID appears as <code class="docutils literal notranslate"><span class="pre">org.gnome.Epiphany</span></code>.</p> <p>Next, confirm the ID of the runtime that the app uses. For example:</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ flatpak info org.gnome.Epiphany | grep Runtime Runtime: org.gnome.Platform/x86_64/master </pre></div> </div> <p>In this example, <code class="docutils literal notranslate"><span class="pre">org.gnome.Platform</span></code> is the ID of the runtime. This is the GNOME runtime.</p> <p>Now it’s time to install the debug extensions. Here, you need to install the app’s debug extension, the SDK which matches the runtime being used by the app, and the SDK’s debug extension. For example, for GNOME Web using the GNOME runtime, you would run:</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ flatpak install org.gnome.Epiphany.Debug $ flatpak install org.gnome.Sdk $ flatpak install org.gnome.Sdk.Debug </pre></div> </div> <p>Note: if the crash happened in a Flatpak built by Fedora, there are no debug extensions. Instead, you will only need to install the <code class="docutils literal notranslate"><span class="pre">org.fedoraproject.Sdk</span></code> runtime corresponding to the version of the <code class="docutils literal notranslate"><span class="pre">org.fedoraproject.Platform</span></code> that the application uses.</p> <p>Finally, you will need to run <code class="docutils literal notranslate"><span class="pre">flatpak</span> <span class="pre">update</span></code> to be certain that the versions of the debug extensions exactly match the version of the runtime and application:</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ flatpak update </pre></div> </div> </section> <section id="get-the-stack-trace"> <h3>Get the stack trace<a class="headerlink" href="#get-the-stack-trace" title="Permalink to this heading">#</a></h3> <p>Once you have installed the debug extensions, you’re ready to take the stack trace. This works similarly to taking a stack trace for processes that aren’t Flatpak apps, but you’ll use the <code class="docutils literal notranslate"><span class="pre">flatpak-coredumpctl</span></code> command instead of using <code class="docutils literal notranslate"><span class="pre">coredumpctl</span></code> directly, like so:</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ flatpak-coredumpctl org.gnome.Epiphany (gdb) bt full </pre></div> </div> <p>If neither the app nor the runtime was updated when you ran <code class="docutils literal notranslate"><span class="pre">flatpak</span> <span class="pre">update</span></code>, then you can run this without having to wait for the app to crash again. However, if either the app or runtime was updated, you’ll need to reproduce the crash before you can run the commands.</p> <p>Then follow the rest of the simple stack trace instructions to view the stack trace and copy it.</p> </section> </section> </section> </article> </div> <footer> <div class="related-pages"> <a class="next-page" href="management.html"> <div class="page-info"> <div class="context"> <span>Next</span> </div> <div class="title">Issue Management</div> </div> <svg class="furo-related-icon"><use href="#svg-arrow-right"></use></svg> </a> <a class="prev-page" href="reporting.html"> <svg class="furo-related-icon"><use href="#svg-arrow-right"></use></svg> <div class="page-info"> <div class="context"> <span>Previous</span> </div> <div class="title">Issue Reporting</div> </div> </a> </div> </footer> </div> <aside class="toc-drawer"> <div class="toc-sticky toc-scroll"> <div class="toc-title-container"> <span class="toc-title"> On this page </span> </div> <div class="toc-tree-container"> <div class="toc-tree"> <ul> <li><a class="reference internal" href="#">Stack Traces</a><ul> <li><a class="reference internal" href="#prerequisites">Prerequisites</a></li> <li><a class="reference internal" href="#simple-stack-traces">Simple stack traces</a></li> <li><a class="reference internal" href="#stack-traces-for-flatpak-apps">Stack traces for Flatpak apps</a><ul> <li><a class="reference internal" href="#install-debug-extensions">Install debug extensions</a></li> <li><a class="reference internal" href="#get-the-stack-trace">Get the stack trace</a></li> </ul> </li> </ul> </li> </ul> </div> </div> </div> </aside> </div> </div><script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script> <script src="../_static/doctools.js"></script> <script src="../_static/sphinx_highlight.js"></script> <script src="../_static/scripts/furo.js"></script> </body> </html>