Bug 263345 - Kernel panic: Fatal data abort 14.0-CURRENT #0 main-n254435-8af24219565
Summary: Kernel panic: Fatal data abort 14.0-CURRENT #0 main-n254435-8af24219565
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: arm64 Any
: --- Affects Only Me
Assignee: freebsd-arm (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-04-16 16:07 UTC by Martin Filla
Modified: 2022-05-13 13:33 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Filla 2022-04-16 16:07:26 UTC
Hi,
i tested 14.current kernel on Orange Pi R1 Plus LTS but kernel panicked.
With version 13.0 release is without panic

Loading kernel...
/boot/kernel/kernel text=0x2a8 text=0x850a20 text=0x24be84 data=0x1b9ba8 data=0x0+0x34f000 0x8+0x134028+0x8+0x15b5e1
Loading configured modules...
/boot/kernel/opensolaris.ko text=0x1993 text=0xa3c data=0x4c0+0x6830 0x8+0x1038+0x8+0x8a9
/boot/kernel/zfs.ko text=0xe2308 text=0x23d268 data=0x26bf0+0xbb044 0x8+0x33240+0x8+0x2cbe1
can't find '/etc/hostid'
can't find '/boot/entropy'
Using DTB provided by EFI at 0x80f0000.
EFI framebuffer information:
addr, size     0x0, 0x0
dimensions     0 x 0
stride         0
masks          0x00000000, 0x00000000, 0x00000000, 0x00000000
---<<BOOT>>---
GDB: debug ports: uart
GDB: current port: uart
KDB: debugger backends: ddb gdb
KDB: current backend: ddb
WARNING: Cannot find freebsd,dts-version property, cannot check DTB compliance
Copyright (c) 1992-2022 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
        The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 14.0-CURRENT #0 main-n254435-8af24219565: Thu Apr  7 06:33:32 UTC 2022
    root@releng1.nyi.freebsd.org:/usr/obj/usr/src/arm64.aarch64/sys/GENERIC arm64
FreeBSD clang version 13.0.0 (git@github.com:llvm/llvm-project.git llvmorg-13.0.0-0-gd7b669b3a303)
WARNING: WITNESS option enabled, expect reduced performance.
VT: init without driver.
module firmware already present!
real memory  = 1071403008 (1021 MB)
avail memory = 1013641216 (966 MB)
uma_zalloc* called with bad WAIT flags:
#0 0xffff000000718f14 at uma_zalloc_debug+0xcc
#1 0xffff0000007188b4 at uma_zalloc_arg+0x2c
#2 0xffff0000004e3938 at _bt_fill+0xec
#3 0xffff0000004e0ccc at vmem_init+0x248
#4 0xffff000000725ed0 at vm_ksubmap_init+0x134
#5 0xffff000000773344 at cpu_startup+0xbc
#6 0xffff0000003ff948 at mi_startup+0x130
#7 0xffff0000000008b8 at virtdone+0x7c
Starting CPU 1 (1)
Starting CPU 2 (2)
Starting CPU 3 (3)
FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs
arc4random: WARNING: initial seeding bypassed the cryptographic random device because it was not yet seeded and the knob 'bypass_before_seeding' was enabled.
random: entropy device external interface
Fatal data abort:
  x0: ffffa0003ff43fd8
  x1:                8
  x2: ffff00000088d38d (do_execve.fexecv_proc_title + 7674)
  x3:              78a
  x4:                0
  x5:               69
  x6:                f
  x7:                c
  x8: ffffa0003ff43fd8
  x9:         40000000
 x10: ffffa00000000000
 x11:         3ff43fd8
 x12: 725f696665006966
 x13:  100000102ff0001
 x14: ffff000000b06b00 (lock_class_mtx_sleep + 0)
 x15:                0
 x16:                8
 x17:                c
 x18: ffff000000fa69b0 (initstack + 39b0)
 x19: ffffa000008d7200
 x20: ffff000000ab4010 (efirt_moddata + 0)
 x21: ffff000000910963 (console_pausestr + 13a59)
 x22: ffff000000c6c000 (db_watch_table + b88)
 x23: ffff000000ba0000 (sdta_vfs_vop_vop_spare2_return0 + 20)
 x24: ffff000000dfa000 (gdb_tx_u + aa0)
 x25:                0
 x26: ffff0000008a0f23 (do_execve.fexecv_proc_title + 1b20a)
 x27:          3100000
 x28: ffff000000dfa000 (gdb_tx_u + aa0)
 x29: ffff000000fa69c0 (initstack + 39c0)
  sp: ffff000000fa69b0
  lr: ffff000000157ac4 (efirt_modevents + 78)
 elr: ffff000000157ad0 (efirt_modevents + 84)
spsr:         200000c5
 far: ffffa0003ff43fd8
 esr:         96000007
panic: vm_fault failed: ffff000000157ad0 error 1
cpuid = 0
time = 1
KDB: stack backtrace:
db_trace_self() at db_trace_self
db_trace_self_wrapper() at db_trace_self_wrapper+0x30
vpanic() at vpanic+0x174
panic() at panic+0x44
data_abort() at data_abort+0x2f0
handle_el1h_sync() at handle_el1h_sync+0x10
--- exception, esr 0x96000007
efirt_modevents() at efirt_modevents+0x84
module_register_init() at module_register_init+0xc4
mi_startup() at mi_startup+0x130
virtdone() at virtdone+0x7c
KDB: enter: panic
[ thread pid 0 tid 100000 ]
Stopped at      kdb_enter+0x44: undefined       f902011f
Comment 1 Mark Johnston freebsd_committer freebsd_triage 2022-04-18 16:10:28 UTC
I believe this is a regression fixed by https://cgit.freebsd.org/src/commit/?id=f3ef799f564515b58a24a328739a4c749a02b110

Please try a kernel which includes that change.
Comment 2 Martin Filla 2022-04-18 19:13:06 UTC
(In reply to Mark Johnston from comment #1)
I fetched last base.txz kernel.txz and without result
Comment 3 Mark Johnston freebsd_committer freebsd_triage 2022-04-18 19:15:27 UTC
(In reply to Martin Filla from comment #2)
Looks like the arm64 snapshots still have the bug, they haven't been rebuilt since the 7th.  I'm not sure why it takes so long.  The next snapshot should include the bug fix.
Comment 4 Martin Filla 2022-04-19 21:48:57 UTC
(In reply to Mark Johnston from comment #1)

I tried kernel with commit and issue is fixed.
Comment 5 Martin Filla 2022-04-19 21:49:59 UTC
I have in log only this: 

lock order reversal: (sleepable after non-sleepable)
 1st 0xffffa00000f96620 spi0 (spi0, sleep mutex) @ /usr/src/sys/arm64/rockchip/rk_spi.c:432
 2nd 0xffff000000c6da28 Clock topology lock (Clock topology lock, sx) @ /usr/src/sys/dev/extres/clk/clk.c:1200
lock order spi0 -> Clock topology lock attempted at:
#0 0xffff0000004e5f00 at witness_checkorder+0xaf8
#1 0xffff0000004815b4 at _sx_xlock+0x7c
#2 0xffff00000019c818 at clk_set_freq+0x4c
#3 0xffff00000083c9a8 at rk_spi_transfer+0x15c
#4 0xffff0000cc63475c at mx25l_attach+0xdc
#5 0xffff0000004b12b8 at device_attach+0x3f8
#6 0xffff0000004b0e28 at device_probe_and_attach+0x7c
#7 0xffff0000004b306c at bus_generic_driver_added+0x88
#8 0xffff0000004ae530 at devclass_driver_added+0x44
#9 0xffff0000004b7384 at device_do_deferred_actions+0x70
#10 0xffff0000004b6f38 at devctl2_ioctl+0x3d0
#11 0xffff00000031e24c at devfs_ioctl+0xd4
#12 0xffff0000005743a0 at vn_ioctl+0x104
#13 0xffff00000031e940 at devfs_ioctl_f+0x20
#14 0xffff0000004ebdf0 at kern_ioctl+0x2e4
#15 0xffff0000004ebac0 at sys_ioctl+0x144
#16 0xffff00000078ada0 at do_el0_sync+0x524
#17 0xffff000000769104 at handle_el0_sync+0x40
mx25l0: Unknown SPI flash device. Vendor: 5e, device id: 4018
Comment 6 Mark Johnston freebsd_committer freebsd_triage 2022-04-22 14:40:49 UTC
(In reply to Martin Filla from comment #5)
This is a warning about a lock order reversal.  It's worth fixing but I don't think it'll affect any functionality.
Comment 7 Martin Filla 2022-05-12 21:42:21 UTC
we can close this bug