Faruk
Posts: 54
Joined: Sat Sep 08, 2018 7:34 am

Kernel Panic

Mon Dec 17, 2018 11:32 am

Hello

I have some problem in raspberry pi 3. I took this error and I don't know cause. According to my research power supplies cause this problem. There is temperature icon in my raspberry pi. I don't know if there is a relationship with kernel.
Also I reading data from uart and I show data in GUI. My GUI should work everytime. Can I exceed this error with hardware WDT or how can I exceed this? If answer is yes, How can I do this?

My screen this.
Error.jpg
Error.jpg (145.31 KiB) Viewed 3509 times
Thanks for your reply

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2318
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: Kernel Panic

Mon Dec 17, 2018 3:12 pm

Can you tell me:
1) What is the workload you are running?
2) How much additional hardware is attached?
3) Is the Pi in a case?
4) What is the power supply?
5) At some point after you have started the workload but before the crash, what does "sudo vcgencmd get_throttled" report?

The screen capture you posted does not contain enough lines to hint at what the cause of the panic might be. Adding "framebuffer_height=2160" to config.txt should show more of the panic text. You may also find that it has been written to the end of /var/log/syslog before you rebooted.

code_exec
Posts: 271
Joined: Sun Sep 30, 2018 12:25 pm

Re: Kernel Panic

Mon Dec 17, 2018 4:18 pm

You can recover your Pi using a Linux PC.

Insert the SD card into your PC and then find out what the name of the SD card is (/dev/*):

Code: Select all

sudo fdisk -l
Find the device that has properties similar to your SD card. For example, if your SD card is 8GB and there's a 7.9GB storage device, it's most likely your SD card.

An alternative is to run the above command without the SD inserted and then insert the SD card, and run the command again to see what the SD is called.

Now, mount it at /mnt:

Code: Select all

sudo mount /dev/mmcblk0p2 /mnt
sudo mount /dev/mmcblk0p1 /mnt/boot
If your SD card is recongised by Linux as /dev/sdX, then run the following instead:

Code: Select all

sudo mount /dev/sdX2 /mnt
sudo mount /dev/sdX1 /mnt/boot
Download the latest stable Pi bootloader:

Code: Select all

wget http://archive.raspberrypi.org/debian/pool/main/r/raspberrypi-firmware/raspberrypi-bootloader_1.20181112-1_armhf.deb
mkdir /tmp/pi-bootloader
sudo dpkg-deb -x raspberrypi-bootloader_1.20181112-1_armhf.deb /tmp/pi-bootloader
Now, update your SD card's bootloader files:

Code: Select all

sudo cp -r /tmp/pi-bootloader/boot/* /mnt/boot/
You've now updated the bootloader, but you haven't updated the kernel yet. Do so by running:

Code: Select all

wget http://archive.raspberrypi.org/debian/pool/main/r/raspberrypi-firmware/raspberrypi-kernel_1.20181112-1_armhf.deb
sudo mkdir /tmp/pi-kernel
sudo dpkg-deb -x raspberrypi-firmware/raspberrypi-kernel_1.20181112-1_armhf.deb /tmp/pi-kernel
sudo cp -r /tmp/pi-kernel/boot/* /mnt/boot/
Now, update kernel modules:

Code: Select all

wget http://archive.raspberrypi.org/debian/pool/main/r/raspberrypi-firmware/raspberrypi-kernel-headers_1.20181112-1_armhf.deb
mkdir /tmp/pi-kernel-modules
sudo dpkg-deb -x raspberrypi-kernel-headers_1.20181112-1_armhf.deb /tmp/pi-kernel-modules
sudo cp -r /tmp/pi-kernel-modules/lib/modules/4.*/* /mnt/lib/modules/
Now, unmount your Pi's SD card:

Code: Select all

sudo umount /mnt/boot
sudo umount /mnt
Then put it into the Pi and power on!

Does the problem continue, or is the issue fixed? If the problem continues, it's most likely a power supply issue.
Last edited by code_exec on Wed Dec 19, 2018 6:23 am, edited 1 time in total.
Ubuntu 18.04 LTS desktop images for the Raspberry Pi 3.

https://github.com/CodeExecution/Ubuntu-ARM64-RPi

Faruk
Posts: 54
Joined: Sat Sep 08, 2018 7:34 am

Re: Kernel Panic

Tue Dec 18, 2018 5:45 am

PhilE wrote:
Mon Dec 17, 2018 3:12 pm
Can you tell me:
1) What is the workload you are running?
2) How much additional hardware is attached?
3) Is the Pi in a case?
4) What is the power supply?
5) At some point after you have started the workload but before the crash, what does "sudo vcgencmd get_throttled" report?

The screen capture you posted does not contain enough lines to hint at what the cause of the panic might be. Adding "framebuffer_height=2160" to config.txt should show more of the panic text. You may also find that it has been written to the end of /var/log/syslog before you rebooted.
1- I work python script. I use uart and GUI. I receive data and show this. Rpi run LCD screen with DPI. This python script run when Rpi start. Just this.
2- Just LCD screen and uart bus.
3- Yes. Rpi in case.
4- The board has 24V. I use MP1591DN. Convert 5V and supply Rpi. Vout avarage 4.94V.
5- throttled=0x0 show now.

Thnaks for your reply

Faruk
Posts: 54
Joined: Sat Sep 08, 2018 7:34 am

Re: Kernel Panic

Tue Dec 18, 2018 6:44 am

code_exec wrote:
Mon Dec 17, 2018 4:18 pm
You can recover your Pi using a Linux PC.

Insert the SD card into your PC and then find out what the name of the SD card is (/dev/*):

Code: Select all

sudo fdisk -l
Find the device that has properties similar to your SD card. For example, if your SD card is 8GB and there's a 7.9GB storage device, it's most likely your SD card.

An alternative is to run the above command without the SD inserted and then insert the SD card, and run the command again to see what the SD is called.

Now, mount it at /mnt:

Code: Select all

sudo mount /dev/mmcblk0p2 /mnt
sudo mount /dev/mmcblk0p1 /mnt/boot
If your SD card is recongised by Linux as /dev/sdX, then run the following instead:

Code: Select all

sudo mount /dev/sdX2 /mnt
sudo mount /dev/sdX1 /mnt/boot
Download the latest stable Pi bootloader:

Code: Select all

wget http://archive.raspberrypi.org/debian/pool/main/r/raspberrypi-firmware/raspberrypi-bootloader_1.20181112-1_armhf.deb
mkdir /tmp/pi-bootloader
sudo dpkg-deb -x raspberrypi-bootloader_1.20181112-1_armhf.deb /tmp/pi-bootloader
Now, update your SD card's bootloader files:

Code: Select all

sudo cp -r /tmp/pi-bootloader/boot/* /mnt/boot/
You've now updated the bootloader, but you haven't updated the kernel yet. Do so by running:

Code: Select all

wget http://archive.raspberrypi.org/debian/pool/main/r/raspberrypi-firmware/raspberrypi-kernel_1.20181112-1_armhf.deb
sudo mkdir /tmp/pi-kernel
sudo dpkg-deb -x raspberrypi-firmware/raspberrypi-kernel_1.20181112-1_armhf.deb /tmp/pi-kernel
sudo cp -r /tmp/pi-kernel/boot/* /mnt/boot/
Now, update kernel modules:

Code: Select all

wget http://archive.raspberrypi.org/debian/pool/main/r/raspberrypi-firmware/raspberrypi-kernel-headers_1.20181112-1_armhf.deb
mkdir /tmp/pi-kernel-modules
sudo dpkg-deb -x raspberrypi-kernel-headers_1.20181112-1_armhf.deb /tmp/pi-kernel-modules
sudo cp -r /tmp/pi-kernel-modules/lib/modules/* /mnt/lib/modules/
Now, unmount your Pi's SD card:

Code: Select all

sudo umount /mnt/boot
sudo umount /mnt
Then put it into the Pi and power on!

Does the problem continue, or is the issue fixed? If the problem continues, it's most likely a power supply issue.

I try this and will return result. Thanks for your reply

code_exec
Posts: 271
Joined: Sun Sep 30, 2018 12:25 pm

Re: Kernel Panic

Tue Dec 18, 2018 5:05 pm

If the issue persists, you can blame your power supply. I recommend using the official 5V power adapter on the Pi 3. You can get it from various online stores such as Amazon, but here's the power adapter on The Pi Hut:

https://thepihut.com/products/official- ... wer-supply
Ubuntu 18.04 LTS desktop images for the Raspberry Pi 3.

https://github.com/CodeExecution/Ubuntu-ARM64-RPi

Return to “Linux Kernel”