Hi, for future reference the issue in Fedora was the configuration "ProtectHome=yes" in systemd-coredump's service file (Ubuntu does the same), which makes the home directory invisible to systemd-coredump, and thus "coredumpctl info" shows "n/a" instead of function names in call stacks even if the binaries have full debug symbols.
Etienne On Tue, Nov 28, 2023 at 1:11 PM Etienne Cordonnier <ecordonn...@snap.com> wrote: > I found the issue in the yocto based distribution: elfutils / libdw was > compiled without xz support, and was thus unable to extract the > minidebuginfo symbol names. > On Ubuntu / Fedora, I don't know exactly what the issue is. > > Etienne > > On Tue, Nov 21, 2023 at 11:53 PM Etienne Cordonnier <ecordonn...@snap.com> > wrote: > >> Thanks for your reply. I have tested with Fedora 39 and indeed >> coredumpctl info shows function names when a binary provided by a Fedora >> package crashes. However, when I compile a test binary on Fedora, even with >> debug symbols enabled (I tried -g and -ggdb), and I then send kill -SEGV my >> binary, coredumpctl info shows "n/a" instead of the function names of my >> test binary. I also tried to inject minidebuginfo into my binary file with >> the same result. >> >> Do you know what I should do so that coredumpctl info also works with >> binary files I compile? (I added full reproduction steps including the code >> of this test binary to >> https://unix.stackexchange.com/questions/761966/how-to-get-symbolized-call-stacks-with-coredumpctl-info >> ). >> >> Etienne >> >> On Fri, Nov 17, 2023 at 10:03 AM Lennart Poettering < >> lenn...@poettering.net> wrote: >> >>> On Do, 16.11.23 18:37, Etienne Cordonnier (ecordonn...@snap.com) wrote: >>> >>> > Hello, >>> > I am testing a yocto based system, where it seems that "coredumpctl >>> info" >>> > isn't able to use minidebuginfo / gnu_debugdata to extract a symbolized >>> > call-stack. I saw in the code that coredumpctl uses elfutils / libdwfl >>> in >>> > order to extract a call-stack, and as far as I understand libdwfl >>> supports >>> > minidebuginfo since this commit ( >>> > >>> https://urldefense.proofpoint.com/v2/url?u=https-3A__sourceware.org_git_-3Fp-3Delfutils.git-3Ba-3Dcommit-3Bh-3D5083a70d3b64946fa47ea5766943a15a3ecc6891&d=DwIBAg&c=ncDTmphkJTvjIDPh0hpF_4vCHvabgGkICC2epckfdiw&r=AhkbNonVuMIGRfPx_Qj9TsRih1DULJTKUkSGa66m67E&m=HRBTXvbd-s9li256Vbbs9zIn33TULJrpWyLD4WV4rEtaedXG1zYgtpXt1vN3eolJ&s=WjU-C5bJAjCxwlzGD-CwjTBUFN_ZEr7Z1pFNC54_HU0&e= >>> > ). >>> > >>> > Is there a configuration / build-option / etc. to enable support for >>> > minidebuginfo in coredumpctl? If no is it on the roadmap? The >>> advantage of >>> > minidebuginfo is that it is much smaller than full debug symbols. >>> >>> Fedora has been using minidebuginfo since ~10y or so, and >>> coredumctl/libdwfl has been working fine with it. So it certainly >>> works, it's how this all works on my local machine since forever. >>> >>> Maybe ask your distro for help, it's generally an integration issue of >>> distributions i this doesn't work. >>> >>> Lennart >>> >>> -- >>> Lennart Poettering, Berlin >>> >>