View previous topic :: View next topic |
Author |
Message |
lanjian9151 n00b
Joined: 06 Mar 2014 Posts: 8
|
Posted: Thu Aug 23, 2018 9:20 am Post subject: [Solved] kernel panic after upgrade to Linux-4.18 |
|
|
I'm using Linux-4.17.14 kernel, after upgrade to Linux-4.18.* with old config, the kernel got panic in early boot, is there any suggestion how to troubleshoot this issue.
update: issue solved by use genkernel re-create .config file and rebuild kernel.
still don't know which config cause this.
Last edited by lanjian9151 on Wed Aug 29, 2018 6:22 am; edited 1 time in total |
|
Back to top |
|
|
fedeliallalinea Administrator
Joined: 08 Mar 2003 Posts: 31455 Location: here
|
Posted: Thu Aug 23, 2018 9:30 am Post subject: |
|
|
What is the exact error message? _________________ Questions are guaranteed in life; Answers aren't. |
|
Back to top |
|
|
lanjian9151 n00b
Joined: 06 Mar 2014 Posts: 8
|
Posted: Thu Aug 23, 2018 11:33 am Post subject: |
|
|
fedeliallalinea wrote: | What is the exact error message? |
I can't see any useful info due to it's happened on early boot. I can just see a info "kernel offset disable" |
|
Back to top |
|
|
lanjian9151 n00b
Joined: 06 Mar 2014 Posts: 8
|
Posted: Thu Aug 23, 2018 12:23 pm Post subject: |
|
|
fedeliallalinea wrote: | What is the exact error message? |
after several reboot I can see some error said "Kernel panic not syncing attempted to kill init" |
|
Back to top |
|
|
PrSo Tux's lil' helper
Joined: 01 Jun 2017 Posts: 136
|
Posted: Thu Aug 23, 2018 6:31 pm Post subject: |
|
|
lanjian9151 wrote: | fedeliallalinea wrote: | What is the exact error message? |
I can't see any useful info due to it's happened on early boot. I can just see a info "kernel offset disable" |
If you can boot to previous working kernel you could check for panic and oops messages. The pstore filesystem should be enabled by default in gentoo-sources.
Please, see: https://lwn.net/Articles/434821/. |
|
Back to top |
|
|
lanjian9151 n00b
Joined: 06 Mar 2014 Posts: 8
|
Posted: Fri Aug 24, 2018 3:20 am Post subject: |
|
|
PrSo wrote: | lanjian9151 wrote: | fedeliallalinea wrote: | What is the exact error message? |
I can't see any useful info due to it's happened on early boot. I can just see a info "kernel offset disable" |
If you can boot to previous working kernel you could check for panic and oops messages. The pstore filesystem should be enabled by default in gentoo-sources.
Please, see: https://lwn.net/Articles/434821/. |
just tested, there is nothing in there. |
|
Back to top |
|
|
dylanmc Apprentice
Joined: 18 Apr 2014 Posts: 157 Location: Modena, Italy
|
Posted: Fri Aug 24, 2018 5:50 pm Post subject: |
|
|
a question for this kernel: I have unmasked, but I didn't have the sources for x86_64 :O |
|
Back to top |
|
|
PrSo Tux's lil' helper
Joined: 01 Jun 2017 Posts: 136
|
Posted: Fri Aug 24, 2018 6:09 pm Post subject: |
|
|
lanjian9151 wrote: | just tested, there is nothing in there. |
Does your machine have EFI filesystem (UEFI) or it is pure BIOS?
If it is BIOS only, unfortunately pstore has to preserve logs during the reboots, so it will not work for you, but when this is UEFI machine please check what is actual pstore backend: Code: | cat /sys/module/pstore/parameters/backend | (BTW you can choose preferred pstore backend by kernel boot option "pstore.backend=")
In BIOS only case I would do "make mproper" and with "make menuconfig" enable all needed drivers from "lspci -nnk" command executed on 4.17.14 just to boot up the 4.18.x.(and all fiesystem drivers needed accordig to wiki which you are using) I would tune it later. |
|
Back to top |
|
|
lanjian9151 n00b
Joined: 06 Mar 2014 Posts: 8
|
Posted: Wed Aug 29, 2018 6:19 am Post subject: |
|
|
PrSo wrote: | lanjian9151 wrote: | just tested, there is nothing in there. |
Does your machine have EFI filesystem (UEFI) or it is pure BIOS?
If it is BIOS only, unfortunately pstore has to preserve logs during the reboots, so it will not work for you, but when this is UEFI machine please check what is actual pstore backend: Code: | cat /sys/module/pstore/parameters/backend | (BTW you can choose preferred pstore backend by kernel boot option "pstore.backend=")
In BIOS only case I would do "make mproper" and with "make menuconfig" enable all needed drivers from "lspci -nnk" command executed on 4.17.14 just to boot up the 4.18.x.(and all fiesystem drivers needed accordig to wiki which you are using) I would tune it later. |
Thanks for your help, finally I use genkernel rebuild the kernel issue solved. But still don't know which config caused the issue. Anyway I can user 4.18 now. |
|
Back to top |
|
|
medmusicus n00b
Joined: 22 Dec 2011 Posts: 14
|
Posted: Mon Sep 03, 2018 8:12 pm Post subject: |
|
|
Same problem on my laptop. I can configure/compile/use the latest 4.17-kernel, but NOT any kernel since 4.18. Tried all kinds of configurations. Eventually, it worked with genkernel, but I would like a manually configured kernel much better.
HP-Laptop, Intel HM170-Chipset, Skylake-CPU, Nvidia mobile 1050, 16 GB RAM.
On each kernel configuration I tried there is a kernel panic. It boots, sets up the SATA-Drives, recognizes the file system (btrfs), but then stops with panic.
Any suggestions? |
|
Back to top |
|
|
PrSo Tux's lil' helper
Joined: 01 Jun 2017 Posts: 136
|
Posted: Mon Sep 03, 2018 9:37 pm Post subject: |
|
|
@lanjian9151
I am glad to hear that your machine is on 4.18.x kernel. You can play with .config with "make menuconfig" later to trim it down because the genkernel by default enables "more" than is needed, but this depends on your choice.
@medmusicus
If I'm correct this machine has UEFI, if so, what is pstore panic log output, if any?
Last edited by PrSo on Mon Sep 03, 2018 9:52 pm; edited 1 time in total |
|
Back to top |
|
|
medmusicus n00b
Joined: 22 Dec 2011 Posts: 14
|
Posted: Mon Sep 03, 2018 9:49 pm Post subject: |
|
|
I reverted to 4.17, because I couldn`t use the nvidia-driver, as genkernel sets up the nouveau stuff and nvidia framebuffer.
I`m playing around with the .config for a while now, with all thinkable configurations and checking the right hardware drivers, crosschecking with my 4.17-config, but still getting a kernel panic.
Just deleted the pstore directory, because it didn`t contain any output for the last days, but I`ll try again and will post the output here. |
|
Back to top |
|
|
medmusicus n00b
Joined: 22 Dec 2011 Posts: 14
|
Posted: Mon Sep 03, 2018 9:58 pm Post subject: |
|
|
Looking in the pstore-directory now shows only cryptic files like "dmesg-efi-153601155201001.enc.z", which do not show any reasonable text. |
|
Back to top |
|
|
PrSo Tux's lil' helper
Joined: 01 Jun 2017 Posts: 136
|
Posted: Mon Sep 03, 2018 10:13 pm Post subject: |
|
|
IMHO in your case pstore subsystem compresses the log data using
zlib. The data can be extracted with the following command: Code: | cat xxx/dmesg-efi-153601155201001.enc.z | \
> python -c 'import sys, zlib; print(zlib.decompress(sys.stdin.read()))' |
or
Code: | cat - xxx/dmesg-efi-153601155201001.enc.z | gzip -dc |
|
|
Back to top |
|
|
Hu Administrator
Joined: 06 Mar 2007 Posts: 23073
|
Posted: Tue Sep 04, 2018 1:47 am Post subject: |
|
|
Why do you need cat there? In the first case, you only use it to read one file, which is a Useless Use Of Cat. In the second case, you use it to read two files, but one of them is a non-redirected stdin, which will probably not work. |
|
Back to top |
|
|
PrSo Tux's lil' helper
Joined: 01 Jun 2017 Posts: 136
|
Posted: Tue Sep 04, 2018 6:21 am Post subject: |
|
|
Hu wrote: | Why do you need cat there? In the first case, you only use it to read one file, which is a Useless Use Of Cat. In the second case, you use it to read two files, but one of them is a non-redirected stdin, which will probably not work. |
Hmm, after rethinking you could be right, but what do you recommend/suggest instead?
Thanks,
Przemek. |
|
Back to top |
|
|
toralf Developer
Joined: 01 Feb 2004 Posts: 3942 Location: Hamburg
|
Posted: Tue Sep 04, 2018 9:28 am Post subject: |
|
|
PrSo wrote: | Code: | cat - xxx/dmesg-efi-153601155201001.enc.z | gzip -dc |
| ?
should be fully enough |
|
Back to top |
|
|
medmusicus n00b
Joined: 22 Dec 2011 Posts: 14
|
Posted: Tue Sep 04, 2018 5:09 pm Post subject: |
|
|
zcat dmesg-efi-153601155201001.enc.z | gzip -dc
gzip: dmesg-efi-153601155201001.enc.z: not in gzip format
gzip: stdin: unexpected end of file |
|
Back to top |
|
|
Tony0945 Watchman
Joined: 25 Jul 2006 Posts: 5127 Location: Illinois, USA
|
Posted: Tue Sep 04, 2018 6:34 pm Post subject: |
|
|
I think Toralf meant "zcat dmesg-efi-153601155201001.enc.z" without any piping. |
|
Back to top |
|
|
medmusicus n00b
Joined: 22 Dec 2011 Posts: 14
|
Posted: Tue Sep 04, 2018 7:14 pm Post subject: |
|
|
Magaged it at last, don`t know exactly, why.
After deselecting everything what was not supported by my hardware it fnally worked: manually configured kernel, recompiled nvidia-drivers and bingo, I'm on my plasma desktop again! |
|
Back to top |
|
|
PrSo Tux's lil' helper
Joined: 01 Jun 2017 Posts: 136
|
Posted: Tue Sep 04, 2018 9:43 pm Post subject: |
|
|
@medmusicus
I apologize, the command should be:
Code: | printf "\x1f\x8b\x08\x00\x00\x00\x00\x00" |cat - sys/fs/pstore/dmesg-efi-153601155201001.enc.z |gzip -dc |
for one file only, but pstore saves couple of files from kernel panics due to the space limit. Wrong copy-paste action here.
I am glad to hear that your kernel is working.
@Hu
You are right, it was for the one file only. If medmusicus would like (and I suppose to) decompress and read multiplies files in /sys/fs/pstore dir he would use a regex i.e. wildcard - "*" after "efi-" in the file name.
@toralf
thanks for pointing that out.
As for "zcat" I have heard that it cannot decompress the pstore messages as it will produce error that the file is not in gzip format, but I could be wrong tough.
Sorry for whole this mess. |
|
Back to top |
|
|
|