>Synopsis: Kernel Lock spinning out on boot with bsd.mp on pine64 LTS v1.2 >(2018) board >Category: kernel >Environment: System : OpenBSD 7.3 Details : OpenBSD 7.3-beta (GENERIC) #106: Sat Mar 4 19:06:00 MST 2023 dera...@arm64.openbsd.org:/usr/src/sys/arch/arm64/compile/GENERIC
Architecture: OpenBSD.arm64 Machine : arm64 >Description: snapshot from https://ftp.hostserver.de/archive/2023-03-06-0105/snapshots/arm64/ With the above snapshot booting from bsd.mp on my pine64 LTS v1.2 (2018) board hangs with the bootlog: U-Boot SPL 2021.10 (Mar 04 2023 - 20:36:07 -0700) DRAM: 2048 MiB Trying to boot from MMC1 NOTICE: BL31: v2.7(debug):2.7.0 NOTICE: BL31: Built : 19:48:24, Mar 4 2023 NOTICE: BL31: Detected Allwinner A64/H64/R18 SoC (1689) NOTICE: BL31: Found U-Boot DTB at 0x2097e10, model: Pine64 LTS INFO: ARM GICv2 driver initialized INFO: Configuring SPC Controller INFO: PMIC: Probing AXP803 on RSB INFO: PMIC: dcdc1 voltage: 3.300V INFO: PMIC: dcdc5 voltage: 1.200V INFO: PMIC: dcdc6 voltage: 1.100V INFO: PMIC: dldo1 voltage: 3.300V INFO: PMIC: dldo2 voltage: 3.300V INFO: PMIC: dldo4 voltage: 3.300V INFO: PMIC: fldo1 voltage: 1.200V INFO: PMIC: Enabling DC SW INFO: BL31: Platform setup done INFO: BL31: Initializing runtime services INFO: BL31: cortex_a53: CPU workaround for 843419 was applied INFO: BL31: cortex_a53: CPU workaround for 855873 was applied INFO: BL31: cortex_a53: CPU workaround for 1530924 was applied INFO: PSCI: Suspend is unavailable INFO: BL31: Preparing for EL3 exit to normal world INFO: Entry point address = 0x4a000000 INFO: SPSR = 0x3c9 U-Boot 2021.10 (Mar 04 2023 - 20:36:07 -0700) Allwinner Technology CPU: Allwinner A64 (SUN50I) Model: Pine64 LTS DRAM: 2 GiB MMC: mmc@1c0f000: 0, mmc@1c11000: 1 Loading Environment from FAT... Unable to read "uboot.env" from mmc0:1... In: serial Out: serial Err: serial Net: phy interface8 eth0: ethernet@1c30000 starting USB... Bus usb@1c1a000: USB EHCI 1.00 Bus usb@1c1a400: USB OHCI 1.0 Bus usb@1c1b000: USB EHCI 1.00 Bus usb@1c1b400: USB OHCI 1.0 scanning bus usb@1c1a000 for devices... 1 USB Device(s) found scanning bus usb@1c1a400 for devices... 1 USB Device(s) found scanning bus usb@1c1b000 for devices... 1 USB Device(s) found scanning bus usb@1c1b400 for devices... 1 USB Device(s) found scanning usb for storage devices... 0 Storage Device(s) found Hit any key to stop autoboot: 0 switch to partitions #0, OK mmc0 is current device Scanning mmc 0:1... Scanning disk m...@1c0f000.blk... Card did not respond to voltage select! : -110 Scanning disk m...@1c11000.blk... Disk m...@1c11000.blk not ready Found 3 disks No EFI system partition BootOrder not defined EFI boot manager: Cannot load any image Found EFI removable media binary efi/boot/bootaa64.efi 213896 bytes read in 11 ms (18.5 MiB/s) Booting /efi\boot\bootaa64.efi disks: sd0* >> OpenBSD/arm64 BOOTAA64 1.16 boot> booting sd0a:/bsd: 10385500+2487728+290768+837176 [787620+91+1206744+722930]=0x11aafe0 [ using 2718168 bytes of bsd ELF symbol table ] Copyright (c) 1982, 1986, 1989, 1991, 1993 The Regents of the University of California. All rights reserved. Copyright (c) 1995-2023 OpenBSD. All rights reserved. https://www.OpenBSD.org OpenBSD 7.3-beta (GENERIC.MP) #2054: Sat Mar 4 19:34:25 MST 2023 dera...@arm64.openbsd.org:/usr/src/sys/arch/arm64/compile/GENERIC.MP real mem = 2027778048 (1933MB) avail mem = 1930911744 (1841MB) random: good seed from bootblocks mainbus0 at root: Pine64 LTS psci0 at mainbus0: PSCI 1.1, SMCCC 1.2 cpu0 at mainbus0 mpidr 0: ARM Cortex-A53 r0p4 cpu0: 32KB 64b/line 2-way L1 VIPT I-cache, 32KB 64b/line 4-way L1 D-cache cpu0: 512KB 64b/line 16-way L2 cache cpu0: CRC32,SHA2,SHA1,AES+PMULL,ASID16 cpu1 at mainbus0 mpidr 1: ARM Cortex-A53 r0p4 cpu1: 32KB 64b/line 2-way L1 VIPT I-cache, 32KB 64b/line 4-way L1 D-cache cpu1: 512KB 64b/line 16-way L2 cache cpu1: CRC32,SHA2,SHA1,AES+PMULL,ASID16 cpu2 at mainbus0 mpidr 2: ARM Cortex-A53 r0p4 cpu2: 32KB 64b/line 2-way L1 VIPT I-cache, 32KB 64b/line 4-way L1 D-cache cpu2: 512KB 64b/line 16-way L2 cache cpu2: CRC32,SHA2,SHA1,AES+PMULL,ASID16 cpu3 at mainbus0 mpidr 3: ARM Cortex-A53 r0p4 cpu3: 32KB 64b/line 2-way L1 VIPT I-cache, 32KB 64b/line 4-way L1 D-cache cpu3: 512KB 64b/line 16-way L2 cache cpu3: CRC32,SHA2,SHA1,AES+PMULL,ASID16 efi0 at mainbus0: UEFI 2.8 efi0: Das U-Boot rev 0x20211000 smbios0 at efi0: SMBIOS 3.0 smbios0: vendor U-Boot version "2021.10" date 10/01/2021 smbios0: Unknown Unknown Product apm0 at mainbus0 "display-engine" at mainbus0 not configured "opp-table-gpu" at mainbus0 not configured "osc24M_clk" at mainbus0 not configured "osc32k_clk" at mainbus0 not configured "pmu" at mainbus0 not configured simpleaudio0 at mainbus0 agtimer0 at mainbus0: 24000 kHz simplebus0 at mainbus0: "soc" sxisyscon0 at simplebus0 sxisid0 at simplebus0 sxiccmu0 at simplebus0 sxipio0 at simplebus0: 103 pins ampintc0 at simplebus0 nirq 224, ncpu 4 ipi: 0, 1, 2: "interrupt-controller" sxirtc0 at simplebus0 sxiccmu1 at simplebus0 sxipio1 at simplebus0: 13 pins sxirsb0 at simplebus0 axppmic0 at sxirsb0 addr 0x3a3: AXP803 "bus" at simplebus0 not configured "dma-controller" at simplebus0 not configured "lcd-controller" at simplebus0 not configured "lcd-controller" at simplebus0 not configured "video-codec" at simplebus0 not configured sximmc0 at simplebus0 sdmmc0 at sximmc0: 4-bit, sd high-speed, mmc high-speed, dma sximmc1 at simplebus0 sdmmc1 at sximmc1: 8-bit, sd high-speed, mmc high-speed, dma "crypto" at simplebus0 not configured "mailbox" at simplebus0 not configured "usb" at simplebus0 not configured "phy" at simplebus0 not configured ehci0 at simplebus0 usb0 at ehci0: USB revision 2.0 uhub0 at usb0 configuration 1 interface 0 "Generic EHCI root hub" rev 2.00/1.00 addr 1 ohci0 at simplebus0: version 1.0 ehci1 at simplebus0 usb1 at ehci1: USB revision 2.0 uhub1 at usb1 configuration 1 interface 0 "Generic EHCI root hub" rev 2.00/1.00 addr 1 ohci1 at simplebus0: version 1.0 "timer" at simplebus0 not configured sxidog0 at simplebus0 "dai" at simplebus0 not configured "codec" at simplebus0 not configured sxitemp0 at simplebus0 com0 at simplebus0: dw16550 com0: console "spi" at simplebus0 not configured dwxe0 at simplebus0: address 02:ba:17:b1:0f:02 rgephy0 at dwxe0 phy 1: RTL8169S/8110S/8211 PHY, rev. 5 "gpu" at simplebus0 not configured "dram-controller" at simplebus0 not configured "deinterlace" at simplebus0 not configured "hdmi" at simplebus0 not configured "hdmi-phy" at simplebus0 not configured sxirintc0 at simplebus0 "codec-analog" at simplebus0 not configured gpio0 at sxipio0: 32 pins gpio1 at sxipio0: 32 pins gpio2 at sxipio0: 32 pins gpio3 at sxipio0: 32 pins gpio4 at sxipio0: 32 pins gpio5 at sxipio0: 32 pins gpio6 at sxipio0: 32 pins gpio7 at sxipio0: 32 pins gpio8 at sxipio1: 32 pins usb2 at ohci0: USB revision 1.0 uhub2 at usb2 configuration 1 interface 0 "Generic OHCI root hub" rev 1.00/1.00 addr 1 usb3 at ohci1: USB revision 1.0 uhub3 at usb3 configuration 1 interface 0 "Generic OHCI root hub" rev 1.00/1.00 addr 1 "opp-table-cpu" at mainbus0 not configured "hdmi-connector" at mainbus0 not configured "vcc1v8" at mainbus0 not configured gpioleds0 at mainbus0: no LEDs sdmmc1: can't enable card scsibus0 at sdmmc0: 2 targets, initiator 0 sd0 at scsibus0 targ 1 lun 0: <SD/MMC, SN128, 0086> removable sd0: 121942MB, 512 bytes/sector, 249737216 sectors vscsi0 at root scsibus1 at vscsi0: 256 targets softraid0 at root scsibus2 at softraid0: 256 targets root on sd0a (2ed7e938872e51c9.a) swap on sd0b dump on sd0b Building bsd.mp with MP_LOCKDEBUG shows an extra message at the end root on sd0a (e964e815738b3961.a) swap on sd0b dump on sd0b panic: uvm_faul__mp_lock_spin: 0xffffff800110fc80 lock spun out Booting bsd.sp is fine and I am able to enter userland and proceed with normal activity. This bug report was generated on the machine while running bsd.sp. >How-To-Repeat: Flash the above snapshot miniroot73.img to microsd, install to microsd with default options, boot from microsd with the default bsd (which is the bsd.mp) and observe the board getting stuck at the above mentioned message. >Fix: I don't know the exact commit that fixed this but it seems to have been resolved by the time I pulled in changes on 9th March 2023 and built a kernel with MP_LOCKDEBUG and WITNESS uncommented in GENERIC.MP. My best guess is that it could have been solved by cheloha@ with the clock interrupt changes but I may be on a really wrong track. Cheers, Aisha dmesg: OpenBSD 7.3-beta (GENERIC) #106: Sat Mar 4 19:06:00 MST 2023 dera...@arm64.openbsd.org:/usr/src/sys/arch/arm64/compile/GENERIC real mem = 2027778048 (1933MB) avail mem = 1930924032 (1841MB) random: boothowto does not indicate good seed mainbus0 at root: Pine64 LTS psci0 at mainbus0: PSCI 1.1, SMCCC 1.2 cpu0 at mainbus0 mpidr 0: ARM Cortex-A53 r0p4 cpu0: 32KB 64b/line 2-way L1 VIPT I-cache, 32KB 64b/line 4-way L1 D-cache cpu0: 512KB 64b/line 16-way L2 cache cpu0: CRC32,SHA2,SHA1,AES+PMULL,ASID16 apm0 at mainbus0 efi0 at mainbus0: UEFI 2.8 efi0: Das U-Boot rev 0x20211000 smbios0 at efi0: SMBIOS 3.0 smbios0: vendor U-Boot version "2021.10" date 10/01/2021 smbios0: Unknown Unknown Product "display-engine" at mainbus0 not configured "opp-table-gpu" at mainbus0 not configured "osc24M_clk" at mainbus0 not configured "osc32k_clk" at mainbus0 not configured "pmu" at mainbus0 not configured simpleaudio0 at mainbus0 agtimer0 at mainbus0: 24000 kHz simplebus0 at mainbus0: "soc" sxisyscon0 at simplebus0 sxisid0 at simplebus0 sxiccmu0 at simplebus0 sxipio0 at simplebus0: 103 pins ampintc0 at simplebus0 nirq 224, ncpu 4: "interrupt-controller" sxirtc0 at simplebus0 sxiccmu1 at simplebus0 sxipio1 at simplebus0: 13 pins sxirsb0 at simplebus0 axppmic0 at sxirsb0 addr 0x3a3: AXP803 "bus" at simplebus0 not configured "dma-controller" at simplebus0 not configured "lcd-controller" at simplebus0 not configured "lcd-controller" at simplebus0 not configured "video-codec" at simplebus0 not configured sximmc0 at simplebus0 sdmmc0 at sximmc0: 4-bit, sd high-speed, mmc high-speed, dma sximmc1 at simplebus0 sdmmc1 at sximmc1: 8-bit, sd high-speed, mmc high-speed, dma "crypto" at simplebus0 not configured "mailbox" at simplebus0 not configured "usb" at simplebus0 not configured "phy" at simplebus0 not configured ehci0 at simplebus0 usb0 at ehci0: USB revision 2.0 uhub0 at usb0 configuration 1 interface 0 "Generic EHCI root hub" rev 2.00/1.00 addr 1 ohci0 at simplebus0: version 1.0 ehci1 at simplebus0 usb1 at ehci1: USB revision 2.0 uhub1 at usb1 configuration 1 interface 0 "Generic EHCI root hub" rev 2.00/1.00 addr 1 ohci1 at simplebus0: version 1.0 "timer" at simplebus0 not configured sxidog0 at simplebus0 "dai" at simplebus0 not configured "codec" at simplebus0 not configured sxitemp0 at simplebus0 com0 at simplebus0: dw16550 com0: console "spi" at simplebus0 not configured dwxe0 at simplebus0: address 02:ba:17:b1:0f:02 rgephy0 at dwxe0 phy 1: RTL8169S/8110S/8211 PHY, rev. 5 "gpu" at simplebus0 not configured "dram-controller" at simplebus0 not configured "deinterlace" at simplebus0 not configured "hdmi" at simplebus0 not configured "hdmi-phy" at simplebus0 not configured sxirintc0 at simplebus0 "codec-analog" at simplebus0 not configured gpio0 at sxipio0: 32 pins gpio1 at sxipio0: 32 pins gpio2 at sxipio0: 32 pins gpio3 at sxipio0: 32 pins gpio4 at sxipio0: 32 pins gpio5 at sxipio0: 32 pins gpio6 at sxipio0: 32 pins gpio7 at sxipio0: 32 pins gpio8 at sxipio1: 32 pins usb2 at ohci0: USB revision 1.0 uhub2 at usb2 configuration 1 interface 0 "Generic OHCI root hub" rev 1.00/1.00 addr 1 usb3 at ohci1: USB revision 1.0 uhub3 at usb3 configuration 1 interface 0 "Generic OHCI root hub" rev 1.00/1.00 addr 1 "opp-table-cpu" at mainbus0 not configured "hdmi-connector" at mainbus0 not configured "vcc1v8" at mainbus0 not configured gpioleds0 at mainbus0: no LEDs scsibus0 at sdmmc0: 2 targets, initiator 0 sd0 at scsibus0 targ 1 lun 0: <SD/MMC, SN128, 0086> removable sd0: 121942MB, 512 bytes/sector, 249737216 sectors sdmmc1: can't enable card vscsi0 at root scsibus1 at vscsi0: 256 targets softraid0 at root scsibus2 at softraid0: 256 targets root on sd0a (2ed7e938872e51c9.a) swap on sd0b dump on sd0b usbdevs: Controller /dev/usb0: addr 01: 0000:0000 Generic, EHCI root hub high speed, self powered, config 1, rev 1.00 driver: uhub0 Controller /dev/usb1: addr 01: 0000:0000 Generic, EHCI root hub high speed, self powered, config 1, rev 1.00 driver: uhub1 Controller /dev/usb2: addr 01: 0000:0000 Generic, OHCI root hub full speed, self powered, config 1, rev 1.00 driver: uhub2 Controller /dev/usb3: addr 01: 0000:0000 Generic, OHCI root hub full speed, self powered, config 1, rev 1.00 driver: uhub3 pcidump: acpidump: