Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Kernal panic on boot with 4.14.7 and 4.14.8-r1 on KVM VM
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
potatoe
n00b
n00b


Joined: 28 Dec 2017
Posts: 3

PostPosted: Thu Dec 28, 2017 2:27 pm    Post subject: Kernal panic on boot with 4.14.7 and 4.14.8-r1 on KVM VM Reply with quote

A small console-only VPS under KVM has been running fine with all kernels including 4.12.12

However, compiling 4.14.7 and 4.14.8-gentoo-r1 using the same config as before, and of course adding CONFIG_FIRMWARE_IN_KERNEL=y causes a kernel panic on boot

Last thing I see is "Trying to unpack rootfs image as initramfs" and then 2s later the following kernel panic:

https://i.imgur.com/t9m7whP.png

I'm on profile 17, with gcc 6.4.0, I have NOT emerge -e world with gcc 6.4.0 when I switched to it, just the toolchain and whatever was a regular update since then. Previous Kernel 4.12.12 was built on previous gcc and profile. Could it have something to do with this?

How do I go about troubleshooting further? Is there any point in debuging with kexec and debug info compiled in? Its a tiny 1 CPU VPS and compiling is slooooooooooooow, hence why I didn't emerge -a world after new gcc. Am I doomed to rebuild the whole thing from scratch?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 42860
Location: 56N 3W

PostPosted: Thu Dec 28, 2017 4:57 pm    Post subject: Reply with quote

potatoe,

Welcome to Gentoo.

What does
potatoe wrote:
... using the same config as before ...
mean exactly?
Kernels change and configurations change with them. You can't normally do literally that.
Tell us how you take the old .config and use it in a new kernel.
Tell how you make your initrd too.

Your system is trying to kill init. It can be lots of things.
Show us how your system is partitioned and show us the grub.cfg file.
Its possibly mounting the wrong thing as root and /sbin/init is not being found.

When you switch to the /17.0/ you must rebuild all your static libs. Rebuilding everything is not required.

Your
potatoe wrote:
... update the toolchain and whatever was a regular update since then ...
will be ok providing you look out for odd issues.
Moving to a /17.0/ profile like this is not your issue.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
potatoe
n00b
n00b


Joined: 28 Dec 2017
Posts: 3

PostPosted: Fri Dec 29, 2017 8:52 am    Post subject: Reply with quote

Thanks for the welcome, I'm quite used to gentoo having been with it for 10+ years (I just realized I've never had a GUI system on it, just headless servers), but this is the first time I run into something I can't google my way out of :(

NeddySeagoon wrote:

Tell us how you take the old .config and use it in a new kernel.
Tell how you make your initrd too.


I copy the old /usr/src/linux-4.12.12-gentoo/.config to the new /usr/src/linux after eselecting to the new kernel src
I'm using 'genkernel --splash --install --menuconfig all' to make kernel/initramfs

NeddySeagoon wrote:

Show us how your system is partitioned and show us the grub.cfg file.
Its possibly mounting the wrong thing as root and /sbin/init is not being found.


grub is simply the following with the symlinks pointing to the right kernel and initramfs, I havent changed the line from previous working kernel except added debug and panic=20 once I encountered the issue

Code:

title Gentoo Linux 4.14.8-gentoo-r1
root (hd0,0)
kernel /boot/kernel root=/dev/vda1 net.ifnames=0 rootfstype=ext4 acpi=off debug panic=20
initrd /boot/initramfs


mounts as shown by working kernel 4.12.12:
Code:

Filesystem      Size  Used Avail Use% Mounted on
udev             10M  4.0K   10M   1% /dev
/dev/vda1        19G   14G  4.1G  78% /
tmpfs            99M  336K   99M   1% /run
shm             494M     0  494M   0% /dev/shm
cgroup_root      10M     0   10M   0% /sys/fs/cgroup


To add more confusion, I just looked at my boot of 4.14.7 and it does pass the unpack rootfs stage, carries on loading virtio drivers, detects vda1 just fine, then kernel panics after USB drivers. It is possible that 4.14.8 does this as well, however being a VPS and having a remote console thing doesn't allow me to follow the text on screen fully. This is from a recording of 4.14.7 booting:

last thing seen before panic https://i.imgur.com/5UngEyG.png

panic https://i.imgur.com/Pa0cZHD.png
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 42860
Location: 56N 3W

PostPosted: Fri Dec 29, 2017 10:35 am    Post subject: Reply with quote

potatoe,

The invalid opcode error suggests that your kernel build broke or the kernel is configured for the wrong CPU.
However by that time, I would expect the Illegal Instruction exception handler to be running.

As the initrd appears to be mounted, as you have modules loaded, maybe its a problem there.

Your guest setup is very similar to my own but I'm still on hardened-sources until the dust settles around hardened kernel patch set.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
asturm
Developer
Developer


Joined: 05 Apr 2007
Posts: 6880
Location: Austria

PostPosted: Fri Dec 29, 2017 2:34 pm    Post subject: Reply with quote

Maybe related? https://lkml.org/lkml/2017/12/29/153

Unfortunately 4.14.x has been a rocky ride so far...
_________________
backend.cpp:92:2: warning: #warning TODO - this error message is about as useful as a cooling unit in the arctic
Back to top
View user's profile Send private message
potatoe
n00b
n00b


Joined: 28 Dec 2017
Posts: 3

PostPosted: Fri Dec 29, 2017 3:15 pm    Post subject: Reply with quote

my config contains

# CONFIG_MCORE2 is not set
CONFIG_GENERIC_CPU=y

so according to the workaround from https://bugs.gentoo.org/642268 I am already properly configured to avoid this bug. And my panic is not due to an rcu stall :(
Could be related as a compiler bug 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