Skip to content
This repository was archived by the owner on Aug 11, 2025. It is now read-only.
This repository was archived by the owner on Aug 11, 2025. It is now read-only.

gdb can not parse backtrace #2

@ZjW1nd

Description

@ZjW1nd

Gdb only read ELF format vmcore which misses the vmalloc map in LOAD header, so that when CONFIG_VMAP_STACK is on, gdb can't get backtrace of the kernel because it can't access 0xffffc900 addr.

I use:

  • gdb 16.2
  • vmcore linux version: 6.13.7
  • libkdumpfile 0.5.5 from pacman
  • pykdumpfile from pip
  • python 3.13.2

When VMAP_STACK is on, after using this gdbserver I found that gdb can access 0xffffc900 addr by using x /20gx 0xffffc90000233dd0, but when I use bt, it still cannot get correct backtrace.

pwndbg> bt
#0  0xffffffff811d440b in crash_prepare_elf64_headers (mem=0xffffc90000233dd8, need_kernel_map=0, addr=0x0 <fixed_percpu_data>, 
    sz=0xffffffffa00041b8) at kernel/crash_core.c:210
#1  0x00000000000001a0 in ?? ()
#2  0x0000000000000000 in ?? ()

pwndbg> x /20gx 0xffffc90000233dd8
0xffffc90000233dd8:     0x0000000000000008      0xffffc90000233e58
0xffffc90000233de8:     0xffffc90000233df8      0xf2a511a248595700
0xffffc90000233df8:     0x0000000000000008      0x0000000000000001
...

pwndbg> vmmap
There are no mappings for specified address or module.

PS: my gdb version has a bug which leads to a instant segfault when I execute gdb vmlinux vmcore (I dont know if it's related with this bug and I didn't find any solutions).

For other gdb15 in my ubuntu24.04 docker, it do work. But python3-libkdumpfile(0.5.4) from apt maybe too old, i cant run the script. Even if I build pykdumpfile by python setup.py, gdb still cant read 0xffffc90.

That's all I encountered. I dont know what is going on with all of this, so I just turned CONFIG_VMAP_STACK off now. 😫

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions