Vim kernel panic under load with 3.14.29

I am using this version:
http://www.mediafire.com/file/8dyn2y9z9hz1f13/Vim_Uboot_170121.7z

I have used the command: stress -c 4
the compilation if use only 1 core or 2 core is fine, also stress -c 2 works fine.

Using the armbianmonitor -m during these operations the clock was 1.51 ghz, when the temperature is going to 69/70 celsius there is always a kernel panic,
I dont know if these value are the real value for the temp.
The cpu is without heatsink but I think that at 69 celsius the kernel should not going in kernel panic, or there is something that generate the kernel panic because the temp is growing up too fast ?

I dont think that play a video is a good testing method for this, usually the decoding process in software can’t use all the cores at the same time.
A stress test like compile a kernel or big library with make -j4 or j8 can stress better the system (also the stress is fine).

1 Like

If You have the opportunity, try to test the behavior of this image (when run from external media) in two ways. 1. When you run the system WITHOUT a file “dtb.img” in the root of the FAT partition to run the stress test. 2. Copy from “dtb” in root file “gxl_p212_2g.dtb” and rename it to “dtb.img”. To run this version and check the stress test.

Armbian_5.24_S9xxx_mate_Ubuntu_xenial_3.14.29_desktop_20170205.img.xz

I’m not exactly checked, this is only my assumption - the decline is due to the fact that upon reaching the first threshold, (70) , the system shall automatically begin reducing the frequency\the number of working cores to reduce the load and limit temperature rise. But because of an error in the code (mine or not proper kernel) - there is a drop.

HI, I have tried with the Armbian_5.24_S9xxx_mate_Ubuntu_xenial_3.14.29_desktop_20170205 and without dtb.img at 70 (monitored with armbianmonitor -m) I get the panic, with the gxl_p212_2g.dtb the bootload didn’t load the kernel
I am using this boatloader: http://www.mediafire.com/file/8dyn2y9z9hz1f13/Vim_Uboot_170121.7z

Now I have tried to use a little heatsink and the temp grow up slowly but when reach the 70 there is the panic.

Where I can find the kernel branch/tag ? If you give me the branch and the repo I could try to do some debug (usually I don’t work on the kernel side but I can try to take a quick look).

I have to use your /lib repo to build the kernel and boot loader ?

[ 601.211156@0] [] gpufreq_get_requested_power+0x48/0xac
[ 601.217797@0] [] power_allocator_throttle+0x304/0x5d8

601.174933@0] [] kthread_data+0x24/0x2c
[ 601.180280@0] [] __schedule+0x4a4/0x654
[ 601.185624@0] [] schedule+0x2c/0x80
[ 601.190628@0] [] do_exit+0x584/0x974
[ 601.195716@0] [] die+0x18c/0x1a8
[ 601.200460@0] [] arm64_notify_die+0x40/0x7c
[ 601.206151@0] [] bad_mode+0x94/0xa8
[ 601.211156@0] [] gpufreq_get_requested_power+0x48/0xac
[ 601.217797@0] [] power_allocator_throttle+0x304/0x5d8
[ 601.224350@0] [] handle_thermal_trip+0x5c/0x1f8
[ 601.230387@0] [] thermal_zone_device_update+0x6c/0xb0

Hi, Pier:
Can you kindly have a try with the latest Ubuntu-server? Check the Topic for details.

As a mentioned, I’ve tested a lot and didn’t got the issue.

Visit Khadas Github for that, and note that the ubuntu branch is for Linux Distro.

As Balbes150’s Armbian ROM, you can visit his Github for details.

sure I’ll try the server version today

1 Like

bad_mode in the stack does not look good.
I have seen similar on other hardware
arch/arm64/kernel/traps.c
says
bad_mode handles the impossible case in the exception vector.

Hi, Tasi:
Sorry, I’m not quite understand you do you mean?

I have tried to use the latest u-boot and the latest server image but after the start from emmc I got this error:
Can not find partition name “boot”

with this http://www.mediafire.com/file/uapliw13vavk13i/Vim_Ubuntu-16.04_V170124.7z the emmc starts fine.

Hi, Pier:

  • Why you need to replace the u-boot for latest ubuntu-server ROM? The one built-in the ROM works fine for ubuntu-server.
  • You can install the ubuntu-mate ROM released just now, check the Topic for the information(the ROM is still uploading, will be done in a few hours).

Note that all these two ROM just support USB-C Cable upgrade.

sorry, I explain it better: I have used the latest uboot to make the sd card, then I have copied the rom of the ubuntu server (the update.img file) into the sd card (with the .ini file from the uboot).
Then when the vim starts with the sd card (the emmc is erased), the process to burn the emmc runs fine.
When I reboot the vim starts from the emmc and I got the error (with the serial port). I didn’t change the bootloader of the server rom.

If I try the same process but with this image http://www.mediafire.com/file/uapliw13vavk13i/Vim_Ubuntu-16.04_V170124.7z the vim starts correctly from the emmc.

You confused me a lot :slight_smile:

There is no need to make the sd card for EMMC INSTALLATION ROM, just follow the USB-C Cable upgrade instructions for all the steps you need to operate.

I have compiled for comparison a test image of Debian (console) using the kernel sources and configuration from GIT Khadas.

https://yadi.sk/d/Dh6f7xp13EHoP6

I haven’t tested.
PS Strangely , I can’t add answer to the topic.

What’s the results? does the oops/panic issue fixed?

I am not kernel expert but it seems bad_mode should never be called.
I looked at /usr/src/linux/arch/arm64/kernel/traps.c where one reads in comment:
bad_mode handles the impossible case in the exception vector.
I admit I do not quite understand that comment either. However:
“handling the impossible” does not sound good, …

@balbes150
I assume you used ubuntu branch in khadas linux.git and kvim_defconfig, right?
I will try to find time to build and test such kernel for gentoo on mx-g and i7pro … it may take a few days

Yes, in the test sample (whose name is an indication of “kh”), I used git and the configuration of Khadas (git branch linux ubuntu + kvim_defconfig).

I am working with a Mac and Linux, I have no windows.
In the tutorial section there are the instructions how to build a burning SD card, I am following these instructions and are working for the Ubuntu desktop but not for the server image.

Are these images different ? The server one needs the windows burner to be installed ?

I am following this tutorial: http://docs.khadas.com/bootcamp/CreateBurnCardViaCLI/