scottfk / vf2-torvalds-kernel-config-sfk

a minimal .config to build Linus' kernel on and for VisionFive2
GNU General Public License v3.0
3 stars 0 forks source link

kernel 6.11.0-sfk compiled with gcc (Ubuntu 14.2.0-4ubuntu2) oopses shortly after userland loads #1

Open scottfk opened 1 week ago

scottfk commented 1 week ago

[ 43.405688] Unable to handle kernel NULL pointer dereference at virtual address 000000000000001c [ 43.405708] Oops [#1] [ 43.414543] softirq: huh, entered softirq 6 TASKLET 00000000ee0618ef with preempt_count 00000101, exited with 00000100? [ 43.416750] Modules linked in: qrtr binfmt_misc nls_iso8859_1 efi_pstore nfnetlink ip_tables x_tables autofs4 spidev uio_pdrv_genirq uio [ 43.439871] CPU: 0 UID: 0 PID: 0 Comm: swapper/0 Tainted: G W 6.11.0-rc7-sfk #3 [ 43.448579] Tainted: [W]=WARN [ 43.451551] Hardware name: Unknown Unknown Product/Unknown Product, BIOS 2024.01+dfsg-5ubuntu1 01/01/2024 [ 43.461119] epc : dw_mci_read_data_pio+0xb8/0x1a0 [ 43.465841] ra : dw_mci_read_data_pio+0xb8/0x1a0 [ 43.470554] epc : ffffffffb7b71a02 ra : ffffffffb7b71a02 sp : ffffffc600003da0 [ 43.477782] gp : ffffffffb8ac7e18 tp : ffffffffb8810200 t0 : 0000000000000000 [ 43.485009] t1 : 0000000000000000 t2 : 0000000000000000 s0 : ffffffc600003e20 [ 43.492236] s1 : 0000000000000000 a0 : 0000000000000000 a1 : 0000000000000000 [ 43.499468] a2 : 0000000000000000 a3 : 0000000000000000 a4 : 0000000000000000 [ 43.506700] a5 : 0000000000000000 a6 : 0000000000000000 a7 : 0000000000000000 [ 43.513932] s2 : ffffffd6f6998000 s3 : 0000000000001fff s4 : 0000000000000002 [ 43.521164] s5 : ffffffd6c132fa00 s6 : 0000000000000000 s7 : 0000000000000000 [ 43.528396] s8 : fffffffffffff000 s9 : ffffffd6c132f840 s10: 0000000000000000 [ 43.535628] s11: 0000000000000088 t3 : 0000000000000000 t4 : 0000000000000000 [ 43.542860] t5 : 0000000000000000 t6 : 0000000000000000 [ 43.548180] status: 0000000200000100 badaddr: 000000000000001c cause: 000000000000000d [ 43.556108] [] dw_mci_read_data_pio+0xb8/0x1a0 [ 43.562127] [] dw_mci_interrupt+0x3ee/0x530 [ 43.567889] [] __handle_irq_event_percpu+0x44/0x1de [ 43.574347] [] handle_irq_event+0x3c/0x8e [ 43.579932] [] handle_fasteoi_irq+0x9c/0x1ec [ 43.585778] [] generic_handle_domain_irq+0x1c/0x32 [ 43.592146] [] plic_handle_irq+0x6a/0xf8 [ 43.597647] [] generic_handle_domain_irq+0x1c/0x32 [ 43.604014] [] riscv_intc_irq+0x26/0x64 [ 43.609425] [] handle_riscv_irq+0x4c/0x7c [ 43.615011] [] call_on_irq_stack+0x32/0x40 [ 43.620692] Code: 863b 41ad 85b3 01a7 8566 d563 01bb b783 1d0c 9782 (4cdc) 0c3b [ 43.628103] ---[ end trace 0000000000000000 ]--- [ 43.632730] Kernel panic - not syncing: Fatal exception in interrupt [ 43.639090] SMP: stopping secondary CPUs [ 43.643040] Kernel Offset: 0x37200000 from 0xffffffff80000000 [ 43.648799] ---[ end Kernel panic - not syncing: Fatal exception in interrupt ]---

scottfk commented 1 week ago

I will almost certainly not have the time to dig deeply into this. If a new gcc drops before a new kernel, I will give it a try.

Until then I have rolled back to rc6.

scottfk commented 1 week ago

Upgrading to binutils 2.43.1-4ubuntu1 seems to have fixed this (without even a recompile).

I will do a complete clean recompile with these new binutils and try to boot with the firmware flashed from the latest u-boot-starfive.

scottfk commented 1 week ago

Seems just upgrading binutils was enough.

New kernel built with latest gcc and binutils boots just fine with the latest firmware.

scottfk commented 1 week ago

Seems back in the 6.11 Release:

[ 31.225623] Unable to handle kernel NULL pointer dereference at virtual address 000000000000001c [ 31.225625] [] dw_mci_work_func+0x142/0x324 [ 31.225641] [] process_one_work+0x122/0x32e [ 31.225660] [] bh_worker+0x18e/0x1ca [ 31.225675] [] workqueue_softirq_action+0x56/0x70 [ 31.225693] [] tasklet_action+0xe/0x40 [ 31.225707] [] handle_softirqs+0x100/0x342 [ 31.225720] [] irq_exit_rcu+0x7a/0xb0 [ 31.225732] [] handle_riscv_irq+0x66/0x7c [ 31.225748] [] call_on_irq_stack+0x32/0x40 [ 31.225763] ---[ end trace 0000000000000000 ]--- [ 31.225803] softirq: huh, entered softirq 6 TASKLET 0000000024897c05 with preempt_count 00000100, exited with 000000ff? [ 31.234476] Oops [#1] [ 31.234484] Modules linked in: qrtr binfmt_misc nls_iso8859_1 efi_pstore nfnetlink ip_tables x_tables autofs4 [ 31.245246] dwmmc_starfive 16020000.mmc: Unexpected interrupt latency [ 31.246000] spidev uio_pdrv_genirq uio [ 31.322815] CPU: 0 UID: 0 PID: 0 Comm: swapper/0 Tainted: G W 6.11.0-sfk #1 [ 31.331188] Tainted: [W]=WARN [ 31.334175] Hardware name: Unknown Unknown Product/Unknown Product, BIOS 2024.01+dfsg-5ubuntu2 01/01/2024 [ 31.343757] epc : dw_mci_read_data_pio+0xb8/0x1a0 [ 31.348497] ra : dw_mci_read_data_pio+0xb8/0x1a0 [ 31.353221] epc : ffffffff9fb71cba ra : ffffffff9fb71cba sp : ffffffc600003da0 [ 31.360463] gp : ffffffffa0ac7f48 tp : ffffffffa0810200 t0 : 0000000000000000 [ 31.367707] t1 : 0000000000000000 t2 : 0000000000000000 s0 : ffffffc600003e20 [ 31.374955] s1 : 0000000000000000 a0 : 0000000000000000 a1 : 0000000000000000 [ 31.382197] a2 : 0000000000000000 a3 : 0000000000000000 a4 : 0000000000000000 [ 31.389437] a5 : 0000000000000000 a6 : 0000000000000000 a7 : 0000000000000000 [ 31.396681] s2 : ffffffd6dfa85000 s3 : 0000000000001fff s4 : 0000000000000002 [ 31.403929] s5 : ffffffd6c1803600 s6 : 0000000000000000 s7 : 0000000000000000 [ 31.411171] s8 : fffffffffffff000 s9 : ffffffd6c1803440 s10: 0000000000000000 [ 31.418418] s11: 00000000000000ac t3 : 0000000000000000 t4 : 0000000000000000 [ 31.425659] t5 : 0000000000000000 t6 : 0000000000000000 [ 31.430985] status: 0000000200000100 badaddr: 000000000000001c cause: 000000000000000d [ 31.438923] [] dw_mci_read_data_pio+0xb8/0x1a0 [ 31.444962] [] dw_mci_interrupt+0x3ee/0x530 [ 31.450733] [] __handle_irq_event_percpu+0x44/0x1de [ 31.457205] [] handle_irq_event+0x3c/0x8e [ 31.462804] [] handle_fasteoi_irq+0x9c/0x1ec [ 31.468660] [] generic_handle_domain_irq+0x1c/0x32 [ 31.475037] [] plic_handle_irq+0x6a/0xf8 [ 31.480559] [] generic_handle_domain_irq+0x1c/0x32 [ 31.486949] [] riscv_intc_irq+0x26/0x64 [ 31.492374] [] handle_riscv_irq+0x4c/0x7c [ 31.497971] [] call_on_irq_stack+0x32/0x40 [ 31.503671] Code: 863b 41ad 85b3 01a7 8566 d563 01bb b783 1d0c 9782 (4cdc) 0c3b [ 31.511093] ---[ end trace 0000000000000000 ]--- [ 31.515735] Kernel panic - not syncing: Fatal exception in interrupt [ 31.522105] SMP: stopping secondary CPUs [ 31.526066] Kernel Offset: 0x1f200000 from 0xffffffff80000000 [ 31.531837] ---[ end Kernel panic - not syncing: Fatal exception in interrupt ]---

I'll not upload the kernel config until I can figure out what breaks this (or it gets fixed upstream).