Olimex A64-OlinuXino-1Ge4GW kernel panic

Started by asimko, November 05, 2019, 09:12:02 AM

Previous topic - Next topic

asimko

Hello,

we have problem with getting randomly kernel panic with this message:
Unable to handle kernel paging request at virtual address ffff000071cdb500

Address is changing, sometimes there are only zeroes. We use armbian and it does not matter if there is a kernel 5.3.x or 4.19.x it is still the same. There is nothing connected to the board, and it sometimes reboot automatically and some times just hang and need to be rebooted manually.

Does anybody have this problem, or have a clue how to solve it?

LubOlimex

Did you try running both of these two images:

ftp://staging.olimex.com/Allwinner_Images/a64-olinuxino/linux/1.latest_images/bionic/images/

ftp://staging.olimex.com/Allwinner_Images/a64-olinuxino/linux/1.latest_images/buster/images/

If you already tested with them and the problem remains - do you have anything other attached to the board (like USB device or some module, etc)?
Technical support and documentation manager at Olimex

asimko

I did not try ubuntu, because I need debian. But debian is doing this randomly (I still did not spotted what is causing this).

I have 2 devices on RS232 connected and on usb I have a keyboard of course.

But one other thing: With HDMI connected monitor starts flickering after loading firmare, during u-boot is everything ok. But I already tried another power supply, but this remains. This is for now not the biggest problem, problem is with hanging and rebooting.

I installed now the newest kernel 5.3.8, and waiting for first reboot.

LubOlimex

I believe it is related to the attached devices somehow (or the driver that gets associated with them). Test without the RS232 devices and try to hang it.

Also I still highly recommend you to test with our official image of Armbian-based Debian: ftp://staging.olimex.com/Allwinner_Images/a64-olinuxino/linux/1.latest_images/buster/images/
Technical support and documentation manager at Olimex

asimko

So with the new kernel 5.3.8 it is much more stable, but it keeps rebooting anyway (I set automatic reboot on kernel panic).

But I believe it has something thing this messeges from kernel:
[   87.776237] sun4i-i2s 1c22800.i2s: Unsupported MCLK divider: -22
[   87.776246] sun4i-i2s 1c22800.i2s: ASoC: can't set 1c22800.i2s hw params: -22

Does anybody know what to do with this?


LubOlimex

Link doesn't show anything meaningful - it says "transfer expired".
Technical support and documentation manager at Olimex


asimko

No I have a text version of the problem that I have permanently:
[ 2634.691406] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000
[ 2634.700520] Mem abort info:
[ 2634.704486]   ESR = 0x96000004
[ 2634.707649]   Exception class = DABT (current EL), IL = 32 bits
[ 2634.713763]   SET = 0, FnV = 0
[ 2634.716921]   EA = 0, S1PTW = 0
[ 2634.720166] Data abort info:
[ 2634.723239]   ISV = 0, ISS = 0x00000004
[ 2634.729550]   CM = 0, WnR = 0
[ 2634.733126] user pgtable: 4k pages, 48-bit VAs, pgdp=0000000072170000
[ 2634.740847] [0000000000000000] pgd=0000000000000000
[ 2634.745892] Internal error: Oops: 96000004 [#1] SMP
[ 2634.750931] Modules linked in: snd_soc_spdif_tx axp20x_adc axp20x_battery sun50i_codec_analog snd_soc_simple_card sun8i_codec snd_soc_hdmi_codec sun8i_adda_pr_regmap sun4i_i2s snd_soc_simple_card_utils axp20x
[ 2634.790631] CPU: 3 PID: 0 Comm: swapper/3 Not tainted 5.3.8-sunxi64 #5.99.191102
[ 2634.798962] Hardware name: Olimex A64-Olinuxino (DT)
[ 2634.804041] pstate: 20000085 (nzCv daIf -PAN -UAO)
[ 2634.808949] pc : lock_hrtimer_base.isra.1+0x64/0xd0
[ 2634.813930] lr : hrtimer_start_range_ns+0x68/0x300
[ 2634.818819] sp : ffff000010fcbe20
[ 2634.822199] x29: ffff000010fcbe20 x28: 0000000000000000
[ 2634.827617] x27: 0000000000000000 x26: 0000000000000060
[ 2634.833107] x25: ffff000010fcbee0 x24: ffff800035dce260
[ 2634.838614] x23: 0000000000000080 x22: 0000000000000000
[ 2634.844953] x21: 0000000000000001 x20: ffff800035dcdd40
[ 2634.851307] x19: ffff000010ed3980 x18: 0000000000000000
[ 2634.857749] x17: 0000000000000000 x16: 0000000000000000
[ 2634.863750] x15: 0000000000000000 x14: 0000000000000000
[ 2634.869350] x13: 0000000000000001 x12: 000000000014e8a3
[ 2634.879973] x11: 0000000000000000 x10: 00000000000008d0
[ 2634.885737] x9 : ffff000010fcbea0 x8 : ffff8000344abd30
[ 2634.891289] x7 : 0000800024f2d000 x6 : 0000000ec5c3e62e
[ 2634.901854] x5 : 0000800024f2d000 x4 : 0000000000000000
[ 2634.909553] x3 : 0000000000000000 x2 : 0000000000000000
[ 2634.915093] x1 : 0000000000000080 x0 : 0000000000000000
[ 2634.923008] Call trace:
[ 2634.925556]  lock_hrtimer_base.isra.1+0x64/0xd0
[ 2634.930243]  hrtimer_start_range_ns+0x68/0x300
[ 2634.934840]  tick_nohz_idle_stop_tick+0x1bc/0x238
[ 2634.939943]  do_idle+0x1c8/0x2b0
[ 2634.945001]  cpu_startup_entry+0x20/0x28
[ 2634.949714]  secondary_start_kernel+0x190/0x1d0
[ 2634.955422] Code: 121902e1 35000041 d50342df f9800011 (885ffc01)
[ 2634.968022] ---[ end trace de7a11e19c100643 ]---
[ 2634.979150] Kernel panic - not syncing: Attempted to kill the idle task!
[ 2635.002694] SMP: stopping secondary CPUs
[ 2635.013259] Kernel Offset: disabled
[ 2635.184372] CPU features: 0x0002,24002004
[ 2635.357170] Memory Limit: none
[ 2635.527263] Rebooting in 30 seconds..

asimko

And here is info from u-boot if you found something usefull in it:
INFO:    PSCI Affinity Map:
INFO:      AffInst: Level 0, MPID 0x0, State ON
INFO:      AffInst: Level 0, MPID 0x1, State ON
INFO:      AffInst: Level 0, MPID 0x2, State ON
INFO:      AffInst: Level 0, MPID 0x3, State ON

U-Boot SPL 2019.04-armbian (Jul 15 2019 - 20:35:46 +0200)
DRAM: 1024 MiB
Trying to boot from MMC1
NOTICE:  BL3-1: Running on A64/H64 (1689) in SRAM A2 (@0x44000)
NOTICE:  Configuring SPC Controller
NOTICE:  BL3-1: v1.0(debug):c9f55c0
NOTICE:  BL3-1: Built : 08:55:08, Jul  9 2019
NOTICE:  DT: sun50i-a64-olinuxino
INFO:    Configuring AXP PMIC
INFO:    PMIC: DRAM voltage: 1.36V
INFO:    PMIC: setup successful
NOTICE:  SCPI: dummy stub handler, implementation level: 000000
INFO:    BL3-1: Initializing runtime services
INFO:    BL3-1: Preparing for EL3 exit to normal world
INFO:    BL3-1: Next image address: 0x4a000000, SPSR: 0x3c9


U-Boot 2019.04-armbian (Jul 15 2019 - 20:35:46 +0200) Allwinner Technology

CPU:   Allwinner A64 (SUN50I)
Model: Olimex A64-Olinuxino
DRAM:  1 GiB
MMC:   Device 'mmc@1c11000': seq 1 is in use by 'mmc@1c10000'
mmc@1c0f000: 0, mmc@1c10000: 2, mmc@1c11000: 1
Loading Environment from EXT4... ** File not found /boot/boot.env **

** Unable to read "/boot/boot.env" from mmc0:1 **
In:    serial
Out:   vidconsole
Err:   vidconsole
Net:   phy interface7
eth0: ethernet@1c30000
230454 bytes read in 12 ms (18.3 MiB/s)
starting USB...
USB0:   USB EHCI 1.00
USB1:   USB OHCI 1.0
USB2:   USB EHCI 1.00
USB3:   USB OHCI 1.0
scanning bus 0 for devices... 1 USB Device(s) found
scanning bus 1 for devices... 1 USB Device(s) found
scanning bus 2 for devices... 2 USB Device(s) found
scanning bus 3 for devices... 1 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found
Autoboot in 1 seconds, press <Space> to stop
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
Found U-Boot script /boot/boot.scr
3042 bytes read in 5 ms (593.8 KiB/s)
## Executing script at 4fc00000
U-boot loaded from SD
Boot script loaded from mmc
186 bytes read in 1 ms (181.6 KiB/s)
36650 bytes read in 10 ms (3.5 MiB/s)
506 bytes read in 6 ms (82 KiB/s)
Applying kernel provided DT overlay sun50i-a64-uart1.dtbo
963 bytes read in 5 ms (187.5 KiB/s)
Applying kernel provided DT overlay sun50i-a64-uart2.dtbo
804 bytes read in 5 ms (156.3 KiB/s)
Applying kernel provided DT overlay sun50i-a64-uart3.dtbo
963 bytes read in 5 ms (187.5 KiB/s)
Applying kernel provided DT overlay sun50i-a64-uart4.dtbo
3801 bytes read in 5 ms (742.2 KiB/s)
Applying kernel provided DT fixup script (sun50i-a64-fixup.scr)
## Executing script at 44000000
13530249 bytes read in 665 ms (19.4 MiB/s)
15618056 bytes read in 770 ms (19.3 MiB/s)
## Loading init Ramdisk from Legacy Image at 4fe00000 ...
   Image Name:   uInitrd
   Image Type:   AArch64 Linux RAMDisk Image (gzip compressed)
   Data Size:    13530185 Bytes = 12.9 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 4fa00000
   Booting using the fdt blob at 0x4fa00000
EHCI failed to shut down host controller.
   Loading Ramdisk to 49318000, end 49fff449 ... OK
   Loading Device Tree to 00000000492a6000, end 0000000049317fff ... OK

Starting kernel ...

asimko

And one more kernel oops:
[  975.484147] kernel BUG at arch/arm64/kernel/traps.c:405!
[  975.489599] Internal error: Oops - BUG: 0 [#1] SMP
[  975.494552] Modules linked in: snd_soc_simple_card snd_soc_simple_card_utils snd_soc_spdif_tx axp20x_adc axp20x_ac_power sun50i_codec_analog axp20x_battery sun8i_codec sun4i_i2s snd_soc_hdmi_codec sun8i_addax
[  975.533886] CPU: 2 PID: 0 Comm: swapper/2 Not tainted 5.3.8-sunxi64 #5.99.191102
[  975.541424] Hardware name: Olimex A64-Olinuxino (DT)
[  975.546483] pstate: 00000085 (nzcv daIf -PAN -UAO)
[  975.551375] pc : do_undefinstr+0x29c/0x2b8
[  975.555548] lr : do_undefinstr+0x138/0x2b8
[  975.559719] sp : ffff000010013d00
[  975.563097] x29: ffff000010013d00 x28: ffff8000344aa700
[  975.568509] x27: ffff800035db8e38 x26: ffff800035db8df8
[  975.573919] x25: ffff800035db8db8 x24: 0000000000000000
[  975.579330] x23: 0000000000000085 x22: ffff00001012acfc
[  975.584740] x21: ffff000010013ea0 x20: ffff000010013d60
[  975.590150] x19: ffff000010eb8000 x18: 0000000000000000
[  975.595560] x17: 0000000000000000 x16: 0000000000000000
[  975.600971] x15: 0000000000000000 x14: 0000000000000000
[  975.606380] x13: 0000000000000001 x12: 0000000000000000
[  975.611791] x11: ffff000010ea71ce x10: 0000000000000040
[  975.617201] x9 : ffff000010ed2b38 x8 : ffff000010ed2b30
[  975.622612] x7 : 00000001000293b4 x6 : ffff000010013d58
[  975.628022] x5 : ffff000010f6a0f8 x4 : 0000000000000000
[  975.633431] x3 : 00000000d5300000 x2 : ffff000010ec2660
[  975.638841] x1 : ffff000010f6a0f8 x0 : 0000000000000085
[  975.644252] Call trace:
[  975.646750]  do_undefinstr+0x29c/0x2b8
[  975.650573]  el1_undef+0x10/0x84
[  975.653866]  e843419@00d4_00000be0_11d8+0xd90/0xffc
[  975.658837]  hrtimer_interrupt+0x104/0x2d0
[  975.663014]  arch_timer_handler_phys+0x28/0x40
[  975.667543]  handle_percpu_devid_irq+0x80/0x140
[  975.672160]  generic_handle_irq+0x24/0x38
[  975.676245]  __handle_domain_irq+0x5c/0xb0
[  975.680418]  gic_handle_irq+0x58/0xa8
[  975.684149]  el1_irq+0xb8/0x140
[  975.687351]  arch_cpu_idle+0x10/0x18
[  975.690995]  do_idle+0x1d0/0x2b0
[  975.694286]  cpu_startup_entry+0x24/0x28
[  975.698284]  secondary_start_kernel+0x190/0x1d0
[  975.702905] Code: 2a154035 17ffffae a9025bb5 f9001bb7 (d4210000)
[  975.709113] ---[ end trace b38169200d0c442a ]---
[  975.713817] Kernel panic - not syncing: Fatal exception in interrupt
[  975.720290] SMP: stopping secondary CPUs
[  975.724287] Kernel Offset: disabled
[  975.727842] CPU features: 0x0002,24002004
[  975.731925] Memory Limit: none
[  975.735040] Rebooting in 30 seconds..

asimko

So for everyone who has trouble with a64 olimex this is the solution:
- give it a 3A 5V powersupply
- connect battery to the board
- solder a condezator

All of the problems has to the with the bad design of powering the device, it is very hungry if there is a peak in consumption it gives a kernel panic ...

Now we have the board stable.