Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How to get the full trace in a Kernel panic on boot
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
dbautista
n00b
n00b


Joined: 11 Nov 2006
Posts: 17
Location: Las Palmas de G.C.

PostPosted: Wed Jan 31, 2024 1:11 pm    Post subject: How to get the full trace in a Kernel panic on boot Reply with quote

I'm trying the RT sources sys-kernel/rt-sources-6.6.10_p19 and I have a painful Kernel panic while booting... but I only see the last trace lines and I can't figure out the root cause.

Is there a way to save the trace in a log or making the font smaller so I can see more lines?

This is what I can see:

Code:
  ret_from_fork_asm+0x1b/0x30
  </TASK>
Modules linked in:
CR2: 00000000000000b8
---[ end trace 0000000000000000 ]---
RIP: 0010:nbcon_release+0x37/0xa0
Code: 48 8b 04 25 28 00 00 00 48 89 44 24 28 31 c0 48 c7 44 24 08 00 00 00 00 48
 c7 44 24 10 00 00 00 00 48 c7 44 24 18 00 00 00 00 <80> bb b8 00 00 00 00 48 89
 1c 24 48 c7 44 24 20 00 00 00 00 c7 44
RSP: 0000:ffffc90000023d80 EFLAGS: 00010046
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
RDX: 00000000000003f9 RSI: 0000000000000001 RDI: ffffffff82c50ba0
RBP: 00000000000000ff R08: ffffffff82546810 R09: 0000000000000000
R10: ffff888101c75ec0 R11: ffffffffffc38000 R12: 00000000000000ff
R13: 0000000000000202 R14: 000000000000000f R15: ffffffff82c50ba0
FS:  0000000000000000(0000) GS:ffff88840f600000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000000000b8 CR3: 000000000242c001 CR4: 00000000000606f0
note: swapper/0[1] exited with irqs disabled
note: swapper/0[1] exited with preempt_count 1
Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000009
Kernel Offset: disabled
---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000009 ]---


Thank you in advance!
Back to top
View user's profile Send private message
sublogic
Apprentice
Apprentice


Joined: 21 Mar 2022
Posts: 222
Location: Pennsylvania, USA

PostPosted: Wed Jan 31, 2024 11:33 pm    Post subject: Re: How to get the full trace in a Kernel panic on boot Reply with quote

dbautista wrote:
Code:
Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000009

It seems your /sbin/init died . The problem may be there rather than with the kernel. Still, that's bizarre.

Do you have or can you make an initramfs, and can you boot the failing kernel to a rescue shell without crashing ? If so, there is a way to get the full dmesg.
EDIT: If no initramfs, try booting with init=/bin/sh and hope you get a shell prompt, then do exec /sbin/init from the shell and see if you panic.
EDIT 2: Uh, I'm assuming you run openrc; if you're on sytemd, the /sbin/init is probably wrong.

But first, boot a working kernel and look under /sys/fs/pstore in case the dmesg is already there waiting for you. (Doesn't work on my machines, I have to do it the hard way.)
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21639

PostPosted: Wed Jan 31, 2024 11:54 pm    Post subject: Reply with quote

"Attempted to kill init" is somewhat normal for initramfs users when the initramfs is buggy (such as being a shell script that does not recover from errors properly).

OP: have prior kernels worked correctly on this system? Do prior kernels still work now, or does the system panic regardless of which kernel you boot? If you use a non-realtime kernel 6.6.x, does that succeed?
Back to top
View user's profile Send private message
dbautista
n00b
n00b


Joined: 11 Nov 2006
Posts: 17
Location: Las Palmas de G.C.

PostPosted: Mon Feb 05, 2024 11:19 pm    Post subject: Reply with quote

Hey! Sorry for the delay.

OpenRC, no initramfs.

Other kernels work: tested with kernel-6.6.13-gentoo and kernel-6.5.2-rt8.

Tried to boot with init=/bin/sh, no luck. Still the same error. No /sys/fs/pstore either.
Back to top
View user's profile Send private message
dbautista
n00b
n00b


Joined: 11 Nov 2006
Posts: 17
Location: Las Palmas de G.C.

PostPosted: Wed Mar 06, 2024 6:42 pm    Post subject: Solved! Reply with quote

After having the same kernel panics with sys-kernel/rt-sources-6.6.10_p19 and with sys-kernel/rt-sources-6.6.15_p22, it's finally SOLVED with sys-kernel/rt-sources-6.6.20_p25. No kernel panics!

It's sad that I still don't know how to get the full trace in a Kernel panic on boot, though...
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum