Bug 209351 - kdump doesn't work since v5.4 on Ryzen 2700x
Summary: kdump doesn't work since v5.4 on Ryzen 2700x
Status: NEW
Alias: None
Product: Drivers
Classification: Unclassified
Component: IOMMU (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: drivers_iommu
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-09-22 20:30 UTC by troygraben
Modified: 2020-11-27 00:04 UTC (History)
1 user (show)

See Also:
Kernel Version: 5.4.0-rc3
Subsystem:
Regression: No
Bisected commit-id:


Attachments
photo of terminal after crashing the kernel (406.58 KB, image/jpeg)
2020-09-22 20:30 UTC, troygraben
Details
v5.4 kdump config (142.63 KB, application/x-troff-man)
2020-09-22 20:55 UTC, troygraben
Details

Description troygraben 2020-09-22 20:30:42 UTC
Created attachment 292559 [details]
photo of terminal after crashing the kernel

I'm running Arch Linux on an Ryzen 2700x. kdump doesn't work with more recent kernels. I've bisected to the following commit:

be62dbf554c5b50718a54a359372c148cd9975c7
iommu/amd: Convert AMD iommu driver to the dma-iommu api


Booting the kernel with kexec right away (without the -p flag) still works on most recent kernel versions. The most recent version tried is v5.9-rc5. I use the following command to test.
$ kexec /boot/vmlinuz-linux-kdump --initrd=/boot/initramfs-linux-kdump.img --reuse-cmdline


Trying to use kdump doesn't work. I've set up the kexec crash kernel and use sysrq to crash the kernel.
$ kexec -p /boot/vmlinuz-linux-kdump --initrd=/boot/initramfs-linux-kdump.img --append="root=UUID=1558db24-61ba-4fcd-ae27-63571a6243c2 single irqpoll nr_cpus=1 reset_devices"
$ cat /sys/kernel/kexec_crash_loaded 
1
$ echo c | sudo tee /proc/sysrq-trigger

The attached kdump.jpg is a photo of the terminal after crashing the kernel. I don't have any other way to get the log after crashing the kernel.
Comment 1 troygraben 2020-09-22 20:55:58 UTC
Created attachment 292561 [details]
v5.4 kdump config
Comment 2 Bernhard Übelacker 2020-11-22 21:51:39 UTC
Hello, I found my crash kernel also not working anymore lately.
I am running a Debian testing and found also that the 5.4 kernel
was the last working as expected.
I found that in my case the crash kernel might really boot, but cannot
find the root partition for some reason.

Maybe you could boot with kernel parameter "modprobe.blacklist=amdgpu"
and retest (if you have a amd gpu)?
That way the screen stays with some efi framebuffer driver
and the output of the crash kernel was shown on the screen.

Further in my case I tried also booting the system with the crash kernel
and the crash initrd but with regular kernel parameters.
Because that worked I guess in my case all needed modules are
really available - but cannot work for some other unknown reason.
Could you confirm that too?
Comment 3 troygraben 2020-11-27 00:04:24 UTC
(In reply to Bernhard Übelacker from comment #2)
> Hello, I found my crash kernel also not working anymore lately.
> I am running a Debian testing and found also that the 5.4 kernel
> was the last working as expected.
> I found that in my case the crash kernel might really boot, but cannot
> find the root partition for some reason.

I mis-typed the title. It's including 5.4 that's broken for me. The bisected commit lies between 5.4-rc3 and 5.4.

> 
> Maybe you could boot with kernel parameter "modprobe.blacklist=amdgpu"
> and retest (if you have a amd gpu)?
> That way the screen stays with some efi framebuffer driver
> and the output of the crash kernel was shown on the screen.

I'm using a radeon GPU. It is RV730 XT [Radeon HD 4670]. I tried to blacklist the radeon module. Nothing from the kdump kernel displays on screen.

I suspect the kdump kernel doesn't boot far enough to display anything.

> 
> Further in my case I tried also booting the system with the crash kernel
> and the crash initrd but with regular kernel parameters.
> Because that worked I guess in my case all needed modules are
> really available - but cannot work for some other unknown reason.
> Could you confirm that too?

It doesn't work with regular kernel parameters which is just specifying the root file system and loglevel.

$ cat /proc/cmdline
BOOT_IMAGE=/boot/vmlinuz-linux-lts root=UUID=1558db24-61ba-4fcd-ae27-63571a6243c2 rw loglevel=7

Note You need to log in before you can comment on or make changes to this bug.