You are not logged in.

#1 2021-03-05 22:37:13

Maniaxx
Member
Registered: 2014-05-14
Posts: 754

[Solved]Kernel debug symbols available somewhere?

Hallo,
for the crash-utility (kdump analysis) i need kernel debug symbols. As 'makedumpfile' seems outdated i'm trying to dump a backtrace directly in the capture kernel environment instead of saving the dump.

A first test on the main kernel fails already (it uses /dev/mem).

$ sudo crash
crash: /usr/src/linux/vmlinux: no debugging data available
$ sudo crash -g /usr/lib/modules/5.11.2-arch1-1/build/vmlinux
crash: /usr/lib/modules/5.11.2-arch1-1/build/vmlinux: no debugging data available

Doing a 'file /usr/lib/modules/5.11.2-arch1-1/build/vmlinux' shows 'not stripped' but i'm not sure on that. Stripping might have been done here indeed.

Is there a debug kernel available somewhere? Otherwise i would have to compile the kernel every time a new one comes up. I intend to let kdump run for months (or even forever) because logs are always empty after panic.

Edit: On the other hand... there is options=('!strip') and CONFIG_DEBUG_INFO=y. I don't see why the kernel shouldn't be a debug kernel already. If i spawn a panic (echo c > /proc/sysrq-trigger) i get a proper backtrace with symbols indeed. Now i'm confused...

Edit2: This is a wild guess but i think the error messages above are a red herring. This tools are no official kexec tools and coming roughly from the same source (redhat). They probably simply do not work with 5.11 ('makedumpfile' states support for 5.9 in the docs). The official kexec tools (like 'vmproc-dmesg') do work and the dmesg includes a backtrace (with debug symbols). That's at least something. I will modify 'kdump-save.service' to dump dmesg and reboot so this is a fully automatic process after hard crash.

Last edited by Maniaxx (2021-03-06 01:08:53)


sys2064

Offline

#2 2021-12-24 13:03:20

archiebunkerlinux
Member
Registered: 2019-04-18
Posts: 3

Re: [Solved]Kernel debug symbols available somewhere?

This is 75% of a year old with no replies but I'm hoping someone will post some kind of reply here, because the only alternative would be building the kernel from scratch again just to get the debugging symbols.

Offline

#3 2021-12-24 13:41:11

2ManyDogs
Forum Fellow
Registered: 2012-01-15
Posts: 4,645

Re: [Solved]Kernel debug symbols available somewhere?

Why is this marked solved if you are still waiting for replies?

Offline

#4 2021-12-24 15:22:47

archiebunkerlinux
Member
Registered: 2019-04-18
Posts: 3

Re: [Solved]Kernel debug symbols available somewhere?

My hunch is OP thought vmcore-dmesg was working well enough and didn't want to leave the thread open, but the question still remains: Why does gdb think the Arch linux kernel from linux-headers has no debugging symbols when every config file points to the contrary?

Offline

#5 2021-12-25 10:16:18

Maniaxx
Member
Registered: 2014-05-14
Posts: 754

Re: [Solved]Kernel debug symbols available somewhere?

The reason the thread is marked solved is that the question is invalid. The kernel does have debug symbols. The problem that some 3rd party tools are not working is a different one.

I haven't tested GDB but if it doesn't work i would try the git version.


sys2064

Offline

Board footer

Powered by FluxBB