OpenBSD 7.8 arm64 / rpi5 panics on ST start

I can consistently trigger a panic when starting syncthing on a freshly installed OpenBSD system.

  • OpenBSD 7.8 (arm64)
  • Raspberry Pi 5
  • Installed to on-board SD
  • Syncthing 1.30.0 (via pkg_add)

Trigger

rcctl start syncthing_markmcb

Wait approximately 5-10 seconds and the panic below will occur. No configuration has been done to syncthing, i.e., it was installed using pkg_add, the rc script was modified to run as my user (below), and it was started.

Without syncthing running, the system shows no other problems in dmesg or elsewhere.

Panic output

panic: netlock rwlock 0xffffff80012492d0: exit write when lock not held (owner 0
x10, self 0xffffff809ee7ad24)
Stopped at      db_enter+0x18:  brk     #0xf000
    TID    PID    UID     PRFLAGS     PFLAGS  CPU  COMMAND
  87509  73883   1000         0x3          0    2  syncthing
 468519  73883   1000         0x3  0x4000000    3  syncthing
* 29160  73883   1000         0x3  0x4000000    1  syncthing
 322537  73883   1000         0x3  0x4000000    0  syncthing
db_enter() at panic+0x138
panic() at rw_exit_write+0xd0
_rw_init_flags() at cad_ioctl+0x80
cad_ioctl() at in_delmulti+0xbc
in_delmulti() at ip_freemoptions+0x3c
ip_freemoptions() at in_pcbdetach+0x5c
in_pcbdetach() at udp_detach+0x2c

Contents of /etc/rc.d/syncthing_markmcb

#!/bin/ksh

daemon="/usr/local/bin/syncthing"
daemon_flags="--no-browser"
daemon_user="markmcb"

. /etc/rc.d/rc.subr

rc_bg=YES
rc_reload=NO

rc_cmd $1

Complete dmesg

OpenBSD 7.8 (GENERIC.MP) #38: Sun Oct 12 18:23:44 MDT 2025
    deraadt@arm64.openbsd.org:/usr/src/sys/arch/arm64/compile/GENERIC.MP
real mem  = 8583540736 (8185MB)
avail mem = 8186445824 (7807MB)
random: good seed from bootblocks
mainbus0 at root: Raspberry Pi 5 Model B Rev 1.0
psci0 at mainbus0: PSCI 1.1, SMCCC 1.2, SYSTEM_SUSPEND
efi0 at mainbus0: UEFI 2.11
efi0: Das U-Boot rev 0x20250700
smbios0 at efi0: SMBIOS 3.7.0
smbios0: vendor U-Boot version "2025.07" date 07/01/2025
smbios0: raspberrypi Raspberry Pi 5 Model B Rev 1.0
cpu0 at mainbus0 mpidr 0: ARM Cortex-A76 r4p1
cpu0: 64KB 64b/line 4-way L1 PIPT I-cache, 64KB 64b/line 4-way L1 D-cache
cpu0: 512KB 64b/line 8-way L2 cache
cpu0: 2048KB 64b/line 16-way L3 cache
cpu0: DP,RDM,Atomic,CRC32,SHA2,SHA1,AES+PMULL,LRCPC,DPB,ASID16,PAN+ATS1E1,LO,HPDS,VH,HAFDBS,CSV3,CSV2,RAS,AdvSIMD+HP,FP+HP,SSBS
cpu1 at mainbus0 mpidr 100: ARM Cortex-A76 r4p1
cpu1: 64KB 64b/line 4-way L1 PIPT I-cache, 64KB 64b/line 4-way L1 D-cache
cpu1: 512KB 64b/line 8-way L2 cache
cpu1: 2048KB 64b/line 16-way L3 cache
cpu2 at mainbus0 mpidr 200: ARM Cortex-A76 r4p1
cpu2: 64KB 64b/line 4-way L1 PIPT I-cache, 64KB 64b/line 4-way L1 D-cache
cpu2: 512KB 64b/line 8-way L2 cache
cpu2: 2048KB 64b/line 16-way L3 cache
cpu3 at mainbus0 mpidr 300: ARM Cortex-A76 r4p1
cpu3: 64KB 64b/line 4-way L1 PIPT I-cache, 64KB 64b/line 4-way L1 D-cache
cpu3: 512KB 64b/line 8-way L2 cache
cpu3: 2048KB 64b/line 16-way L3 cache
"atf" at mainbus0 not configured
"linux,cma" at mainbus0 not configured
"nvram" at mainbus0 not configured
apm0 at mainbus0
"system" at mainbus0 not configured
simplebus0 at mainbus0: "clocks"
"clk-osc" at simplebus0 not configured
"clk-vpu" at simplebus0 not configured
"clk-uart" at simplebus0 not configured
"clk-emmc2" at simplebus0 not configured
"clk-usb" at simplebus0 not configured
"clk_xosc" at simplebus0 not configured
"sdio_src" at simplebus0 not configured
"sdhci_core" at simplebus0 not configured
simplebus1 at mainbus0: "soc"
bcmstbrescal0 at simplebus1
bcmstbreset0 at simplebus1
bcmmbox0 at simplebus1
bcmstbgpio0 at simplebus1
ampintc0 at simplebus1 nirq 320, ncpu 4 ipi 0: "interrupt-controller"
bcmstbintc0 at simplebus1
bcmstbintc1 at simplebus1
bcmstbpinctrl0 at simplebus1
bcmstbgpio1 at simplebus1
bcmstbpinctrl1 at simplebus1
bcmtmon0 at simplebus1
sdhc0 at simplebus1
sdhc0: SDHC 3.00, 200 MHz base clock
sdmmc0 at sdhc0: 4-bit, sd high-speed, mmc high-speed, ddr52, dma
"timer" at simplebus1 not configured
"interrupt-controller" at simplebus1 not configured
pluart0 at simplebus1: rev 3, 32 byte fifo
pluart0: console
"clock" at simplebus1 not configured
"spi" at simplebus1 not configured
"watchdog" at simplebus1 not configured
bcmirng0 at simplebus1
"intc" at simplebus1 not configured
"serial" at simplebus1 not configured
"firmware" at simplebus1 not configured
"power" at simplebus1 not configured
"fb" at simplebus1 not configured
rpirtc0 at simplebus1
simplebus2 at simplebus1: "nvmem"
"nvmem_otp" at simplebus2 not configured
"nvmem_cust" at simplebus2 not configured
"nvmem_mac" at simplebus2 not configured
"nvmem_priv" at simplebus2 not configured
"fixedregulator_3v3" at simplebus1 not configured
"fixedregulator_5v0" at simplebus1 not configured
"gpiomem" at simplebus1 not configured
"gpiomem" at simplebus1 not configured
"gpiomem" at simplebus1 not configured
"gpiomem" at simplebus1 not configured
simplebus3 at mainbus0: "axi"
bcmmip0 at simplebus3
bcmmip1 at simplebus3
syscon0 at simplebus3: "syscon"
bcmpcie0 at simplebus3
bcmpcie1 at simplebus3
pci0 at bcmpcie1
ppb0 at pci0 dev 0 function 0 "Broadcom BCM2712" rev 0x21
pci1 at ppb0 bus 1
rpone0 at pci1 dev 0 function 0 "Raspberry Pi RP1" rev 0x00
simplebus4 at rpone0: "rp1"
rpiclock0 at simplebus4
rpigpio0 at simplebus4
"mailbox" at simplebus4 not configured
rpipwm0 at simplebus4
"adc" at simplebus4 not configured
cad0 at simplebus4: rev 0x70109, address 2c:cf:67:4e:54:36
brgphy0 at cad0 phy 1: BCM54210E, rev. 2
"pio" at simplebus4 not configured
"dma" at simplebus4 not configured
xhci0 at simplebus4, xHCI 1.10
usb0 at xhci0: USB revision 3.0
uhub0 at usb0 configuration 1 interface 0 "Generic xHCI root hub" rev 3.00/1.00 addr 1
xhci1 at simplebus4, xHCI 1.10
usb1 at xhci1: USB revision 3.0
uhub1 at usb1 configuration 1 interface 0 "Generic xHCI root hub" rev 3.00/1.00 addr 1
"sram" at simplebus4 not configured
"gpiomem" at simplebus4 not configured
"iommu" at simplebus3 not configured
"iommu" at simplebus3 not configured
"iommu" at simplebus3 not configured
"iommuc" at simplebus3 not configured
"dma" at simplebus3 not configured
"dma" at simplebus3 not configured
"codec" at simplebus3 not configured
"pisp_be" at simplebus3 not configured
sdhc1 at simplebus3
sdhc1: SDHC 3.00, 200 MHz base clock
sdmmc1 at sdhc1: 4-bit, sd high-speed, mmc high-speed, ddr52, dma
agtimer0 at mainbus0: 54000 kHz
"clk-27M" at mainbus0 not configured
"clk-108M" at mainbus0 not configured
"arm-pmu" at mainbus0 not configured
"phy" at mainbus0 not configured
gpioleds0 at mainbus0: "PWR", "ACT"
"sd-io-1v8-reg" at mainbus0 not configured
"sd-vcc-reg" at mainbus0 not configured
"wl-on-reg" at mainbus0 not configured
"cam0_reg" at mainbus0 not configured
"cam1_reg" at mainbus0 not configured
"cam_dummy_reg" at mainbus0 not configured
"dummy" at mainbus0 not configured
"i2c0if" at mainbus0 not configured
"i2c0mux" at mainbus0 not configured
"rp1_firmware" at mainbus0 not configured
"rp1_vdd_3v3" at mainbus0 not configured
pwmfan0 at mainbus0
gpiokeys0 at mainbus0: "pwr_button"
bwfm0 at sdmmc1 function 1
manufacturer 0x02d0, product 0x4345 at sdmmc1 function 2 not configured
manufacturer 0x02d0, product 0x4345 at sdmmc1 function 3 not configured
scsibus0 at sdmmc0: 2 targets, initiator 0
sd0 at scsibus0 targ 1 lun 0: <Sandisk, SN128, 0086> removable
sd0: 121942MB, 512 bytes/sector, 249737216 sectors
uplcom0 at uhub0 port 1 configuration 1 interface 0 "Prolific Technology Inc. USB-Serial Controller" rev 2.00/1.05 addr 2
ucom0 at uplcom0: usb0.0.00001.0
vscsi0 at root
scsibus1 at vscsi0: 256 targets
softraid0 at root
scsibus2 at softraid0: 256 targets
root on sd0a (c50447797762e66b.a) swap on sd0b dump on sd0b
bwfm0: address b8:27:eb:74:f2:6c

You should report that to OpenBSD I think

Are you able to reproduce if skipping running the service and launch interactively instead? In that case trying different values for $STTRACE might give more clues on what happens prior to the panic.

You might also wish to try reading thought the docs and reducing values in the configuration. It would not surprise me if some defaults are too high for the combination of conservative OpenBSD and resource constrained rpi.

Yes, the panic is triggered even when run interactively. I just tried a few STTRACE value. It definitely spits out lots of stuff, but nothing immediately obvious to me that’s related.

It would not surprise me if some defaults are too high for the combination of conservative OpenBSD and resource constrained rpi.

I doubt it’s the rpi. I can hot swap in another SD with Alpine Linux and syncthing runs without issue. So the hardware is known good. Rpi5 support is new in OpenBSD 7.8, so more likely to be something there. I’ll continue probing and see what I can find.

Whatever the cause, really, the kernel panicking is a kernel bug and should be reported.

Thanks. Just submitted it using OpenBSD’s sendbug. Will follow up here if it progresses.

1 Like

For reference, the submission with OpenBSD team:

It seems there’s a potential root cause already identified.

1 Like