[kernel-debug] Kdump kernel panic's at memblock_alloc_try_nid() or kasan_populate_pmd() function.
Issue
- Kdump kernel is immediately getting panic during testing in kernel-debug environment.
- it is reproducible if the crashkernel reservation set to below 768M.
- Nothing is showing on the console or serial console after issuing the sysrq to the system.
- Found below panic message by adding
earlyprint=ttyS0to the kernel command line.
KASLR disabled: 'nokaslr' on cmdline.
[ 0.000000] Linux version 4.18.0-348.7.1.el8_5.x86_64+debug (mockbuild@x86-vm-08.build.eng.bos.redhat.com) (gcc version 8.5.0 20210514 (Red Hat 8.5.0-4) (GCC)) #1 SMP Wed Dec 8 21:17:08 EST 2021
[ 0.000000] On node 0 totalpages: 65693
[ 0.000000] DMA zone: 3 pages used for memmap
[ 0.000000] DMA zone: 158 pages, LIFO batch:0
[ 0.000000] DMA32 zone: 1024 pages used for memmap
[ 0.000000] DMA32 zone: 65535 pages, LIFO batch:15
[ 0.000000] Kernel panic - not syncing: memblock_alloc_try_nid: Failed to allocate 4096 bytes align=0x1000 nid=0 from=0x1000000 max_addr=0x0 <<----
[ 0.000000] CPU: 0 PID: 0 Comm: swapper Not tainted 4.18.0-348.7.1.el8_5.x86_64+debug #1
[ 0.000000] Hardware name: Red Hat KVM/RHEL-AV, BIOS 1.13.0-2.module+el8.3.0+7353+9de0a3cc 04/01/2014
[ 0.000000] Call Trace:
[ 0.000000] ? dump_stack+0x8e/0xd0
[ 0.000000] ? panic+0x1cc/0x3f3
[ 0.000000] ? __warn_printk+0xdb/0xdb
[ 0.000000] ? memblock_alloc_internal+0x163/0x22a
[ 0.000000] ? memblock_alloc_range+0x11/0x11
[ 0.000000] ? kasan_report+0x20/0x50
[ 0.000000] ? memblock_alloc_try_nid+0x87/0x9d
[ 0.000000] ? kasan_populate_pgd+0x6a0/0x7ed
[ 0.000000] ? kasan_populate_shadow+0xe4/0xf9
[ 0.000000] ? kasan_init+0x47e/0x644
[ 0.000000] ? setup_arch+0x1593/0x1a05
[ 0.000000] ? reserve_standard_io_resources+0x49/0x49
[ 0.000000] ? vprintk_emit+0x164/0x490
[ 0.000000] ? printk+0x9f/0xc5
[ 0.000000] ? kmsg_dump_rewind_nolock+0xd9/0xd9
[ 0.000000] ? cgroup_init_early+0x2ce/0x474
[ 0.000000] ? start_kernel+0xc6/0x7ba
[ 0.000000] ? thread_stack_cache_init+0x6/0x6
[ 0.000000] ? x86_family+0x5/0x20
[ 0.000000] ? load_ucode_bsp+0x49/0x22b
[ 0.000000] ? secondary_startup_64_no_verify+0xc2/0xcb
[ 0.000000] ---[ end Kernel panic - not syncing: memblock_alloc_try_nid: Failed to allocate 4096 bytes align=0x1000 nid=0 from=0x1000000 max_addr=0x0
[ 0.000000] ]---
PANIC: early exception 0x0d IP 10:ffffffff81220e96 error 7eb cr2 0xffff88807e001000
PANIC: early exception 0x0d IP 10:ffffffff819efe5c error 0 cr2 0xffff88807e001000
- In another instance.
[ 0.213768] Kernel panic - not syncing: kasan_populate_pmd+0x137/0x208: Failed to allocate page, nid=0 from=1000000
[ 0.218179] CPU: 0 PID: 0 Comm: swapper Not tainted 5.14.0-39.el9.x86_64+debug #1
[ 0.220125] Hardware name: Red Hat KVM/RHEL-AV, BIOS 0.0.0 02/06/2015
[ 0.221799] Call Trace:
[ 0.222482] ? dump_stack_lvl+0x57/0x7d
[ 0.223507] ? panic+0x216/0x4c9
[ 0.224352] ? __warn_printk+0xf3/0xf3
[ 0.225338] ? memblock_alloc_try_nid_raw+0x102/0x102
[ 0.226661] ? pud_set_huge+0x2b0/0x2b0
[ 0.227671] ? kasan_populate_pmd+0x137/0x208
[ 0.228821] ? early_alloc+0x95/0x99
[ 0.229759] ? kasan_populate_pmd+0x137/0x208
[ 0.230906] ? kasan_populate_pud+0x16f/0x188
[ 0.232054] ? kasan_populate_shadow+0x1a9/0x1fb
[ 0.233278] ? kasan_init+0x49d/0x5f5
[ 0.234253] ? setup_arch+0x1013/0x13c4
[ 0.235270] ? start_kernel+0x74/0x3eb
[ 0.236263] ? secondary_startup_64_no_verify+0xc2/0xcb
[ 0.237735] ---[ end Kernel panic - not syncing: kasan_populate_pmd+0x137/0x208: Failed to allocate page, nid=0 from=1000000 ]---
PANIC: early exception 0x0d IP 10:ffffffff8305b697 error 763 cr2 0xffff88807adff000
Environment
- Red Hat Enterprise Linux 8
- Red Hat Enterprise Linux 9
debug-kernel
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.