panic: unix: lock not held

1 view
Skip to first unread message

syzbot

unread,
Mar 30, 2024, 6:47:23 PMMar 30
to syzkaller-o...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 2ee472d028ec Support having bcmpcie(4) as both PCIe bus an..
git tree: openbsd
console output: https://syzkaller.appspot.com/x/log.txt?x=10f6e21d180000
kernel config: https://syzkaller.appspot.com/x/.config?x=1bc15e68cd2a49e5
dashboard link: https://syzkaller.appspot.com/bug?extid=00450333592fcd38c6fe

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/3251cdf9a375/disk-2ee472d0.raw.xz
bsd.gdb: https://storage.googleapis.com/syzbot-assets/45f17e008029/bsd-2ee472d0.gdb.xz
kernel image: https://storage.googleapis.com/syzbot-assets/c7513241ff7c/kernel-2ee472d0.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+004503...@syzkaller.appspotmail.com

panic: unix: lock not held
Stopped at db_enter+0x1c: addq $0x8,%rsp
TID PID UID PRFLAGS PFLAGS CPU COMMAND
*132173 28589 0 0 0x4000000 0 syz-executor.0
db_enter() at db_enter+0x1c sys/arch/amd64/amd64/db_interface.c:437
panic(ffffffff82865988) at panic+0x165 sys/kern/subr_prf.c:198
rw_assert_wrlock(fffffd8060ba5018) at rw_assert_wrlock+0xb7 sys/kern/kern_rwlock.c:387
filt_soread(fffffd807c7ba978,0) at filt_soread+0x123 sys/kern/uipc_socket.c:2237
knote_locked(fffffd8060ba5130,0) at knote_locked+0x78 filter_event sys/kern/kern_event.c:778 [inline]
knote_locked(fffffd8060ba5130,0) at knote_locked+0x78 sys/kern/kern_event.c:1845
sowakeup(fffffd8060ba5010,fffffd8060ba50c0) at sowakeup+0x82 sys/kern/uipc_socket2.c:611
sorwakeup(fffffd8060ba5010) at sorwakeup+0xfb sys/kern/uipc_socket.c:1791
uipc_dgram_send(fffffd8060ba51f8,fffffd806d2b8b00,fffffd806d2b8500,0) at uipc_dgram_send+0x1b7 sys/kern/uipc_usrreq.c:585
sosend(fffffd8060ba51f8,fffffd806d2b8500,ffff8000379eb5a8,0,0,0) at sosend+0x663
sendit(ffff80002daee570,5,ffff8000379eb720,0,ffff8000379eb7d0) at sendit+0x555 sys/kern/uipc_syscalls.c:786
sys_sendmsg(ffff80002daee570,ffff8000379eb880,ffff8000379eb7d0) at sys_sendmsg+0x19e sys/kern/uipc_syscalls.c:604
syscall(ffff8000379eb880) at syscall+0x538 sys/arch/amd64/amd64/trap.c:577
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0x13f6c484130, count: 2
https://www.openbsd.org/ddb.html describes the minimum info required in bug
reports. Insufficient info makes it difficult to find and fix bugs.
ddb>
ddb> set $lines = 0
ddb> set $maxwidth = 0
ddb> show panic
*cpu0: unix: lock not held
ddb> trace
db_enter() at db_enter+0x1c sys/arch/amd64/amd64/db_interface.c:437
panic(ffffffff82865988) at panic+0x165 sys/kern/subr_prf.c:198
rw_assert_wrlock(fffffd8060ba5018) at rw_assert_wrlock+0xb7 sys/kern/kern_rwlock.c:387
filt_soread(fffffd807c7ba978,0) at filt_soread+0x123 sys/kern/uipc_socket.c:2237
knote_locked(fffffd8060ba5130,0) at knote_locked+0x78 filter_event sys/kern/kern_event.c:778 [inline]
knote_locked(fffffd8060ba5130,0) at knote_locked+0x78 sys/kern/kern_event.c:1845
sowakeup(fffffd8060ba5010,fffffd8060ba50c0) at sowakeup+0x82 sys/kern/uipc_socket2.c:611
sorwakeup(fffffd8060ba5010) at sorwakeup+0xfb sys/kern/uipc_socket.c:1791
uipc_dgram_send(fffffd8060ba51f8,fffffd806d2b8b00,fffffd806d2b8500,0) at uipc_dgram_send+0x1b7 sys/kern/uipc_usrreq.c:585
sosend(fffffd8060ba51f8,fffffd806d2b8500,ffff8000379eb5a8,0,0,0) at sosend+0x663
sendit(ffff80002daee570,5,ffff8000379eb720,0,ffff8000379eb7d0) at sendit+0x555 sys/kern/uipc_syscalls.c:786
sys_sendmsg(ffff80002daee570,ffff8000379eb880,ffff8000379eb7d0) at sys_sendmsg+0x19e sys/kern/uipc_syscalls.c:604
syscall(ffff8000379eb880) at syscall+0x538 sys/arch/amd64/amd64/trap.c:577
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0x13f6c484130, count: -13
ddb> show registers
rdi 0
rsi 0x1
rbp 0xffff8000379eb210
rbx 0xffffffff82ca5ff0 cpu_info_full_primary+0x1ff0
rdx 0xffff800000e60180
rcx 0
rax 0xffff80002daee570
r8 0x101010101010101
r9 0x8080808080808080
r10 0xaa81f97f35450ee
r11 0xcad2fc8796d2eadb
r12 0
r13 0
r14 0
r15 0x1
rip 0xffffffff811a086c db_enter+0x1c
cs 0x8
rflags 0x246
rsp 0xffff8000379eb200
ss 0x10
db_enter+0x1c: addq $0x8,%rsp
ddb> show proc
PROC (syz-executor.0) tid=132173 pid=28589 tcnt=3 stat=onproc
flags process=0 proc=4000000<THREAD>
runpri=32, usrpri=84, slppri=32, nice=20
wchan=0x0, wmesg=, ps_single=0x0
forw=0xffffffffffffffff, list=0xffff80002daefd58,0xffff80002daef2c8
process=0xffff8000378a2a08 user=0xffff8000379e6000, vmspace=0xfffffd8061051c90
estcpu=34, cpticks=0, pctcpu=0.0, user=0, sys=0, intr=0
ddb> ps
PID TID PPID UID S FLAGS WAIT COMMAND
44318 130744 11290 0 2 0 syz-executor.6
44318 475454 11290 0 2 0x4000000 syz-executor.6
84563 128720 75335 0 2 0 syz-executor.5
84563 363328 75335 0 3 0x4000080 fsleep syz-executor.5
90871 190493 18486 0 2 0 syz-executor.2
90871 132300 18486 0 3 0x4000080 fsleep syz-executor.2
90871 350572 18486 0 3 0x4000080 fsleep syz-executor.2
77330 360895 78844 0 2 0 syz-executor.1
77330 351119 78844 0 3 0x4000080 fsleep syz-executor.1
52513 286165 29356 0 2 0 syz-executor.7
52513 180388 29356 0 3 0x4000080 kqread syz-executor.7
52513 290543 29356 0 3 0x4000080 fsleep syz-executor.7
28589 270349 96704 0 2 0 syz-executor.0
28589 262825 96704 0 3 0x4000080 kqread syz-executor.0
*28589 132173 96704 0 7 0x4000000 syz-executor.0
27205 284752 60481 0 3 0x80 nanoslp syz-executor.3
27205 399161 60481 0 3 0x4000080 netcon2 syz-executor.3
62807 474253 77357 0 3 0x82 nanoslp syz-executor.4
11290 409289 77357 0 3 0x82 nanoslp syz-executor.6
78844 34080 77357 0 3 0x82 nanoslp syz-executor.1
96704 70566 77357 0 3 0x82 nanoslp syz-executor.0
60481 29236 77357 0 3 0x82 nanoslp syz-executor.3
75335 421331 77357 0 3 0x82 nanoslp syz-executor.5
29356 363800 77357 0 3 0x82 nanoslp syz-executor.7
18486 176490 77357 0 3 0x82 nanoslp syz-executor.2
85681 409794 0 0 3 0x14280 nfsidl nfsio
43261 210403 0 0 3 0x14280 nfsidl nfsio
85293 326304 0 0 3 0x14280 nfsidl nfsio
21814 61583 0 0 3 0x14280 nfsidl nfsio
59034 345013 0 0 3 0x14280 nfsidl nfsio
44910 227198 0 0 3 0x14280 nfsidl nfsio
81957 256164 0 0 3 0x14280 nfsidl nfsio
77500 198591 0 0 3 0x14280 nfsidl nfsio
11169 326877 0 0 3 0x14280 nfsidl nfsio
92970 135521 0 0 3 0x14280 nfsidl nfsio
68727 48736 0 0 3 0x14280 nfsidl nfsio
40225 88025 0 0 3 0x14280 nfsidl nfsio
1759 411791 0 0 3 0x14280 nfsidl nfsio
54400 114181 0 0 3 0x14280 nfsidl nfsio
62874 128485 0 0 3 0x14280 nfsidl nfsio
15932 25577 0 0 3 0x14280 nfsidl nfsio
69899 320549 0 0 3 0x14280 nfsidl nfsio
76892 70286 0 0 3 0x14280 nfsidl nfsio
35441 223202 0 0 3 0x14280 nfsidl nfsio
79947 337860 0 0 3 0x14280 nfsidl nfsio
55092 452490 1 0 3 0x18100083 ttyopn getty
42260 48933 0 0 3 0x14200 acct acct
34871 480639 0 0 3 0x14200 bored sosplice
77357 399009 2502 0 3 0x1a000082 wait syz-fuzzer
77357 394242 2502 0 3 0x1e000082 thrsleep syz-fuzzer
77357 510546 2502 0 3 0x1e000082 thrsleep syz-fuzzer
77357 107980 2502 0 3 0x1e000082 kqread syz-fuzzer
77357 494824 2502 0 3 0x1e000082 thrsleep syz-fuzzer
77357 156616 2502 0 3 0x1e000082 wait syz-fuzzer
77357 48782 2502 0 3 0x1e000082 wait syz-fuzzer
77357 402040 2502 0 3 0x1e000082 wait syz-fuzzer
77357 130651 2502 0 3 0x1e000082 thrsleep syz-fuzzer
77357 88666 2502 0 3 0x1e000082 wait syz-fuzzer
77357 365519 2502 0 3 0x1e000082 thrsleep syz-fuzzer
77357 154622 2502 0 3 0x1e000082 wait syz-fuzzer
77357 197078 2502 0 3 0x1e000082 wait syz-fuzzer
77357 124692 2502 0 3 0x1e000082 thrsleep syz-fuzzer
77357 76501 2502 0 3 0x1e000082 wait syz-fuzzer
2502 310655 64307 0 3 0x810008a sigsusp ksh
64307 185051 76184 0 3 0x1800009a kqread sshd
76184 8214 1 0 3 0x18000088 kqread sshd
8367 44528 97816 73 3 0x19100010 biowait syslogd
97816 488654 1 0 3 0x18100082 netio syslogd
76453 390777 1 0 3 0x18100080 kqread resolvd
32766 514237 5390 77 3 0x18100092 kqread dhcpleased
33462 84193 5390 77 3 0x18100092 kqread dhcpleased
5390 275104 1 0 3 0x18000080 kqread dhcpleased
29285 303018 0 0 3 0x14200 bored smr
18083 353550 0 0 2 0x14200 zerothread
19416 144804 0 0 3 0x14200 aiodoned aiodoned
15023 146590 0 0 3 0x14200 syncer update
62168 479412 0 0 3 0x14200 cleaner cleaner
9677 341482 0 0 3 0x14200 reaper reaper
28731 118242 0 0 3 0x14200 pgdaemon pagedaemon
26205 60609 0 0 3 0x14200 bored viomb
14293 276949 0 0 3 0x40014200 acpi0 acpi0
63608 240701 0 0 3 0x14200 bored softnet3
65382 251158 0 0 3 0x14200 bored softnet2
90436 125511 0 0 3 0x14200 bored softnet1
28420 74940 0 0 3 0x14200 bored softnet0
41743 32304 0 0 3 0x14200 bored systqmp
73104 481522 0 0 3 0x14200 bored systq
99723 392389 0 0 3 0x40014200 tmoslp softclock
54033 233310 0 0 3 0x40014200 idle0
1 345753 0 0 3 0x8000082 wait init
0 0 -1 0 3 0x10200 scheduler swapper
ddb> show all locks
No such command
ddb> show malloc
Type InUse MemUse HighUse Limit Requests Type Lim
devbuf 10216 6439K 14624K 166960K 80954 0
pcb 15 20K 22K 166960K 2011 0
rtable 249 12K 12K 166960K 8821 0
pf 35 9K 10K 166960K 1006 0
ifaddr 113 32K 33K 166960K 1165 0
ifgroup 60 2K 2K 166960K 1629 0
sysctl 4 1K 1K 166960K 10 0
counters 33 17K 17K 166960K 477 0
ioctlops 0 0K 2K 166960K 2590 0
iov 0 0K 36K 166960K 3901 0
mount 1 1K 1K 166960K 1 0
log 0 0K 0K 166960K 4 0
vnodes 1814 114K 114K 166960K 25936 0
UFS quota 1 32K 32K 166960K 1 0
UFS mount 5 36K 36K 166960K 5 0
shm 2 1K 9K 166960K 157 0
VM map 2 1K 1K 166960K 2 0
sem 12 0K 0K 166960K 5823 0
dirhash 12 2K 2K 166960K 147 0
ACPI 1697 195K 286K 166960K 12548 0
file desc 17 61K 81K 166960K 32849 0
sigio 0 0K 0K 166960K 1321 0
proc 58 59K 92K 166960K 7216 0
subproc 104 6K 6K 166960K 2615 0
NFS srvsock 1 0K 0K 166960K 1 0
NFS daemon 1 16K 16K 166960K 1 0
ip_moptions 1 0K 0K 166960K 1885 0
in_multi 100 7K 7K 166960K 2522 0
ether_multi 2 0K 0K 166960K 36 0
mrt 4 0K 0K 166960K 57 0
ISOFS mount 1 32K 32K 166960K 1 0
MSDOSFS mount 1 16K 16K 166960K 1 0
ttys 253 1129K 1129K 166960K 253 0
exec 0 0K 1K 166960K 6255 0
pfkey data 0 0K 0K 166960K 35 0
tdb 3 0K 0K 166960K 3 0
VM swap 8 62K 64K 166960K 10 0
UVM amap 674 1176K 1186K 166960K 296507 0
UVM aobj 131 4K 5K 166960K 137 0
pinsyscall 22 44K 100K 166960K 7706 0
memdesc 1 4K 4K 166960K 1 0
crypto data 1 1K 1K 166960K 1 0
ip6_options 0 0K 1K 166960K 895 0
NDP 14 0K 1K 166960K 864 0
temp 75 6804K 7440K 166960K 258507 0
kqueue 13 20K 30K 166960K 2610 0
SYN cache 2 104K 112K 166960K 3 0
ddb> show all pools
Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle
rtpcb 120 1651 0 1647 4 1 3 3 0 8 2
rtentry 112 2975 0 2864 4 0 4 4 0 8 0
unpcb 144 27297 0 27281 19 11 8 11 0 8 6
syncache 336 319 0 319 2 1 1 1 0 8 1
tcpqe 32 356 56 356 2 1 1 1 0 8 1
tcpcb 808 11134 0 11128 38 29 9 15 0 8 8
arp 88 553 0 534 1 0 1 1 0 8 0
ipq 40 45 0 44 1 0 1 1 0 8 0
ipqe 40 457 0 456 1 0 1 1 0 8 0
inpcb 360 26703 0 26693 107 98 9 20 0 8 8
nd6 104 615 0 591 1 0 1 1 0 8 0
pkpcb 40 444 0 444 2 1 1 1 0 8 1
kcovpl 48 200 0 192 1 0 1 1 0 8 0
ppxss 1072 149 0 148 1 0 1 1 0 8 0
art_heap8 4096 40 0 39 3 2 1 3 0 8 0
art_heap4 256 10328 0 9867 75 46 29 31 0 8 0
art_table 32 10368 0 9906 4 0 4 4 0 8 0
art_node 16 2929 0 2828 1 0 1 1 0 8 0
sysvmsgpl 40 27 0 20 1 0 1 1 0 8 0
semapl 112 5817 0 5807 1 0 1 1 0 8 0
shmpl 112 134 0 6 4 0 4 4 0 8 0
dirhash 1024 107 0 90 3 0 3 3 0 8 0
dino2pl 256 44370 0 42686 106 0 106 106 0 8 0
ffsino 240 44370 0 42686 100 0 100 100 0 8 0
nchpl 144 87295 0 85562 66 0 66 66 0 8 0
uvmvnodes 80 9150 0 0 187 0 187 187 0 8 0
vnodes 216 9150 0 0 509 0 509 509 0 8 0
namei 1024 318220 0 318220 3 1 2 2 0 8 2
vcpupl 2048 371 0 0 47 0 47 47 0 8 0
vmpool 664 471 0 100 31 0 31 31 0 8 0
kstatmem 264 916 0 888 2 0 2 2 0 8 0
scxspl 216 273879 0 273878 11 7 4 8 1 8 3
plimitpl 152 3644 0 3629 1 0 1 1 0 8 0
sigapl 424 33147 0 33080 10 2 8 8 0 8 0
futexpl 64 301892 0 301887 1 0 1 1 0 8 0
knotepl 120 282052 0 281969 32 20 12 18 0 8 8
kqueuepl 184 5918 0 5908 10 6 4 7 0 8 3
pipepl 288 6333 0 6305 17 8 9 11 0 8 7
fdescpl 432 32724 0 32696 4 0 4 4 0 8 0
filepl 120 206620 0 206376 33 19 14 20 0 8 5
lockfpl 104 9501 0 9499 3 1 2 2 0 8 1
lockfspl 48 3494 0 3492 1 0 1 1 0 8 0
sessionpl 144 218 0 202 1 0 1 1 0 8 0
pgrppl 48 545 0 529 1 0 1 1 0 8 0
ucredpl 104 28571 0 28558 1 0 1 1 0 8 0
zombiepl 144 33081 0 33080 1 0 1 1 0 8 0
processpl 1072 33147 0 33080 6 1 5 5 0 8 0
procpl 680 80057 0 79966 10 1 9 9 0 8 1
sosppl 168 374 0 374 2 1 1 1 0 8 1
sockpl 488 56155 0 56125 916 895 21 54 0 8 16
mcl64k 65536 1398 0 1398 2 1 1 1 0 8 1
mcl16k 16384 708 0 708 2 1 1 1 0 8 1
mcl12k 12288 1305 0 1305 2 1 1 1 0 8 1
mcl9k 9216 514 0 514 2 1 1 1 0 8 1
mcl8k 8192 2503 0 2503 2 1 1 1 0 8 1
mcl4k 4096 3501 0 3501 5 1 4 4 0 8 4
mcl2k2 2112 284 0 284 2 1 1 1 0 8 1
mcl2k 2048 145023 0 144976 69 54 15 38 0 8 8
mtagpl 96 7493 0 7454 24 16 8 17 0 8 7
mbufpl 256 514127 0 513914 724 708 16 101 0 8 1
bufpl 280 57933 0 48782 654 0 654 654 0 8 0
anonpl 24 3039340 0 3025659 177 13 164 164 0 188 49
amapchunkpl 152 950714 0 949778 77 11 66 66 0 158 23
amappl16 200 58395 0 57872 111 74 37 43 0 8 8
amappl15 192 224 0 223 1 0 1 1 0 8 0
amappl14 184 758 0 740 2 1 1 2 0 8 0
amappl13 176 43 0 42 1 0 1 1 0 8 0
amappl12 168 36219 0 36182 2 0 2 2 0 8 0
amappl11 160 51 0 41 1 0 1 1 0 8 0
amappl10 152 432 0 415 1 0 1 1 0 8 0
amappl9 144 383 0 383 2 1 1 1 0 8 1
amappl8 136 1319 0 1200 5 0 5 5 0 8 0
amappl7 128 209 0 193 1 0 1 1 0 8 0
amappl6 120 2911 0 2889 2 1 1 2 0 8 0
amappl5 112 1584 0 1571 1 0 1 1 0 8 0
amappl4 104 2305 0 2270 3 1 2 2 0 8 1
amappl3 96 182638 0 182540 3 0 3 3 0 8 0
amappl2 88 34924 0 34852 4 2 2 4 0 8 0
amappl1 80 137685 0 137195 21 9 12 21 0 8 0
amappl 88 293729 0 293388 9 0 9 9 0 92 0
dma4096 4096 1 0 1 1 1 0 1 0 8 0
dma1024 1024 1 0 0 1 0 1 1 0 8 0
dma256 256 6 0 6 1 1 0 1 0 8 0
dma128 128 253 0 253 1 1 0 1 0 8 0
dma64 64 6 0 6 1 1 0 1 0 8 0
dma32 32 7 0 7 1 1 0 1 0 8 0
dma16 16 18 0 17 1 0 1 1 0 8 0
aobjpl 72 136 0 6 3 0 3 3 0 8 0
uaddrrnd 24 33195 0 32796 3 0 3 3 0 8 0
uaddrbest 32 2 0 0 1 0 1 1 0 8 0
uaddr 24 33195 0 32796 3 0 3 3 0 8 0
vmmpekpl 168 220779 0 220669 5 0 5 5 0 8 0
vmmpepl 168 1994964 0 1992128 194 35 159 160 0 357 16
vmsppl 352 33194 0 32796 37 0 37 37 0 8 0
rwobjpl 24 443055 0 432057 67 0 67 67 0 8 0
pdppl 4096 66396 0 65963 2124 1689 435 443 0 8 2
pvpl 32 8732675 0 8713030 503 205 298 388 0 265 100
pmappl 216 33194 0 32796 23 0 23 23 0 8 0
extentpl 40 56 0 38 1 0 1 1 0 8 0
phpool 112 3335 0 2545 24 0 24 24 0 8 0
ddb> machine ddbcpu 0
No such command
ddb> trace
db_enter() at db_enter+0x1c sys/arch/amd64/amd64/db_interface.c:437
panic(ffffffff82865988) at panic+0x165 sys/kern/subr_prf.c:198
rw_assert_wrlock(fffffd8060ba5018) at rw_assert_wrlock+0xb7 sys/kern/kern_rwlock.c:387
filt_soread(fffffd807c7ba978,0) at filt_soread+0x123 sys/kern/uipc_socket.c:2237
knote_locked(fffffd8060ba5130,0) at knote_locked+0x78 filter_event sys/kern/kern_event.c:778 [inline]
knote_locked(fffffd8060ba5130,0) at knote_locked+0x78 sys/kern/kern_event.c:1845
sowakeup(fffffd8060ba5010,fffffd8060ba50c0) at sowakeup+0x82 sys/kern/uipc_socket2.c:611
sorwakeup(fffffd8060ba5010) at sorwakeup+0xfb sys/kern/uipc_socket.c:1791
uipc_dgram_send(fffffd8060ba51f8,fffffd806d2b8b00,fffffd806d2b8500,0) at uipc_dgram_send+0x1b7 sys/kern/uipc_usrreq.c:585
sosend(fffffd8060ba51f8,fffffd806d2b8500,ffff8000379eb5a8,0,0,0) at sosend+0x663
sendit(ffff80002daee570,5,ffff8000379eb720,0,ffff8000379eb7d0) at sendit+0x555 sys/kern/uipc_syscalls.c:786
sys_sendmsg(ffff80002daee570,ffff8000379eb880,ffff8000379eb7d0) at sys_sendmsg+0x19e sys/kern/uipc_syscalls.c:604
syscall(ffff8000379eb880) at syscall+0x538 sys/arch/amd64/amd64/trap.c:577
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0x13f6c484130, count: -13
ddb> machine ddbcpu 1
No such command
ddb> trace
db_enter() at db_enter+0x1c sys/arch/amd64/amd64/db_interface.c:437
panic(ffffffff82865988) at panic+0x165 sys/kern/subr_prf.c:198
rw_assert_wrlock(fffffd8060ba5018) at rw_assert_wrlock+0xb7 sys/kern/kern_rwlock.c:387
filt_soread(fffffd807c7ba978,0) at filt_soread+0x123 sys/kern/uipc_socket.c:2237
knote_locked(fffffd8060ba5130,0) at knote_locked+0x78 filter_event sys/kern/kern_event.c:778 [inline]
knote_locked(fffffd8060ba5130,0) at knote_locked+0x78 sys/kern/kern_event.c:1845
sowakeup(fffffd8060ba5010,fffffd8060ba50c0) at sowakeup+0x82 sys/kern/uipc_socket2.c:611
sorwakeup(fffffd8060ba5010) at sorwakeup+0xfb sys/kern/uipc_socket.c:1791
uipc_dgram_send(fffffd8060ba51f8,fffffd806d2b8b00,fffffd806d2b8500,0) at uipc_dgram_send+0x1b7 sys/kern/uipc_usrreq.c:585
sosend(fffffd8060ba51f8,fffffd806d2b8500,ffff8000379eb5a8,0,0,0) at sosend+0x663
sendit(ffff80002daee570,5,ffff8000379eb720,0,ffff8000379eb7d0) at sendit+0x555 sys/kern/uipc_syscalls.c:786
sys_sendmsg(ffff80002daee570,ffff8000379eb880,ffff8000379eb7d0) at sys_sendmsg+0x19e sys/kern/uipc_syscalls.c:604
syscall(ffff8000379eb880) at syscall+0x538 sys/arch/amd64/amd64/trap.c:577
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0x13f6c484130, count: -13


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup

syzbot

unread,
Mar 30, 2024, 7:04:20 PMMar 30
to syzkaller-o...@googlegroups.com
syzbot has found a reproducer for the following issue on:

HEAD commit: 2ee472d028ec Support having bcmpcie(4) as both PCIe bus an..
git tree: openbsd
console output: https://syzkaller.appspot.com/x/log.txt?x=11f76341180000
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=161ebc1d180000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=167fbf45180000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/3251cdf9a375/disk-2ee472d0.raw.xz
bsd.gdb: https://storage.googleapis.com/syzbot-assets/45f17e008029/bsd-2ee472d0.gdb.xz
kernel image: https://storage.googleapis.com/syzbot-assets/c7513241ff7c/kernel-2ee472d0.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+004503...@syzkaller.appspotmail.com

panic: unix: lock not held
Stopped at db_enter+0x1c: addq $0x8,%rsp
TID PID UID PRFLAGS PFLAGS CPU COMMAND
*215936 26110 0 0x8000002 0 0 syz-executor1534187535
db_enter() at db_enter+0x1c sys/arch/amd64/amd64/db_interface.c:437
panic(ffffffff82865988) at panic+0x165 sys/kern/subr_prf.c:198
rw_assert_wrlock(fffffd806ed125c8) at rw_assert_wrlock+0xb7 sys/kern/kern_rwlock.c:387
filt_soread(fffffd807474bbb8,0) at filt_soread+0x123 sys/kern/uipc_socket.c:2237
knote_locked(fffffd806ed126e0,0) at knote_locked+0x78 filter_event sys/kern/kern_event.c:778 [inline]
knote_locked(fffffd806ed126e0,0) at knote_locked+0x78 sys/kern/kern_event.c:1845
sowakeup(fffffd806ed125c0,fffffd806ed12670) at sowakeup+0x82 sys/kern/uipc_socket2.c:611
sorwakeup(fffffd806ed125c0) at sorwakeup+0xfb sys/kern/uipc_socket.c:1791
uipc_dgram_send(fffffd80760e8b88,fffffd806d281e00,fffffd806d281300,0) at uipc_dgram_send+0x1b7 sys/kern/uipc_usrreq.c:585
sosend(fffffd80760e8b88,fffffd806d281300,ffff80002a61ce48,0,0,0) at sosend+0x663
sendit(ffff80002a5d72a0,5,ffff80002a61cfc0,0,ffff80002a61d070) at sendit+0x555 sys/kern/uipc_syscalls.c:786
sys_sendmsg(ffff80002a5d72a0,ffff80002a61d120,ffff80002a61d070) at sys_sendmsg+0x19e sys/kern/uipc_syscalls.c:604
syscall(ffff80002a61d120) at syscall+0x538 sys/arch/amd64/amd64/trap.c:577
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0x70c00c0ee8b0, count: 2
https://www.openbsd.org/ddb.html describes the minimum info required in bug
reports. Insufficient info makes it difficult to find and fix bugs.
ddb>
ddb> set $lines = 0
ddb> set $maxwidth = 0
ddb> show panic
*cpu0: unix: lock not held
ddb> trace
db_enter() at db_enter+0x1c sys/arch/amd64/amd64/db_interface.c:437
panic(ffffffff82865988) at panic+0x165 sys/kern/subr_prf.c:198
rw_assert_wrlock(fffffd806ed125c8) at rw_assert_wrlock+0xb7 sys/kern/kern_rwlock.c:387
filt_soread(fffffd807474bbb8,0) at filt_soread+0x123 sys/kern/uipc_socket.c:2237
knote_locked(fffffd806ed126e0,0) at knote_locked+0x78 filter_event sys/kern/kern_event.c:778 [inline]
knote_locked(fffffd806ed126e0,0) at knote_locked+0x78 sys/kern/kern_event.c:1845
sowakeup(fffffd806ed125c0,fffffd806ed12670) at sowakeup+0x82 sys/kern/uipc_socket2.c:611
sorwakeup(fffffd806ed125c0) at sorwakeup+0xfb sys/kern/uipc_socket.c:1791
uipc_dgram_send(fffffd80760e8b88,fffffd806d281e00,fffffd806d281300,0) at uipc_dgram_send+0x1b7 sys/kern/uipc_usrreq.c:585
sosend(fffffd80760e8b88,fffffd806d281300,ffff80002a61ce48,0,0,0) at sosend+0x663
sendit(ffff80002a5d72a0,5,ffff80002a61cfc0,0,ffff80002a61d070) at sendit+0x555 sys/kern/uipc_syscalls.c:786
sys_sendmsg(ffff80002a5d72a0,ffff80002a61d120,ffff80002a61d070) at sys_sendmsg+0x19e sys/kern/uipc_syscalls.c:604
syscall(ffff80002a61d120) at syscall+0x538 sys/arch/amd64/amd64/trap.c:577
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0x70c00c0ee8b0, count: -13
ddb> show registers
rdi 0
rsi 0x1
rbp 0xffff80002a61cab0
rbx 0xffffffff82ca5ff0 cpu_info_full_primary+0x1ff0
rdx 0x3fd
rcx 0
rax 0x1b
r8 0x101010101010101
r9 0x8080808080808080
r10 0x744e97e1a276d896
r11 0xb4281dedd6b4dbfa
r12 0
r13 0
r14 0
r15 0x1
rip 0xffffffff811a086c db_enter+0x1c
cs 0x8
rflags 0x246
rsp 0xffff80002a61caa0
ss 0x10
db_enter+0x1c: addq $0x8,%rsp
ddb> show proc
PROC (syz-executor1534187535) tid=215936 pid=26110 tcnt=1 stat=onproc
flags process=8000002<EXEC> proc=0
runpri=17, usrpri=52, slppri=17, nice=20
wchan=0x0, wmesg=, ps_single=0x0
forw=0xffffffffffffffff, list=0xffff80002a5d6008,0xffffffff82e14630
process=0xffff8000ffff69f0 user=0xffff80002a618000, vmspace=0xfffffd80074a2000
estcpu=2, cpticks=1, pctcpu=0.0, user=0, sys=1, intr=0
ddb> ps
PID TID PPID UID S FLAGS WAIT COMMAND
*26110 215936 35576 0 7 0x8000002 syz-executor1534187535
35576 240061 45440 0 3 0x810008a sigsusp ksh
45440 370183 15785 0 3 0x1800009a kqread sshd
45793 354489 1 0 3 0x18100083 ttyin getty
15785 213817 1 0 3 0x18000088 kqread sshd
41307 358715 29069 73 3 0x19100090 kqread syslogd
29069 184757 1 0 3 0x18100082 netio syslogd
16457 468889 1 0 3 0x18100080 kqread resolvd
61778 248055 38398 77 3 0x18100092 kqread dhcpleased
30627 512430 38398 77 3 0x18100092 kqread dhcpleased
38398 52547 1 0 3 0x18000080 kqread dhcpleased
97015 108940 0 0 3 0x14200 bored smr
66159 17835 0 0 3 0x14200 pgzero zerothread
86816 115960 0 0 3 0x14200 aiodoned aiodoned
92801 104633 0 0 3 0x14200 syncer update
26390 15979 0 0 3 0x14200 cleaner cleaner
11696 58498 0 0 3 0x14200 reaper reaper
22833 398391 0 0 3 0x14200 pgdaemon pagedaemon
54567 286057 0 0 3 0x14200 bored viomb
34170 417224 0 0 3 0x40014200 acpi0 acpi0
32243 264711 0 0 3 0x14200 bored softnet3
96098 372896 0 0 3 0x14200 bored softnet2
57812 400789 0 0 3 0x14200 bored softnet1
87376 31174 0 0 3 0x14200 bored softnet0
69130 52153 0 0 3 0x14200 bored systqmp
30157 406578 0 0 3 0x14200 bored systq
57599 69185 0 0 3 0x40014200 tmoslp softclock
6199 30174 0 0 3 0x40014200 idle0
1 213137 0 0 3 0x8000082 wait init
0 0 -1 0 3 0x10200 scheduler swapper
ddb> show all locks
No such command
ddb> show malloc
Type InUse MemUse HighUse Limit Requests Type Lim
devbuf 10137 6382K 6413K 166960K 11215 0
pcb 15 10K 10K 166960K 15 0
rtable 58 1K 2K 166960K 112 0
pf 12 6K 6K 166960K 12 0
ifaddr 11 5K 5K 166960K 11 0
ifgroup 17 1K 1K 166960K 17 0
counters 22 16K 16K 166960K 22 0
ioctlops 0 0K 2K 166960K 21 0
mount 1 1K 1K 166960K 1 0
log 0 0K 0K 166960K 4 0
vnodes 1259 79K 79K 166960K 1275 0
UFS quota 1 32K 32K 166960K 1 0
UFS mount 5 36K 36K 166960K 5 0
shm 2 1K 1K 166960K 2 0
VM map 2 1K 1K 166960K 2 0
sem 2 0K 0K 166960K 2 0
dirhash 12 2K 2K 166960K 12 0
ACPI 1697 195K 286K 166960K 12548 0
file desc 1 0K 0K 166960K 1 0
proc 55 58K 59K 166960K 246 0
NFS srvsock 1 0K 0K 166960K 1 0
NFS daemon 1 16K 16K 166960K 1 0
in_multi 11 0K 0K 166960K 11 0
ether_multi 1 0K 0K 166960K 1 0
ISOFS mount 1 32K 32K 166960K 1 0
MSDOSFS mount 1 16K 16K 166960K 1 0
ttys 25 122K 122K 166960K 25 0
exec 0 0K 1K 166960K 246 0
tdb 3 0K 0K 166960K 3 0
VM swap 8 62K 64K 166960K 10 0
UVM amap 94 4K 5K 166960K 2132 0
UVM aobj 3 2K 2K 166960K 3 0
pinsyscall 21 42K 48K 166960K 849 0
memdesc 1 4K 4K 166960K 1 0
crypto data 1 1K 1K 166960K 1 0
NDP 3 0K 0K 166960K 3 0
temp 1 6788K 6852K 166960K 3236 0
kqueue 12 18K 18K 166960K 25 0
SYN cache 2 16K 16K 166960K 2 0
ddb> show all pools
Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle
rtpcb 120 21 0 18 1 0 1 1 0 8 0
rtentry 112 23 0 1 1 0 1 1 0 8 0
unpcb 144 36 0 21 1 0 1 1 0 8 0
syncache 336 5 0 5 1 0 1 1 0 8 1
tcpqe 32 18 0 18 1 0 1 1 0 8 1
tcpcb 808 8 0 5 1 0 1 1 0 8 0
arp 88 2 0 0 1 0 1 1 0 8 0
inpcb 360 26 0 20 1 0 1 1 0 8 0
art_heap8 4096 1 0 0 1 0 1 1 0 8 0
art_heap4 256 96 0 0 6 0 6 6 0 8 0
art_table 32 97 0 0 1 0 1 1 0 8 0
art_node 16 22 0 2 1 0 1 1 0 8 0
dirhash 1024 17 0 0 3 0 3 3 0 8 0
dino2pl 256 1503 0 40 92 0 92 92 0 8 0
ffsino 240 1503 0 40 87 0 87 87 0 8 0
nchpl 144 1687 0 47 61 0 61 61 0 8 0
uvmvnodes 80 1512 0 0 31 0 31 31 0 8 0
vnodes 216 1512 0 0 84 0 84 84 0 8 0
namei 1024 4358 0 4358 1 0 1 1 0 8 1
kstatmem 264 6 0 0 1 0 1 1 0 8 0
scxspl 216 5178 0 5178 2 0 2 2 1 8 2
plimitpl 152 16 0 10 1 0 1 1 0 8 0
sigapl 424 311 0 282 4 0 4 4 0 8 0
knotepl 120 7366 0 7336 2 0 2 2 0 8 1
kqueuepl 184 21 0 13 1 0 1 1 0 8 0
pipepl 288 88 0 85 1 0 1 1 0 8 0
fdescpl 432 295 0 282 2 0 2 2 0 8 0
filepl 120 1139 0 1084 2 0 2 2 0 8 0
lockfpl 104 6 0 4 1 0 1 1 0 8 0
lockfspl 48 4 0 2 1 0 1 1 0 8 0
sessionpl 144 17 0 9 1 0 1 1 0 8 0
pgrppl 48 17 0 9 1 0 1 1 0 8 0
ucredpl 104 66 0 56 1 0 1 1 0 8 0
zombiepl 144 282 0 282 1 0 1 1 0 8 1
processpl 1072 311 0 282 3 0 3 3 0 8 0
procpl 680 311 0 282 3 0 3 3 0 8 0
sockpl 488 83 0 59 4 0 4 4 0 8 0
mcl8k 8192 4 0 4 1 0 1 1 0 8 1
mcl4k 4096 10 0 10 1 0 1 1 0 8 1
mcl2k 2048 12161 0 12121 26 12 14 26 0 8 8
mtagpl 96 4 0 4 1 0 1 1 0 8 1
mbufpl 256 20074 0 20025 15 4 11 15 0 8 7
bufpl 280 2474 0 89 171 0 171 171 0 8 0
anonpl 24 134257 0 132462 23 0 23 23 0 188 12
amapchunkpl 152 7439 0 7308 7 0 7 7 0 158 1
amappl16 200 3216 0 3215 4 0 4 4 0 8 3
amappl15 192 8 0 8 1 0 1 1 0 8 1
amappl14 184 97 0 88 1 0 1 1 0 8 0
amappl13 176 12 0 12 1 0 1 1 0 8 1
amappl12 168 794 0 782 1 0 1 1 0 8 0
amappl11 160 52 0 42 1 0 1 1 0 8 0
amappl10 152 16 0 16 1 0 1 1 0 8 1
amappl9 144 95 0 95 1 0 1 1 0 8 1
amappl8 136 21 0 19 1 0 1 1 0 8 0
amappl7 128 14 0 12 1 0 1 1 0 8 0
amappl6 120 162 0 151 1 0 1 1 0 8 0
amappl5 112 115 0 103 1 0 1 1 0 8 0
amappl4 104 389 0 362 1 0 1 1 0 8 0
amappl3 96 2484 0 2458 1 0 1 1 0 8 0
amappl2 88 575 0 525 2 0 2 2 0 8 0
amappl1 80 8800 0 8396 10 0 10 10 0 8 0
amappl 88 1828 0 1780 2 0 2 2 0 92 0
dma4096 4096 1 0 1 1 0 1 1 0 8 1
dma1024 1024 1 0 0 1 0 1 1 0 8 0
dma256 256 6 0 6 1 0 1 1 0 8 1
dma128 128 253 0 253 1 0 1 1 0 8 1
dma64 64 6 0 6 1 0 1 1 0 8 1
dma32 32 7 0 7 1 0 1 1 0 8 1
dma16 16 18 0 17 1 0 1 1 0 8 0
aobjpl 72 2 0 0 1 0 1 1 0 8 0
uaddrrnd 24 295 0 282 1 0 1 1 0 8 0
uaddrbest 32 2 0 0 1 0 1 1 0 8 0
uaddr 24 295 0 282 1 0 1 1 0 8 0
vmmpekpl 168 5627 0 5610 1 0 1 1 0 8 0
vmmpepl 168 32251 0 31353 46 0 46 46 0 357 1
vmsppl 352 294 0 282 2 0 2 2 0 8 0
rwobjpl 24 16955 0 14842 14 0 14 14 0 8 0
pdppl 4096 596 0 564 48 14 34 40 0 8 2
pvpl 32 226188 0 222145 50 0 50 50 0 265 14
pmappl 216 294 0 282 1 0 1 1 0 8 0
extentpl 40 56 0 38 1 0 1 1 0 8 0
phpool 112 290 0 30 8 0 8 8 0 8 0
ddb> machine ddbcpu 0
No such command
ddb> trace
db_enter() at db_enter+0x1c sys/arch/amd64/amd64/db_interface.c:437
panic(ffffffff82865988) at panic+0x165 sys/kern/subr_prf.c:198
rw_assert_wrlock(fffffd806ed125c8) at rw_assert_wrlock+0xb7 sys/kern/kern_rwlock.c:387
filt_soread(fffffd807474bbb8,0) at filt_soread+0x123 sys/kern/uipc_socket.c:2237
knote_locked(fffffd806ed126e0,0) at knote_locked+0x78 filter_event sys/kern/kern_event.c:778 [inline]
knote_locked(fffffd806ed126e0,0) at knote_locked+0x78 sys/kern/kern_event.c:1845
sowakeup(fffffd806ed125c0,fffffd806ed12670) at sowakeup+0x82 sys/kern/uipc_socket2.c:611
sorwakeup(fffffd806ed125c0) at sorwakeup+0xfb sys/kern/uipc_socket.c:1791
uipc_dgram_send(fffffd80760e8b88,fffffd806d281e00,fffffd806d281300,0) at uipc_dgram_send+0x1b7 sys/kern/uipc_usrreq.c:585
sosend(fffffd80760e8b88,fffffd806d281300,ffff80002a61ce48,0,0,0) at sosend+0x663
sendit(ffff80002a5d72a0,5,ffff80002a61cfc0,0,ffff80002a61d070) at sendit+0x555 sys/kern/uipc_syscalls.c:786
sys_sendmsg(ffff80002a5d72a0,ffff80002a61d120,ffff80002a61d070) at sys_sendmsg+0x19e sys/kern/uipc_syscalls.c:604
syscall(ffff80002a61d120) at syscall+0x538 sys/arch/amd64/amd64/trap.c:577
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0x70c00c0ee8b0, count: -13
ddb> machine ddbcpu 1
No such command
ddb> trace
db_enter() at db_enter+0x1c sys/arch/amd64/amd64/db_interface.c:437
panic(ffffffff82865988) at panic+0x165 sys/kern/subr_prf.c:198
rw_assert_wrlock(fffffd806ed125c8) at rw_assert_wrlock+0xb7 sys/kern/kern_rwlock.c:387
filt_soread(fffffd807474bbb8,0) at filt_soread+0x123 sys/kern/uipc_socket.c:2237
knote_locked(fffffd806ed126e0,0) at knote_locked+0x78 filter_event sys/kern/kern_event.c:778 [inline]
knote_locked(fffffd806ed126e0,0) at knote_locked+0x78 sys/kern/kern_event.c:1845
sowakeup(fffffd806ed125c0,fffffd806ed12670) at sowakeup+0x82 sys/kern/uipc_socket2.c:611
sorwakeup(fffffd806ed125c0) at sorwakeup+0xfb sys/kern/uipc_socket.c:1791
uipc_dgram_send(fffffd80760e8b88,fffffd806d281e00,fffffd806d281300,0) at uipc_dgram_send+0x1b7 sys/kern/uipc_usrreq.c:585
sosend(fffffd80760e8b88,fffffd806d281300,ffff80002a61ce48,0,0,0) at sosend+0x663
sendit(ffff80002a5d72a0,5,ffff80002a61cfc0,0,ffff80002a61d070) at sendit+0x555 sys/kern/uipc_syscalls.c:786
sys_sendmsg(ffff80002a5d72a0,ffff80002a61d120,ffff80002a61d070) at sys_sendmsg+0x19e sys/kern/uipc_syscalls.c:604
syscall(ffff80002a61d120) at syscall+0x538 sys/arch/amd64/amd64/trap.c:577
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0x70c00c0ee8b0, count: -13
ddb>


---
If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.
Reply all
Reply to author
Forward
0 new messages