How to get backtrace with debug symbols

I’m in the process of reporting gnome-logs coredumping on my system after upgrading to GNOME 48.1.

I’ve been asked to provide a stack trace with included debug symbols. I have to admit I’m not sure how to do it but I read up on ‘Getting traces’ and especially ‘Analyzing a core dump’ in the arch wiki. Not sure if this applies to Manjaro (stable).

I have installed gdb and tried the ‘Examining a previous crash’ way with:

$ coredumpctl debug 25629
(gdb) thread apply all backtrace full

but it seems the backtrace is missing the required ‘debug symbols’ because it contains a lot of ??? placeholders.

The wiki page is not very clear for analyzing a coredump with full debug symbols. Is there an easy way to get this backtrace in the way the gnome-logs maintainers ask for?

Not two weeks ago a similar question has been asked:

This topic doesn’t mention ‘stack trace’ or ‘backtrace’ so it didn’t pop up in my forum search. Why would I look for a solution in a thread titled “Plasma 6: KWallet …”? Whatever! :wink:

The thread only mentions the same wiki page which I already linked in my original post. Unfortunalely that’s not a lot of help. The thing is, the short little paragraph for

2.3 Examining a previous crash

(because I’m not ‘starting a new instance’ or ‘attaching to a running process’ but deal with a coredump file) mainly forwards to Analyzing a core dump.
I’ve done the steps mentioned on there indicated by the code in my first post. It also briefly mentions the problem with missing debugging symbols but only links back to the Getting traces wiki page (closing the loop so to speak) from before.

Back to ‘Getting traces’ the only other info (Manually getting debug info) is marked outdated. The only other clue is about rebuilding an AUR package which gnome-logs clearly isn’t.

That’s where I am right now. I feel like trapped between two wiki pages trying to find a solution to get a good backtrace for reporting.

Manjaro could provide debug symbols for all branches but they don’t. The only way is to switch to unstable branch to be synchronized with Arch repos, then use debug symbols provided by Arch maintainers.

  1. sudo pacman-mirrors --api --set-branch unstable

  2. sudo pacman-mirrors --fasttrack && sudo pacman -Syyu

  3. sudo pacman -S gdb (if gdb was not installed reboot)

  4. coredumpctl to list all core dumps

  5. coredumpctl gdb PID (fetch the correct PID from the previous list)

  6. it will ask you want if you want to use debuginfod to fetch debug symbols from Arch repos, answer Y and wait

  7. when it finishes, type bt then copy the result in your bug report.

3 Likes

For more balanced opinion on this particular subject, readers are invited to read and understand concepts discussed in previous topics;

and any other information available that might help to better understand the difficulties involved.


Additionally, this might be of general interest;

2 Likes

Unstable branch is indeed needed for those who are into core debugging.

If one can call it so - to sum up - why one need to do what @medmedin advises:

  1. Manjaro Linux has three branches
  2. Manjaro Linux builds kernels, kernel extra-modules and in-house applications
  3. Manjaro Linux also provides certain useful packages from Arch User Repository
  4. Around 95% of the Manjaro Linux content is inherited from Arch repositories
  5. Debugging app v0.1.2 in stable branch is moot
  6. Most likely it has been superseded by app v0.1.5 in unstable branch.

The above has the effect that a back trace with debug symbols on an application in stable branch - is essentially debugging an old version - which makes the result obsolete and farily useless.

Back trace and debugging an application only makes sense if you are actually debugging the most recent build.

So if you are really into the debugging and really want to help upstream - switch to unstable branch and use the debug symbols made available for those inherited packages.

Always check who build the package in question and if a newer version is available by using mbn from manjaro-check-repos

mbn info <pkgname> -q

Pamac is one Manjaro Linux Application which has a debug version available.

2 Likes

Wow, thanks a lot to all of you. This seems like a nice and concise collection of everything you should know about ‘Debug symbols’ in Manjaro.

I especially like this one-liner from @soundofthunder’s ‘Debug symbols for all’ page:

coredumpctl debug APP_NAME|PID -A "-ex bt -ex quit" |& tee backtrace.txt

I’ll definitely give this one a try. I’m not switching with my production system to unstable though but will try to fresh install Manjaro on another system.

To the extent practical, setting up a VM might also be an option.

1 Like

That’s a really good idea. I wonder why I didn’t think about it. :sweat_smile:

Funny thing is, it turns out I’m dragging along a virtualbox installation from some experiments years ago. That might come in handy as soon as I have read up on how to configure a virtual machine for Manjaro.

EDIT 25/04/07:
Found a site explaining it. :smiley:

EDIT 25/05/07:
I successfully installed Manjaro in a virtual machine and with @medmedin’s instructions I was able to switch to the unstable branch. I also managed to get a backtrace with debug symbols and hope this helps with fixing the gnome-logs error.

Finally thanks again for all the useful information and help. :smiley:

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.