Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 833982 - sys-kernel/gentoo-sources-5.14 kernel panic
Summary: sys-kernel/gentoo-sources-5.14 kernel panic
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal
Assignee: Gentoo Kernel Bug Wranglers and Kernel Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-02-24 10:55 UTC by j.l.
Modified: 2022-05-22 15:59 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
screenshots + .config files (screens.zip,938.93 KB, application/zip)
2022-02-24 10:55 UTC, j.l.
Details

Note You need to log in before you can comment on or make changes to this bug.
Description j.l. 2022-02-24 10:55:15 UTC
Created attachment 765757 [details]
screenshots + .config files

Please see attachment which contains kernel panic screenshots + two kernel .config files.
The last working one (kernel 5.13.19) and the last one with kernel panic (5.16.10). There is only little difference between these configs - make oldconfig mostly.

Screenshots has been taken using special .config with debug info and EFI framebuffer since standard kernel graphic driver (amdgpu) do not initialize properly - debug .config not included.
Comment 1 Ionen Wolkens gentoo-dev 2022-02-24 11:06:52 UTC
>CONFIG_DRM_SIMPLEDRM=y
Unsure if related but the option did give me an unbootable kernel before. Not that I really dug into the issue, and that option is new in 5.14+

Disabling could be worth trying (I don't think I can help beyond that).
Comment 2 j.l. 2022-02-24 11:36:29 UTC
Ionen, thanks. I've been already experimenting with SIMPLEDRM settings but no success. 

Big change in 5.14 was the amdgpu, I guess this is the wrong part.

I use these kernel configs slightly modified to Intel platform and it works on some aging Xeon without problems.
Comment 3 Mike Pagano gentoo-dev 2022-02-24 23:16:01 UTC
Which kernel was this ?
Comment 4 Mike Pagano gentoo-dev 2022-02-24 23:26:02 UTC
The source comments around that BUG are:
/*
		 * The location is not an op that we were expecting.
		 * Something went wrong. Crash the box, as something could be
		 * corrupting the kernel.


you could up the log level to get some more details,  (CONFIG_DEFAULT_MESSAGE_LOGLEVEL) (7 is debug [1] )  but you're probably going to need to do a git bisect between a working kernel and the first non-working kernel.

[1] https://elinux.org/Debugging_by_printing
Comment 5 j.l. 2022-02-25 11:18:03 UTC
(In reply to Mike Pagano from comment #3)
> Which kernel was this ?

sys-kernel/gentoo-sources-5.16.10

I'm going to provide some more info in the near future according to your suggestions.
Comment 6 Mike Pagano gentoo-dev 2022-03-31 11:31:50 UTC
(In reply to j.l. from comment #5)
> (In reply to Mike Pagano from comment #3)
> > Which kernel was this ?
> 
> sys-kernel/gentoo-sources-5.16.10
> 
> I'm going to provide some more info in the near future according to your
> suggestions.

Any progress here?
Comment 7 j.l. 2022-05-22 15:59:47 UTC
I deselected CONFIG_MNATIVE_AMD and replaced it by manual CPU selection (CONFIG_MSTEAMROLLER) and it works flawlessly.
Vanilla kernel (both git checkout and sys-kernel/vanilla-sources) works out of the box since there is no modern archs support and compilation defaults to generic x86_64.

Errors appearing during kernel compilation:
init/main.o: warning: objtool: kernel_init_freeable()+0x92: can't find jump dest instruction at .init.text+0x1ac4
arch/x86/events/amd/core.o: warning: objtool: amd_pmu_handle_irq()+0x28: stack state mismatch: cfa1=4+8 cfa2=4+0

I guess it is compiler fault which accidentally works prior to kernel 5.14. Portage utilizes -mnative on the same machine with no known problems.