Re: [systemd-devel] Does coredumpctl info support minidebuginfo / gnu_debugdata ?

2023-11-28 Thread Etienne Cordonnier
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 
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=DwIBAg=ncDTmphkJTvjIDPh0hpF_4vCHvabgGkICC2epckfdiw=AhkbNonVuMIGRfPx_Qj9TsRih1DULJTKUkSGa66m67E=HRBTXvbd-s9li256Vbbs9zIn33TULJrpWyLD4WV4rEtaedXG1zYgtpXt1vN3eolJ=WjU-C5bJAjCxwlzGD-CwjTBUFN_ZEr7Z1pFNC54_HU0=
>> > ).
>> >
>> > 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
>>
>


Re: [systemd-devel] Does coredumpctl info support minidebuginfo / gnu_debugdata ?

2023-11-21 Thread Etienne Cordonnier
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 
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=DwIBAg=ncDTmphkJTvjIDPh0hpF_4vCHvabgGkICC2epckfdiw=AhkbNonVuMIGRfPx_Qj9TsRih1DULJTKUkSGa66m67E=HRBTXvbd-s9li256Vbbs9zIn33TULJrpWyLD4WV4rEtaedXG1zYgtpXt1vN3eolJ=WjU-C5bJAjCxwlzGD-CwjTBUFN_ZEr7Z1pFNC54_HU0=
> > ).
> >
> > 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
>


Re: [systemd-devel] Does coredumpctl info support minidebuginfo / gnu_debugdata ?

2023-11-17 Thread Lennart Poettering
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://sourceware.org/git/?p=elfutils.git;a=commit;h=5083a70d3b64946fa47ea5766943a15a3ecc6891
> ).
>
> 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


[systemd-devel] Does coredumpctl info support minidebuginfo / gnu_debugdata ?

2023-11-16 Thread Etienne Cordonnier
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://sourceware.org/git/?p=elfutils.git;a=commit;h=5083a70d3b64946fa47ea5766943a15a3ecc6891
).

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.

Thanks,
Etienne Cordonnier