panic: acquiring blockable sleep lock with spinlock or critical section held (rwlock) solock

3 views
Skip to first unread message

syzbot

unread,
Apr 26, 2021, 2:41:20 AM4/26/21
to syzkaller-o...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: b0cb8ce4 Asus USB-N10 should work with urtwn(4). Patch by ..
git tree: openbsd
console output: https://syzkaller.appspot.com/x/log.txt?x=10612ccdd00000
kernel config: https://syzkaller.appspot.com/x/.config?x=bf87b6915a88cd0d
dashboard link: https://syzkaller.appspot.com/bug?extid=eb593ee96235d71ade89

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

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

login: panic: acquiring blockable sleep lock with spinlock or critical section held (rwlock) solock
Stopped at db_enter+0x18: addq $0x8,%rsp
TID PID UID PRFLAGS PFLAGS CPU COMMAND
db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398
panic(ffffffff823e90cf) at panic+0x15e sys/kern/subr_prf.c:218
witness_checkorder(fffffd806daa87a8,9,0) at witness_checkorder+0x1188 sys/kern/subr_witness.c:833
rw_enter_write(fffffd806daa8798) at rw_enter_write+0x5b sys/kern/kern_rwlock.c:128
solock(fffffd806daa8790) at solock+0x97 sys/kern/uipc_socket2.c:299
rtm_senddesync_timer(fffffd806daa8790) at rtm_senddesync_timer+0x1a sys/net/rtsock.c:454
timeout_run(fffffd8074008810) at timeout_run+0xcc sys/kern/kern_timeout.c:674
softclock_process_tick_timeout(fffffd8074008810,0) at softclock_process_tick_timeout+0x196 sys/kern/kern_timeout.c:721
softclock(0) at softclock+0x11a sys/kern/kern_timeout.c:752
softintr_dispatch(0) at softintr_dispatch+0xfb sys/arch/amd64/amd64/softintr.c:90
Xsoftclock() at Xsoftclock+0x1f
acpicpu_idle() at acpicpu_idle+0x2eb sys/dev/acpi/acpicpu.c:1206
sched_idle(ffffffff8272eff0) at sched_idle+0x417 sys/kern/kern_sched.c:178
end trace frame: 0x0, 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{0}>
ddb{0}> set $lines = 0
ddb{0}> set $maxwidth = 0
ddb{0}> show panic
acquiring blockable sleep lock with spinlock or critical section held (rwlock) solock
ddb{0}> trace
db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398
panic(ffffffff823e90cf) at panic+0x15e sys/kern/subr_prf.c:218
witness_checkorder(fffffd806daa87a8,9,0) at witness_checkorder+0x1188 sys/kern/subr_witness.c:833
rw_enter_write(fffffd806daa8798) at rw_enter_write+0x5b sys/kern/kern_rwlock.c:128
solock(fffffd806daa8790) at solock+0x97 sys/kern/uipc_socket2.c:299
rtm_senddesync_timer(fffffd806daa8790) at rtm_senddesync_timer+0x1a sys/net/rtsock.c:454
timeout_run(fffffd8074008810) at timeout_run+0xcc sys/kern/kern_timeout.c:674
softclock_process_tick_timeout(fffffd8074008810,0) at softclock_process_tick_timeout+0x196 sys/kern/kern_timeout.c:721
softclock(0) at softclock+0x11a sys/kern/kern_timeout.c:752
softintr_dispatch(0) at softintr_dispatch+0xfb sys/arch/amd64/amd64/softintr.c:90
Xsoftclock() at Xsoftclock+0x1f
acpicpu_idle() at acpicpu_idle+0x2eb sys/dev/acpi/acpicpu.c:1206
sched_idle(ffffffff8272eff0) at sched_idle+0x417 sys/kern/kern_sched.c:178
end trace frame: 0x0, count: -13
ddb{0}> show registers
rdi 0
rsi 0x1
rbp 0xffff80002116f480
rbx 0xffff80002116f490
rdx 0x8b
rcx 0x2
rax 0x1
r8 0xffffffff814588c5 kprintf+0x145
r9 0x1
r10 0x8419c6e0a8aafbb3
r11 0x89c57f072069aa71
r12 0x3000000008
r13 0xffff80002116f530
r14 0x100
r15 0x1
rip 0xffffffff814ec468 db_enter+0x18
cs 0x8
rflags 0x246
rsp 0xffff80002116f470
ss 0x10
db_enter+0x18: addq $0x8,%rsp
ddb{0}> show proc
PROC (idle0) pid=234235 stat=onproc
flags process=14000<NOZOMBIE,SYSTEM> proc=40000200<SYSTEM,CPUPEG>
pri=0, usrpri=50, nice=20
forw=0x1034cbab1ede83b8, list=0xffff800021169a40,0xffff800021169510
process=0xffff8000ffffee68 user=0xffff80002116a000, vmspace=0xffffffff827d9248
estcpu=0, cpticks=8669, pctcpu=0.0
user=0, sys=0, intr=0
ddb{0}> ps
PID TID PPID UID S FLAGS WAIT COMMAND
19747 171517 16883 32767 3 0x90 nanoslp syz-executor.0
19747 72118 16883 32767 3 0x4000090 kqread syz-executor.0
19747 930 16883 32767 3 0x4000090 fsleep syz-executor.0
4559 193882 82059 32767 3 0x90 piperd syz-executor.1
82059 382130 4948 0 3 0x82 wait syz-executor.1
16883 178379 16228 32767 3 0x90 nanoslp syz-executor.0
16228 83102 4948 0 3 0x82 wait syz-executor.0
4948 252150 17354 0 3 0x82 thrsleep syz-fuzzer
4948 337314 17354 0 3 0x4000082 nanoslp syz-fuzzer
4948 374769 17354 0 3 0x4000082 thrsleep syz-fuzzer
4948 193757 17354 0 3 0x4000082 thrsleep syz-fuzzer
4948 43742 17354 0 3 0x4000082 thrsleep syz-fuzzer
4948 52284 17354 0 3 0x4000082 thrsleep syz-fuzzer
4948 187559 17354 0 3 0x4000082 thrsleep syz-fuzzer
4948 109669 17354 0 3 0x4000082 kqread syz-fuzzer
17354 56894 85903 0 3 0x10008a sigsusp ksh
85903 328915 55217 0 3 0x92 select sshd
65836 492423 1 0 3 0x100083 ttyin getty
55217 214370 1 0 3 0x80 select sshd
34988 10400 49756 73 3 0x100090 kqread syslogd
49756 302578 1 0 3 0x100082 netio syslogd
97371 443969 1 77 3 0x100090 poll dhclient
45596 82065 1 0 3 0x80 poll dhclient
2245 218126 0 0 3 0x14200 bored smr
63462 160351 0 0 3 0x14200 pgzero zerothread
30953 52838 0 0 3 0x14200 aiodoned aiodoned
95778 222888 0 0 3 0x14200 syncer update
95834 272931 0 0 3 0x14200 cleaner cleaner
83938 24065 0 0 3 0x14200 reaper reaper
37085 156735 0 0 3 0x14200 pgdaemon pagedaemon
55142 345126 0 0 3 0x14200 bored crynlk
22449 447604 0 0 3 0x14200 bored crypto
95652 95380 0 0 3 0x14200 bored viomb
95365 315544 0 0 3 0x40014200 acpi0 acpi0
46855 55128 0 0 7 0x40014200 idle1
41785 24642 0 0 3 0x14200 bored softnet
81736 153536 0 0 3 0x14200 bored systqmp
31125 111185 0 0 3 0x14200 bored systq
67871 448225 0 0 3 0x40014200 bored softclock
*18999 234235 0 0 7 0x40014200 idle0
1 97222 0 0 3 0x82 wait init
0 0 -1 0 3 0x10200 scheduler swapper
ddb{0}> show all locks
CPU 0:
shared mutex timeout r = 0 (0xffffffff826d40e8)
#0 witness_lock+0x4b0 stacktrace_save sys/sys/stacktrace.h:36 [inline]
#0 witness_lock+0x4b0 sys/kern/subr_witness.c:1182
#1 timeout_run+0xb7 sys/kern/kern_timeout.c:670
#2 softclock_process_tick_timeout+0x196 sys/kern/kern_timeout.c:721
#3 softclock+0x11a sys/kern/kern_timeout.c:752
#4 softintr_dispatch+0xfb sys/arch/amd64/amd64/softintr.c:90
#5 Xsoftclock+0x1f
#6 acpicpu_idle+0x2eb sys/dev/acpi/acpicpu.c:1206
#7 sched_idle+0x417 sys/kern/kern_sched.c:178
#8 proc_trampoline+0x1c
Process 18999 (idle0) thread 0xffff8000211697a0 (234235)
exclusive kernel_lock &kernel_lock r = 0 (0xffffffff828ab108)
#0 witness_lock+0x4b0 stacktrace_save sys/sys/stacktrace.h:36 [inline]
#0 witness_lock+0x4b0 sys/kern/subr_witness.c:1182
#1 softintr_dispatch+0x4e sys/arch/amd64/amd64/softintr.c:90
#2 Xsoftclock+0x1f
#3 acpicpu_idle+0x2eb sys/dev/acpi/acpicpu.c:1206
#4 sched_idle+0x417 sys/kern/kern_sched.c:178
#5 proc_trampoline+0x1c
shared mutex timeout r = 0 (0xffffffff826d40e8)
#0 witness_lock+0x4b0 stacktrace_save sys/sys/stacktrace.h:36 [inline]
#0 witness_lock+0x4b0 sys/kern/subr_witness.c:1182
#1 timeout_run+0xb7 sys/kern/kern_timeout.c:670
#2 softclock_process_tick_timeout+0x196 sys/kern/kern_timeout.c:721
#3 softclock+0x11a sys/kern/kern_timeout.c:752
#4 softintr_dispatch+0xfb sys/arch/amd64/amd64/softintr.c:90
#5 Xsoftclock+0x1f
#6 acpicpu_idle+0x2eb sys/dev/acpi/acpicpu.c:1206
#7 sched_idle+0x417 sys/kern/kern_sched.c:178
#8 proc_trampoline+0x1c
ddb{0}> show malloc
Type InUse MemUse HighUse Limit Requests Type Lim
devbuf 9477 6349K 6349K 78643K 10567 0
pcb 13 8K 8K 78643K 13 0
rtable 105 3K 3K 78643K 333 0
ifaddr 39 10K 10K 78643K 39 0
counters 44 34K 34K 78643K 44 0
ioctlops 0 0K 2K 78643K 19 0
iov 0 0K 12K 78643K 2 0
mount 1 1K 1K 78643K 1 0
log 0 0K 0K 78643K 1 0
vnodes 1216 76K 76K 78643K 1221 0
UFS quota 1 32K 32K 78643K 1 0
UFS mount 5 36K 36K 78643K 5 0
shm 2 1K 1K 78643K 2 0
VM map 2 1K 1K 78643K 2 0
sem 12 1K 1K 78643K 16 0
dirhash 12 2K 2K 78643K 12 0
ACPI 1697 195K 286K 78643K 12598 0
file desc 7 21K 33K 78643K 320 0
sigio 0 0K 0K 78643K 2 0
proc 48 50K 70K 78643K 355 0
subproc 34 2K 2K 78643K 34 0
NFS srvsock 1 0K 0K 78643K 1 0
NFS daemon 1 16K 16K 78643K 1 0
in_multi 33 2K 2K 78643K 33 0
ether_multi 1 0K 0K 78643K 1 0
ISOFS mount 1 32K 32K 78643K 1 0
MSDOSFS mount 1 16K 16K 78643K 1 0
ttys 31 148K 148K 78643K 31 0
exec 0 0K 2K 78643K 317 0
pagedep 1 8K 8K 78643K 1 0
inodedep 1 32K 32K 78643K 1 0
newblk 1 0K 0K 78643K 1 0
VM swap 7 26K 26K 78643K 7 0
UVM amap 609 63K 63K 78643K 5480 0
UVM aobj 3 2K 2K 78643K 3 0
memdesc 1 4K 4K 78643K 1 0
crypto data 1 1K 1K 78643K 1 0
NDP 5 0K 0K 78643K 9 0
temp 77 3971K 4035K 78643K 2377 0
kqueue 3 4K 4K 78643K 3 0
SYN cache 2 16K 16K 78643K 2 0
ddb{0}> show all pools
Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle
plcache 128 20 0 0 1 0 1 1 0 8 0
rtpcb 120 129 0 125 1 0 1 1 0 8 0
rtentry 112 45 0 1 2 0 2 2 0 8 0
unpcb 120 67 0 59 1 0 1 1 0 8 0
syncache 296 4 0 4 1 1 0 1 0 8 0
tcpqe 32 4369 0 4369 1 1 0 1 0 8 0
tcpcb 736 14 0 10 1 0 1 1 0 8 0
arp 64 6 0 0 1 0 1 1 0 8 0
inpcb 304 35 0 29 1 0 1 1 0 8 0
nd6 48 6 0 0 1 0 1 1 0 8 0
kcovpl 48 2 0 0 1 0 1 1 0 8 0
art_heap8 4096 1 0 0 1 0 1 1 0 8 0
art_heap4 256 188 0 0 12 0 12 12 0 8 0
art_table 32 189 0 0 2 0 2 2 0 8 0
art_node 16 44 0 4 1 0 1 1 0 8 0
sysvmsgpl 40 8 0 8 1 1 0 1 0 8 0
semupl 112 3 0 3 1 1 0 1 0 8 0
semapl 112 10 0 0 1 0 1 1 0 8 0
dirhash 1024 17 0 0 3 0 3 3 0 8 0
dino2pl 256 1703 0 306 88 0 88 88 0 8 0
ffsino 272 1703 0 306 94 0 94 94 0 8 0
nchpl 144 2223 0 623 60 0 60 60 0 8 0
uvmvnodes 72 1746 0 0 32 0 32 32 0 8 0
vnodes 224 1746 0 0 103 0 103 103 0 8 0
namei 1024 5240 0 5240 2 1 1 1 0 8 1
percpumem 16 33 0 0 1 0 1 1 0 8 0
scxspl 216 6562 0 6562 11 10 1 8 0 8 1
plimitpl 152 16 0 7 1 0 1 1 0 8 0
sigapl 424 507 0 475 4 0 4 4 0 8 0
futexpl 56 2431 0 2430 1 0 1 1 0 8 0
knotepl 112 62 0 42 1 0 1 1 0 8 0
kqueuepl 168 462 0 457 1 0 1 1 0 8 0
pipepl 336 73 0 62 3 1 2 2 0 8 1
fdescpl 496 491 0 475 3 0 3 3 0 8 0
filepl 152 2001 0 1900 6 1 5 5 0 8 1
lockfpl 104 5 0 4 1 0 1 1 0 8 0
lockfspl 48 3 0 2 1 0 1 1 0 8 0
sessionpl 144 17 0 7 1 0 1 1 0 8 0
pgrppl 48 17 0 7 1 0 1 1 0 8 0
ucredpl 96 69 0 60 1 0 1 1 0 8 0
zombiepl 144 475 0 475 2 1 1 1 0 8 1
processpl 1080 507 0 475 3 0 3 3 0 8 0
procpl 672 914 0 873 5 1 4 4 0 8 0
sockpl 480 235 0 217 4 0 4 4 0 8 1
mcl12k 12288 7 0 0 1 0 1 1 0 8 0
mcl8k 8192 7 0 0 1 0 1 1 0 8 0
mcl4k 4096 8 0 0 1 0 1 1 0 8 0
mcl2k2 2112 1 0 0 1 0 1 1 0 8 0
mcl2k 2048 296 0 0 36 0 36 36 0 8 0
mtagpl 96 1 0 0 1 0 1 1 0 8 0
mbufpl 256 462 0 0 26 1 25 25 0 8 0
bufpl 280 3563 0 145 245 0 245 245 0 8 0
anonpl 24 226812 0 127193 613 1 612 612 0 186 0
amapchunkpl 152 16041 0 12050 156 0 156 156 0 158 0
amappl16 200 2997 0 499 133 1 132 132 0 8 0
amappl15 192 52 0 47 1 0 1 1 0 8 0
amappl14 184 141 0 139 1 0 1 1 0 8 0
amappl13 176 25 0 23 1 0 1 1 0 8 0
amappl12 168 36 0 28 1 0 1 1 0 8 0
amappl11 160 217 0 205 1 0 1 1 0 8 0
amappl10 152 14 0 9 1 0 1 1 0 8 0
amappl9 144 289 0 287 1 0 1 1 0 8 0
amappl8 136 292 0 254 2 0 2 2 0 8 0
amappl7 128 54 0 42 1 0 1 1 0 8 0
amappl6 120 96 0 81 1 0 1 1 0 8 0
amappl5 112 273 0 263 1 0 1 1 0 8 0
amappl4 104 741 0 710 1 0 1 1 0 8 0
amappl3 96 78 0 72 1 0 1 1 0 8 0
amappl2 88 519 0 470 3 1 2 2 0 8 0
amappl1 80 11331 0 10916 12 2 10 12 0 8 0
amappl 88 5184 0 4630 13 0 13 13 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 64 2 0 0 1 0 1 1 0 8 0
uaddrrnd 24 491 0 475 1 0 1 1 0 8 0
uaddrbest 32 2 0 0 1 0 1 1 0 8 0
uaddr 24 491 0 475 1 0 1 1 0 8 0
vmmpekpl 168 7000 0 6977 2 0 2 2 0 8 0
vmmpepl 168 63124 0 58877 313 10 303 311 0 357 113
vmsppl 368 490 0 475 2 0 2 2 0 8 0
rwobjpl 56 14743 0 11165 52 1 51 52 0 8 0
pdppl 4096 989 0 950 64 23 41 45 0 8 2
pvpl 32 415973 0 312707 851 5 846 851 0 265 0
pmappl 232 490 0 475 2 1 1 2 0 8 0
extentpl 40 58 0 40 1 0 1 1 0 8 0
phpool 112 337 0 28 9 0 9 9 0 8 0
ddb{0}> machine ddbcpu 0
Invalid cpu 0
ddb{0}> trace
db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398
panic(ffffffff823e90cf) at panic+0x15e sys/kern/subr_prf.c:218
witness_checkorder(fffffd806daa87a8,9,0) at witness_checkorder+0x1188 sys/kern/subr_witness.c:833
rw_enter_write(fffffd806daa8798) at rw_enter_write+0x5b sys/kern/kern_rwlock.c:128
solock(fffffd806daa8790) at solock+0x97 sys/kern/uipc_socket2.c:299
rtm_senddesync_timer(fffffd806daa8790) at rtm_senddesync_timer+0x1a sys/net/rtsock.c:454
timeout_run(fffffd8074008810) at timeout_run+0xcc sys/kern/kern_timeout.c:674
softclock_process_tick_timeout(fffffd8074008810,0) at softclock_process_tick_timeout+0x196 sys/kern/kern_timeout.c:721
softclock(0) at softclock+0x11a sys/kern/kern_timeout.c:752
softintr_dispatch(0) at softintr_dispatch+0xfb sys/arch/amd64/amd64/softintr.c:90
Xsoftclock() at Xsoftclock+0x1f
acpicpu_idle() at acpicpu_idle+0x2eb sys/dev/acpi/acpicpu.c:1206
sched_idle(ffffffff8272eff0) at sched_idle+0x417 sys/kern/kern_sched.c:178
end trace frame: 0x0, count: -13
ddb{0}> machine ddbcpu 1
Stopped at x86_ipi_db+0x1a: addq $0x8,%rsp
x86_ipi_db(ffff800020d58ff0) at x86_ipi_db+0x1a sys/arch/amd64/amd64/db_interface.c:352
x86_ipi_handler() at x86_ipi_handler+0xb7 sys/arch/amd64/amd64/ipi.c:106
Xresume_lapic_ipi() at Xresume_lapic_ipi+0x23
acpicpu_idle() at acpicpu_idle+0x2eb sys/dev/acpi/acpicpu.c:1206
sched_idle(ffff800020d58ff0) at sched_idle+0x417 sys/kern/kern_sched.c:178
end trace frame: 0x0, count: 10
ddb{1}> trace
x86_ipi_db(ffff800020d58ff0) at x86_ipi_db+0x1a sys/arch/amd64/amd64/db_interface.c:352
x86_ipi_handler() at x86_ipi_handler+0xb7 sys/arch/amd64/amd64/ipi.c:106
Xresume_lapic_ipi() at Xresume_lapic_ipi+0x23
acpicpu_idle() at acpicpu_idle+0x2eb sys/dev/acpi/acpicpu.c:1206
sched_idle(ffff800020d58ff0) at sched_idle+0x417 sys/kern/kern_sched.c:178
end trace frame: 0x0, count: -5


---
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.

syzbot

unread,
Apr 26, 2021, 2:58:15 AM4/26/21
to syzkaller-o...@googlegroups.com
syzbot has found a reproducer for the following issue on:

HEAD commit: b0cb8ce4 Asus USB-N10 should work with urtwn(4). Patch by ..
git tree: openbsd
console output: https://syzkaller.appspot.com/x/log.txt?x=17f8f225d00000
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=169204e1d00000

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

login: panic: acquiring blockable sleep lock with spinlock or critical section held (rwlock) solock
Stopped at db_enter+0x18: addq $0x8,%rsp
TID PID UID PRFLAGS PFLAGS CPU COMMAND
db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398
panic(ffffffff823e90cf) at panic+0x15e sys/kern/subr_prf.c:218
witness_checkorder(fffffd807e9a8990,9,0) at witness_checkorder+0x1188 sys/kern/subr_witness.c:833
rw_enter_write(fffffd807e9a8980) at rw_enter_write+0x5b sys/kern/kern_rwlock.c:128
solock(fffffd807e9a8978) at solock+0x97 sys/kern/uipc_socket2.c:299
rtm_senddesync_timer(fffffd807e9a8978) at rtm_senddesync_timer+0x1a sys/net/rtsock.c:454
timeout_run(fffffd806f750c48) at timeout_run+0xcc sys/kern/kern_timeout.c:674
softclock_process_tick_timeout(fffffd806f750c48,0) at softclock_process_tick_timeout+0x196 sys/kern/kern_timeout.c:721
softclock(0) at softclock+0x11a sys/kern/kern_timeout.c:752
softintr_dispatch(0) at softintr_dispatch+0xfb sys/arch/amd64/amd64/softintr.c:90
Xsoftclock() at Xsoftclock+0x1f
acpicpu_idle() at acpicpu_idle+0x2eb sys/dev/acpi/acpicpu.c:1206
sched_idle(ffffffff8272eff0) at sched_idle+0x417 sys/kern/kern_sched.c:178
end trace frame: 0x0, 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{0}>
ddb{0}> set $lines = 0
ddb{0}> set $maxwidth = 0
ddb{0}> show panic
acquiring blockable sleep lock with spinlock or critical section held (rwlock) solock
ddb{0}> trace
db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398
panic(ffffffff823e90cf) at panic+0x15e sys/kern/subr_prf.c:218
witness_checkorder(fffffd807e9a8990,9,0) at witness_checkorder+0x1188 sys/kern/subr_witness.c:833
rw_enter_write(fffffd807e9a8980) at rw_enter_write+0x5b sys/kern/kern_rwlock.c:128
solock(fffffd807e9a8978) at solock+0x97 sys/kern/uipc_socket2.c:299
rtm_senddesync_timer(fffffd807e9a8978) at rtm_senddesync_timer+0x1a sys/net/rtsock.c:454
timeout_run(fffffd806f750c48) at timeout_run+0xcc sys/kern/kern_timeout.c:674
softclock_process_tick_timeout(fffffd806f750c48,0) at softclock_process_tick_timeout+0x196 sys/kern/kern_timeout.c:721
softclock(0) at softclock+0x11a sys/kern/kern_timeout.c:752
softintr_dispatch(0) at softintr_dispatch+0xfb sys/arch/amd64/amd64/softintr.c:90
Xsoftclock() at Xsoftclock+0x1f
acpicpu_idle() at acpicpu_idle+0x2eb sys/dev/acpi/acpicpu.c:1206
sched_idle(ffffffff8272eff0) at sched_idle+0x417 sys/kern/kern_sched.c:178
end trace frame: 0x0, count: -13
ddb{0}> show registers
rdi 0
rsi 0x1
rbp 0xffff80002116f0d0
rbx 0xffff80002116f0e0
rdx 0x8b
rcx 0x2
rax 0x1
r8 0xffffffff814588c5 kprintf+0x145
r9 0x1
r10 0x827ed8a4acb2dd75
r11 0x6c0f8111a6c0c5f0
r12 0x3000000008
r13 0xffff80002116f180
r14 0x100
r15 0x1
rip 0xffffffff814ec468 db_enter+0x18
cs 0x8
rflags 0x246
rsp 0xffff80002116f0c0
ss 0x10
db_enter+0x18: addq $0x8,%rsp
ddb{0}> show proc
PROC (idle0) pid=357964 stat=onproc
flags process=14000<NOZOMBIE,SYSTEM> proc=40000200<SYSTEM,CPUPEG>
pri=0, usrpri=50, nice=20
forw=0x7aa058a7ad82aaae, list=0xffff800021169a40,0xffff800021169270
process=0xffff8000fffff6d8 user=0xffff80002116a000, vmspace=0xffffffff827d9248
estcpu=0, cpticks=3202, pctcpu=0.0
user=0, sys=0, intr=0
ddb{0}> ps
PID TID PPID UID S FLAGS WAIT COMMAND
59623 424875 93272 0 3 0x80 kqread syz-executor.0
93272 310400 54440 0 3 0x82 nanoslp syz-executor.0
54440 73167 3425 0 3 0x82 thrsleep syz-execprog
54440 378531 3425 0 3 0x4000082 thrsleep syz-execprog
54440 428171 3425 0 3 0x4000082 thrsleep syz-execprog
54440 61151 3425 0 3 0x4000082 thrsleep syz-execprog
54440 100608 3425 0 3 0x4000082 thrsleep syz-execprog
54440 305413 3425 0 3 0x4000082 thrsleep syz-execprog
54440 74495 3425 0 3 0x4000082 kqread syz-execprog
3425 422625 22656 0 3 0x10008a sigsusp ksh
22656 249584 39010 0 3 0x92 select sshd
87306 280085 1 0 3 0x100083 ttyin getty
39010 337932 1 0 3 0x80 select sshd
4335 265435 31546 73 3 0x100090 kqread syslogd
31546 443649 1 0 3 0x100082 netio syslogd
10882 301657 1 77 3 0x100090 poll dhclient
89434 10182 1 0 3 0x80 poll dhclient
91793 212164 0 0 3 0x14200 bored smr
20813 330654 0 0 3 0x14200 pgzero zerothread
82488 129228 0 0 3 0x14200 aiodoned aiodoned
40056 476278 0 0 3 0x14200 syncer update
23229 168909 0 0 3 0x14200 cleaner cleaner
5111 60059 0 0 3 0x14200 reaper reaper
50577 255691 0 0 3 0x14200 pgdaemon pagedaemon
12875 131844 0 0 3 0x14200 bored crynlk
44812 264575 0 0 3 0x14200 bored crypto
22487 152222 0 0 3 0x14200 bored viomb
65921 245097 0 0 3 0x40014200 acpi0 acpi0
43615 187412 0 0 7 0x40014200 idle1
35147 159480 0 0 3 0x14200 bored softnet
59341 367674 0 0 3 0x14200 bored systqmp
35344 133154 0 0 3 0x14200 bored systq
57493 123667 0 0 3 0x40014200 bored softclock
*86191 357964 0 0 7 0x40014200 idle0
1 44739 0 0 3 0x82 wait init
0 0 -1 0 3 0x10200 scheduler swapper
ddb{0}> show all locks
CPU 0:
shared mutex timeout r = 0 (0xffffffff826d40e8)
#0 witness_lock+0x4b0 stacktrace_save sys/sys/stacktrace.h:36 [inline]
#0 witness_lock+0x4b0 sys/kern/subr_witness.c:1182
#1 timeout_run+0xb7 sys/kern/kern_timeout.c:670
#2 softclock_process_tick_timeout+0x196 sys/kern/kern_timeout.c:721
#3 softclock+0x11a sys/kern/kern_timeout.c:752
#4 softintr_dispatch+0xfb sys/arch/amd64/amd64/softintr.c:90
#5 Xsoftclock+0x1f
#6 acpicpu_idle+0x2eb sys/dev/acpi/acpicpu.c:1206
#7 sched_idle+0x417 sys/kern/kern_sched.c:178
#8 proc_trampoline+0x1c
Process 86191 (idle0) thread 0xffff800021169500 (357964)
exclusive kernel_lock &kernel_lock r = 0 (0xffffffff828ab108)
#0 witness_lock+0x4b0 stacktrace_save sys/sys/stacktrace.h:36 [inline]
#0 witness_lock+0x4b0 sys/kern/subr_witness.c:1182
#1 softintr_dispatch+0x4e sys/arch/amd64/amd64/softintr.c:90
#2 Xsoftclock+0x1f
#3 acpicpu_idle+0x2eb sys/dev/acpi/acpicpu.c:1206
#4 sched_idle+0x417 sys/kern/kern_sched.c:178
#5 proc_trampoline+0x1c
shared mutex timeout r = 0 (0xffffffff826d40e8)
#0 witness_lock+0x4b0 stacktrace_save sys/sys/stacktrace.h:36 [inline]
#0 witness_lock+0x4b0 sys/kern/subr_witness.c:1182
#1 timeout_run+0xb7 sys/kern/kern_timeout.c:670
#2 softclock_process_tick_timeout+0x196 sys/kern/kern_timeout.c:721
#3 softclock+0x11a sys/kern/kern_timeout.c:752
#4 softintr_dispatch+0xfb sys/arch/amd64/amd64/softintr.c:90
#5 Xsoftclock+0x1f
#6 acpicpu_idle+0x2eb sys/dev/acpi/acpicpu.c:1206
#7 sched_idle+0x417 sys/kern/kern_sched.c:178
#8 proc_trampoline+0x1c
ddb{0}> show malloc
Type InUse MemUse HighUse Limit Requests Type Lim
devbuf 9472 6347K 6347K 78643K 10562 0
pcb 13 8K 8K 78643K 13 0
rtable 83 2K 2K 78643K 149 0
ifaddr 32 8K 8K 78643K 32 0
counters 42 33K 33K 78643K 42 0
ioctlops 0 0K 2K 78643K 14 0
mount 1 1K 1K 78643K 1 0
log 0 0K 0K 78643K 1 0
vnodes 1182 74K 74K 78643K 1187 0
UFS quota 1 32K 32K 78643K 1 0
UFS mount 5 36K 36K 78643K 5 0
shm 2 1K 1K 78643K 2 0
VM map 2 1K 1K 78643K 2 0
sem 2 0K 0K 78643K 2 0
dirhash 12 2K 2K 78643K 12 0
ACPI 1697 195K 286K 78643K 12598 0
file desc 3 8K 12K 78643K 18 0
proc 47 50K 70K 78643K 314 0
NFS srvsock 1 0K 0K 78643K 1 0
NFS daemon 1 16K 16K 78643K 1 0
in_multi 22 1K 1K 78643K 22 0
ether_multi 1 0K 0K 78643K 1 0
ISOFS mount 1 32K 32K 78643K 1 0
MSDOSFS mount 1 16K 16K 78643K 1 0
ttys 19 95K 95K 78643K 19 0
exec 0 0K 2K 78643K 296 0
pagedep 1 8K 8K 78643K 1 0
inodedep 1 32K 32K 78643K 1 0
newblk 1 0K 0K 78643K 1 0
VM swap 7 26K 26K 78643K 7 0
UVM amap 105 12K 12K 78643K 1385 0
UVM aobj 3 2K 2K 78643K 3 0
memdesc 1 4K 4K 78643K 1 0
crypto data 1 1K 1K 78643K 1 0
NDP 4 0K 0K 78643K 6 0
temp 23 3965K 4029K 78643K 1651 0
kqueue 3 4K 4K 78643K 3 0
SYN cache 2 16K 16K 78643K 2 0
ddb{0}> show all pools
Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle
plcache 128 20 0 0 1 0 1 1 0 8 0
rtpcb 120 18 0 15 1 0 1 1 0 8 0
rtentry 112 34 0 1 1 0 1 1 0 8 0
unpcb 120 27 0 19 1 0 1 1 0 8 0
syncache 296 5 0 5 2 1 1 1 0 8 1
tcpcb 736 8 0 5 1 0 1 1 0 8 0
arp 64 4 0 0 1 0 1 1 0 8 0
inpcb 304 25 0 20 1 0 1 1 0 8 0
nd6 48 3 0 0 1 0 1 1 0 8 0
art_heap8 4096 1 0 0 1 0 1 1 0 8 0
art_heap4 256 144 0 0 9 0 9 9 0 8 0
art_table 32 145 0 0 2 0 2 2 0 8 0
art_node 16 33 0 3 1 0 1 1 0 8 0
dirhash 1024 17 0 0 3 0 3 3 0 8 0
dino2pl 256 1414 0 21 88 0 88 88 0 8 0
ffsino 272 1414 0 21 93 0 93 93 0 8 0
nchpl 144 1632 0 37 60 0 60 60 0 8 0
uvmvnodes 72 1423 0 0 26 0 26 26 0 8 0
vnodes 224 1423 0 0 84 0 84 84 0 8 0
namei 1024 3887 0 3887 2 1 1 1 0 8 1
percpumem 16 32 0 0 1 0 1 1 0 8 0
scxspl 216 4530 0 4530 2 1 1 2 0 8 1
plimitpl 152 14 0 8 1 0 1 1 0 8 0
sigapl 424 213 0 184 4 0 4 4 0 8 0
knotepl 112 48 0 36 1 0 1 1 0 8 0
kqueuepl 168 3 0 0 1 0 1 1 0 8 0
pipepl 336 71 0 63 2 1 1 1 0 8 0
fdescpl 496 197 0 184 2 0 2 2 0 8 0
filepl 152 944 0 888 3 0 3 3 0 8 0
lockfpl 104 5 0 4 1 0 1 1 0 8 0
lockfspl 48 3 0 2 1 0 1 1 0 8 0
sessionpl 144 18 0 9 1 0 1 1 0 8 0
pgrppl 48 18 0 9 1 0 1 1 0 8 0
ucredpl 96 57 0 50 1 0 1 1 0 8 0
zombiepl 144 184 0 184 2 1 1 1 0 8 1
processpl 1080 213 0 184 4 1 3 3 0 8 1
procpl 672 219 0 184 4 0 4 4 0 8 1
sockpl 480 70 0 54 4 1 3 3 0 8 0
mcl4k 4096 3 0 0 1 0 1 1 0 8 0
mcl2k 2048 74 0 0 10 0 10 10 0 8 0
mtagpl 96 1 0 0 1 0 1 1 0 8 0
mbufpl 256 105 0 0 7 0 7 7 0 8 0
bufpl 280 3176 0 144 217 0 217 217 0 8 0
anonpl 24 30597 0 27613 29 2 27 27 0 186 8
amapchunkpl 152 2970 0 2742 11 0 11 11 0 158 0
amappl16 200 104 0 48 5 1 4 4 0 8 1
amappl15 192 53 0 47 1 0 1 1 0 8 0
amappl14 184 12 0 8 1 0 1 1 0 8 0
amappl13 176 18 0 17 2 1 1 1 0 8 0
amappl12 168 37 0 31 1 0 1 1 0 8 0
amappl11 160 50 0 42 1 0 1 1 0 8 0
amappl10 152 14 0 9 1 0 1 1 0 8 0
amappl9 144 234 0 234 2 1 1 1 0 8 1
amappl8 136 233 0 219 1 0 1 1 0 8 0
amappl7 128 44 0 38 1 0 1 1 0 8 0
amappl6 120 90 0 78 1 0 1 1 0 8 0
amappl5 112 129 0 120 1 0 1 1 0 8 0
amappl4 104 448 0 423 1 0 1 1 0 8 0
amappl3 96 46 0 41 1 0 1 1 0 8 0
amappl2 88 382 0 338 2 0 2 2 0 8 0
amappl1 80 6590 0 6219 13 1 12 12 0 8 4
amappl 88 1171 0 1094 3 0 3 3 0 92 1
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 64 2 0 0 1 0 1 1 0 8 0
uaddrrnd 24 197 0 184 1 0 1 1 0 8 0
uaddrbest 32 2 0 0 1 0 1 1 0 8 0
uaddr 24 197 0 184 1 0 1 1 0 8 0
vmmpekpl 168 6161 0 6146 1 0 1 1 0 8 0
vmmpepl 168 20838 0 19871 59 2 57 57 0 357 14
vmsppl 368 196 0 184 2 0 2 2 0 8 0
rwobjpl 56 6375 0 5776 14 1 13 13 0 8 3
pdppl 4096 401 0 368 48 11 37 37 0 8 4
pvpl 32 126374 0 120733 125 1 124 124 0 265 77
pmappl 232 196 0 184 1 0 1 1 0 8 0
extentpl 40 58 0 40 1 0 1 1 0 8 0
phpool 112 270 0 15 8 0 8 8 0 8 0
ddb{0}> machine ddbcpu 0
Invalid cpu 0
ddb{0}> trace
db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398
panic(ffffffff823e90cf) at panic+0x15e sys/kern/subr_prf.c:218
witness_checkorder(fffffd807e9a8990,9,0) at witness_checkorder+0x1188 sys/kern/subr_witness.c:833
rw_enter_write(fffffd807e9a8980) at rw_enter_write+0x5b sys/kern/kern_rwlock.c:128
solock(fffffd807e9a8978) at solock+0x97 sys/kern/uipc_socket2.c:299
rtm_senddesync_timer(fffffd807e9a8978) at rtm_senddesync_timer+0x1a sys/net/rtsock.c:454
timeout_run(fffffd806f750c48) at timeout_run+0xcc sys/kern/kern_timeout.c:674
softclock_process_tick_timeout(fffffd806f750c48,0) at softclock_process_tick_timeout+0x196 sys/kern/kern_timeout.c:721
softclock(0) at softclock+0x11a sys/kern/kern_timeout.c:752
softintr_dispatch(0) at softintr_dispatch+0xfb sys/arch/amd64/amd64/softintr.c:90
Xsoftclock() at Xsoftclock+0x1f
acpicpu_idle() at acpicpu_idle+0x2eb sys/dev/acpi/acpicpu.c:1206
sched_idle(ffffffff8272eff0) at sched_idle+0x417 sys/kern/kern_sched.c:178
end trace frame: 0x0, count: -13
ddb{0}> machine ddbcpu 1
Stopped at x86_ipi_db+0x1a: addq $0x8,%rsp
x86_ipi_db(ffff800020d58ff0) at x86_ipi_db+0x1a sys/arch/amd64/amd64/db_interface.c:352
x86_ipi_handler() at x86_ipi_handler+0xb7 sys/arch/amd64/amd64/ipi.c:106
Xresume_lapic_ipi() at Xresume_lapic_ipi+0x23
acpicpu_idle() at acpicpu_idle+0x2eb sys/dev/acpi/acpicpu.c:1206
sched_idle(ffff800020d58ff0) at sched_idle+0x417 sys/kern/kern_sched.c:178
end trace frame: 0x0, count: 10
ddb{1}> trace
x86_ipi_db(ffff800020d58ff0) at x86_ipi_db+0x1a sys/arch/amd64/amd64/db_interface.c:352
x86_ipi_handler() at x86_ipi_handler+0xb7 sys/arch/amd64/amd64/ipi.c:106
Xresume_lapic_ipi() at Xresume_lapic_ipi+0x23
acpicpu_idle() at acpicpu_idle+0x2eb sys/dev/acpi/acpicpu.c:1206
sched_idle(ffff800020d58ff0) at sched_idle+0x417 sys/kern/kern_sched.c:178
end trace frame: 0x0, count: -5
ddb{1}>

syzbot

unread,
Apr 26, 2021, 11:19:18 PM4/26/21
to syzkaller-o...@googlegroups.com
syzbot has found a reproducer for the following issue on:

HEAD commit: 634e7080 The time_t now is only set but never used. Notice..
git tree: openbsd
console output: https://syzkaller.appspot.com/x/log.txt?x=1024007dd00000
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=17b66f6dd00000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=13ca1001d00000

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

panic: acquiring blockable sleep lock with spinlock or critical section held (rwlock) solock
Stopped at db_enter+0x18: addq $0x8,%rsp
TID PID UID PRFLAGS PFLAGS CPU COMMAND
db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398
panic(ffffffff823e5094) at panic+0x15e sys/kern/subr_prf.c:218
witness_checkorder(fffffd806e7ae990,9,0) at witness_checkorder+0x1188 sys/kern/subr_witness.c:833
rw_enter_write(fffffd806e7ae980) at rw_enter_write+0x5b sys/kern/kern_rwlock.c:128
solock(fffffd806e7ae978) at solock+0x97 sys/kern/uipc_socket2.c:299
rtm_senddesync_timer(fffffd806e7ae978) at rtm_senddesync_timer+0x1a sys/net/rtsock.c:454
timeout_run(fffffd806f5eacc0) at timeout_run+0xcc sys/kern/kern_timeout.c:674
softclock_process_tick_timeout(fffffd806f5eacc0,0) at softclock_process_tick_timeout+0x196 sys/kern/kern_timeout.c:721
softclock(0) at softclock+0x11a sys/kern/kern_timeout.c:752
softintr_dispatch(0) at softintr_dispatch+0xfb sys/arch/amd64/amd64/softintr.c:90
Xsoftclock() at Xsoftclock+0x1f
acpicpu_idle() at acpicpu_idle+0x2eb sys/dev/acpi/acpicpu.c:1206
sched_idle(ffffffff826ceff0) at sched_idle+0x417 sys/kern/kern_sched.c:178
end trace frame: 0x0, 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{0}>
ddb{0}> set $lines = 0
ddb{0}> set $maxwidth = 0
ddb{0}> show panic
acquiring blockable sleep lock with spinlock or critical section held (rwlock) solock
ddb{0}> trace
db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398
panic(ffffffff823e5094) at panic+0x15e sys/kern/subr_prf.c:218
witness_checkorder(fffffd806e7ae990,9,0) at witness_checkorder+0x1188 sys/kern/subr_witness.c:833
rw_enter_write(fffffd806e7ae980) at rw_enter_write+0x5b sys/kern/kern_rwlock.c:128
solock(fffffd806e7ae978) at solock+0x97 sys/kern/uipc_socket2.c:299
rtm_senddesync_timer(fffffd806e7ae978) at rtm_senddesync_timer+0x1a sys/net/rtsock.c:454
timeout_run(fffffd806f5eacc0) at timeout_run+0xcc sys/kern/kern_timeout.c:674
softclock_process_tick_timeout(fffffd806f5eacc0,0) at softclock_process_tick_timeout+0x196 sys/kern/kern_timeout.c:721
softclock(0) at softclock+0x11a sys/kern/kern_timeout.c:752
softintr_dispatch(0) at softintr_dispatch+0xfb sys/arch/amd64/amd64/softintr.c:90
Xsoftclock() at Xsoftclock+0x1f
acpicpu_idle() at acpicpu_idle+0x2eb sys/dev/acpi/acpicpu.c:1206
sched_idle(ffffffff826ceff0) at sched_idle+0x417 sys/kern/kern_sched.c:178
end trace frame: 0x0, count: -13
ddb{0}> show registers
rdi 0
rsi 0x1
rbp 0xffff80002116f2b0
rbx 0xffff80002116f2c0
rdx 0x8b
rcx 0x2
rax 0x1
r8 0xffffffff81c643c5 kprintf+0x145
r9 0x1
r10 0x5cc7123f99afadc3
r11 0xe311def80f1586d1
r12 0x3000000008
r13 0xffff80002116f360
r14 0x100
r15 0x1
rip 0xffffffff81bca908 db_enter+0x18
cs 0x8
rflags 0x246
rsp 0xffff80002116f2a0
ss 0x10
db_enter+0x18: addq $0x8,%rsp
ddb{0}> show proc
PROC (idle0) pid=168646 stat=onproc
flags process=14000<NOZOMBIE,SYSTEM> proc=40000200<SYSTEM,CPUPEG>
pri=0, usrpri=50, nice=20
forw=0xf481e9a34b046c3c, list=0xffff800021168540,0xffff8000211682b0
process=0xffff8000fffff2a0 user=0xffff80002116a000, vmspace=0xffffffff82914f58
estcpu=0, cpticks=3328, pctcpu=0.0
user=0, sys=0, intr=0
ddb{0}> ps
PID TID PPID UID S FLAGS WAIT COMMAND
97063 346355 83246 0 3 0x82 msgwait syz-executor3018
83246 188003 56641 0 3 0x10008a sigsusp ksh
56641 309159 44396 0 3 0x92 select sshd
65423 281098 1 0 3 0x100083 ttyin getty
44396 100409 1 0 3 0x80 select sshd
97543 23055 14389 73 3 0x100090 kqread syslogd
14389 4984 1 0 3 0x100082 netio syslogd
94015 37359 1 77 3 0x100090 poll dhclient
52022 128125 1 0 3 0x80 poll dhclient
79434 310923 0 0 3 0x14200 bored smr
78056 149471 0 0 3 0x14200 pgzero zerothread
47499 69030 0 0 3 0x14200 aiodoned aiodoned
34147 9873 0 0 3 0x14200 syncer update
44082 72676 0 0 3 0x14200 cleaner cleaner
66860 234816 0 0 3 0x14200 reaper reaper
58815 72721 0 0 3 0x14200 pgdaemon pagedaemon
17078 193614 0 0 3 0x14200 bored crynlk
5467 348031 0 0 3 0x14200 bored crypto
81361 356728 0 0 3 0x14200 bored viomb
63496 214254 0 0 3 0x40014200 acpi0 acpi0
38275 60738 0 0 7 0x40014200 idle1
72094 351429 0 0 3 0x14200 bored softnet
42911 1261 0 0 3 0x14200 bored systqmp
18340 210093 0 0 3 0x14200 bored systq
87168 133344 0 0 3 0x40014200 bored softclock
*60102 168646 0 0 7 0x40014200 idle0
1 289109 0 0 3 0x82 wait init
0 0 -1 0 3 0x10200 scheduler swapper
ddb{0}> show all locks
CPU 0:
shared mutex timeout r = 0 (0xffffffff82721dc8)
#0 witness_lock+0x4b0 stacktrace_save sys/sys/stacktrace.h:36 [inline]
#0 witness_lock+0x4b0 sys/kern/subr_witness.c:1182
#1 timeout_run+0xb7 sys/kern/kern_timeout.c:670
#2 softclock_process_tick_timeout+0x196 sys/kern/kern_timeout.c:721
#3 softclock+0x11a sys/kern/kern_timeout.c:752
#4 softintr_dispatch+0xfb sys/arch/amd64/amd64/softintr.c:90
#5 Xsoftclock+0x1f
#6 acpicpu_idle+0x2eb sys/dev/acpi/acpicpu.c:1206
#7 sched_idle+0x417 sys/kern/kern_sched.c:178
#8 proc_trampoline+0x1c
Process 60102 (idle0) thread 0xffff800021168000 (168646)
exclusive kernel_lock &kernel_lock r = 0 (0xffffffff8290dfb0)
#0 witness_lock+0x4b0 stacktrace_save sys/sys/stacktrace.h:36 [inline]
#0 witness_lock+0x4b0 sys/kern/subr_witness.c:1182
#1 softintr_dispatch+0x4e sys/arch/amd64/amd64/softintr.c:90
#2 Xsoftclock+0x1f
#3 acpicpu_idle+0x2eb sys/dev/acpi/acpicpu.c:1206
#4 sched_idle+0x417 sys/kern/kern_sched.c:178
#5 proc_trampoline+0x1c
shared mutex timeout r = 0 (0xffffffff82721dc8)
#0 witness_lock+0x4b0 stacktrace_save sys/sys/stacktrace.h:36 [inline]
#0 witness_lock+0x4b0 sys/kern/subr_witness.c:1182
#1 timeout_run+0xb7 sys/kern/kern_timeout.c:670
#2 softclock_process_tick_timeout+0x196 sys/kern/kern_timeout.c:721
#3 softclock+0x11a sys/kern/kern_timeout.c:752
#4 softintr_dispatch+0xfb sys/arch/amd64/amd64/softintr.c:90
#5 Xsoftclock+0x1f
#6 acpicpu_idle+0x2eb sys/dev/acpi/acpicpu.c:1206
#7 sched_idle+0x417 sys/kern/kern_sched.c:178
#8 proc_trampoline+0x1c
ddb{0}> show malloc
Type InUse MemUse HighUse Limit Requests Type Lim
devbuf 9469 6344K 6345K 78643K 10559 0
pcb 13 8K 8K 78643K 13 0
rtable 61 2K 2K 78643K 113 0
ifaddr 24 7K 7K 78643K 24 0
counters 40 33K 33K 78643K 40 0
ioctlops 0 0K 2K 78643K 13 0
mount 1 1K 1K 78643K 1 0
log 0 0K 0K 78643K 1 0
vnodes 1182 74K 74K 78643K 1187 0
UFS quota 1 32K 32K 78643K 1 0
UFS mount 5 36K 36K 78643K 5 0
shm 2 1K 1K 78643K 2 0
VM map 2 1K 1K 78643K 2 0
sem 2 0K 0K 78643K 2 0
dirhash 12 2K 2K 78643K 12 0
ACPI 1697 195K 286K 78643K 12598 0
file desc 1 0K 0K 78643K 1 0
proc 47 50K 58K 78643K 274 0
NFS srvsock 1 0K 0K 78643K 1 0
NFS daemon 1 16K 16K 78643K 1 0
in_multi 11 0K 0K 78643K 11 0
ether_multi 1 0K 0K 78643K 1 0
ISOFS mount 1 32K 32K 78643K 1 0
MSDOSFS mount 1 16K 16K 78643K 1 0
ttys 19 95K 95K 78643K 19 0
exec 0 0K 2K 78643K 259 0
pagedep 1 8K 8K 78643K 1 0
inodedep 1 32K 32K 78643K 1 0
newblk 1 0K 0K 78643K 1 0
VM swap 7 26K 26K 78643K 7 0
UVM amap 56 2K 4K 78643K 1167 0
UVM aobj 3 2K 2K 78643K 3 0
memdesc 1 4K 4K 78643K 1 0
crypto data 1 1K 1K 78643K 1 0
NDP 3 0K 0K 78643K 3 0
temp 19 3965K 4029K 78643K 1436 0
kqueue 2 2K 2K 78643K 2 0
SYN cache 2 16K 16K 78643K 2 0
ddb{0}> show all pools
Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle
plcache 128 20 0 0 1 0 1 1 0 8 0
rtpcb 120 16 0 13 1 0 1 1 0 8 0
rtentry 112 23 0 1 1 0 1 1 0 8 0
unpcb 120 27 0 19 1 0 1 1 0 8 0
syncache 296 5 0 5 2 1 1 1 0 8 1
tcpcb 736 8 0 5 1 0 1 1 0 8 0
arp 64 2 0 0 1 0 1 1 0 8 0
inpcb 304 21 0 16 1 0 1 1 0 8 0
art_heap8 4096 1 0 0 1 0 1 1 0 8 0
art_heap4 256 95 0 0 6 0 6 6 0 8 0
art_table 32 96 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 1391 0 15 86 0 86 86 0 8 0
ffsino 272 1391 0 15 92 0 92 92 0 8 0
nchpl 144 1567 0 31 57 0 57 57 0 8 0
uvmvnodes 72 1400 0 0 26 0 26 26 0 8 0
vnodes 224 1400 0 0 83 0 83 83 0 8 0
namei 1024 3486 0 3486 2 1 1 1 0 8 1
percpumem 16 31 0 0 1 0 1 1 0 8 0
scxspl 216 3346 0 3346 2 1 1 2 0 8 1
plimitpl 152 13 0 8 1 0 1 1 0 8 0
sigapl 424 192 0 165 4 0 4 4 0 8 0
knotepl 112 5 0 0 1 0 1 1 0 8 0
kqueuepl 168 1 0 0 1 0 1 1 0 8 0
pipepl 336 57 0 53 2 1 1 1 0 8 0
fdescpl 496 176 0 165 2 0 2 2 0 8 0
filepl 152 822 0 779 2 0 2 2 0 8 0
lockfpl 104 5 0 4 1 0 1 1 0 8 0
lockfspl 48 3 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 96 57 0 50 1 0 1 1 0 8 0
zombiepl 144 165 0 165 2 1 1 1 0 8 1
processpl 1080 192 0 165 3 1 2 3 0 8 0
procpl 672 192 0 165 3 0 3 3 0 8 0
sockpl 480 64 0 48 4 1 3 3 0 8 0
mcl4k 4096 3 0 0 1 0 1 1 0 8 0
mcl2k 2048 80 0 0 10 0 10 10 0 8 0
mtagpl 96 1 0 0 1 0 1 1 0 8 0
mbufpl 256 106 0 0 7 0 7 7 0 8 0
bufpl 280 1922 0 80 132 0 132 132 0 8 0
anonpl 24 25328 0 23667 13 2 11 12 0 186 0
amapchunkpl 152 2244 0 2146 5 0 5 5 0 158 0
amappl16 200 25 0 24 2 1 1 1 0 8 0
amappl15 192 44 0 38 1 0 1 1 0 8 0
amappl13 176 12 0 11 2 1 1 1 0 8 0
amappl12 168 22 0 19 1 0 1 1 0 8 0
amappl11 160 42 0 35 1 0 1 1 0 8 0
amappl10 152 8 0 5 1 0 1 1 0 8 0
amappl9 144 232 0 232 2 1 1 1 0 8 1
amappl8 136 203 0 201 1 0 1 1 0 8 0
amappl7 128 30 0 27 1 0 1 1 0 8 0
amappl6 120 74 0 65 1 0 1 1 0 8 0
amappl5 112 130 0 123 1 0 1 1 0 8 0
amappl4 104 406 0 386 1 0 1 1 0 8 0
amappl3 96 37 0 32 1 0 1 1 0 8 0
amappl2 88 306 0 269 1 0 1 1 0 8 0
amappl1 80 5895 0 5576 9 1 8 8 0 8 0
amappl 88 995 0 952 2 0 2 2 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 64 2 0 0 1 0 1 1 0 8 0
uaddrrnd 24 176 0 165 1 0 1 1 0 8 0
uaddrbest 32 2 0 0 1 0 1 1 0 8 0
uaddr 24 176 0 165 1 0 1 1 0 8 0
vmmpekpl 168 5148 0 5134 1 0 1 1 0 8 0
vmmpepl 168 17427 0 16741 41 7 34 35 0 357 3
vmsppl 368 175 0 165 2 0 2 2 0 8 0
rwobjpl 56 5428 0 4993 8 1 7 7 0 8 0
pdppl 4096 359 0 330 45 16 29 35 0 8 0
pvpl 32 85266 0 82022 35 5 30 30 0 265 2
pmappl 232 175 0 165 1 0 1 1 0 8 0
extentpl 40 58 0 40 1 0 1 1 0 8 0
phpool 112 261 0 20 8 0 8 8 0 8 0
ddb{0}> machine ddbcpu 0
Invalid cpu 0
ddb{0}> trace
db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398
panic(ffffffff823e5094) at panic+0x15e sys/kern/subr_prf.c:218
witness_checkorder(fffffd806e7ae990,9,0) at witness_checkorder+0x1188 sys/kern/subr_witness.c:833
rw_enter_write(fffffd806e7ae980) at rw_enter_write+0x5b sys/kern/kern_rwlock.c:128
solock(fffffd806e7ae978) at solock+0x97 sys/kern/uipc_socket2.c:299
rtm_senddesync_timer(fffffd806e7ae978) at rtm_senddesync_timer+0x1a sys/net/rtsock.c:454
timeout_run(fffffd806f5eacc0) at timeout_run+0xcc sys/kern/kern_timeout.c:674
softclock_process_tick_timeout(fffffd806f5eacc0,0) at softclock_process_tick_timeout+0x196 sys/kern/kern_timeout.c:721
softclock(0) at softclock+0x11a sys/kern/kern_timeout.c:752
softintr_dispatch(0) at softintr_dispatch+0xfb sys/arch/amd64/amd64/softintr.c:90
Xsoftclock() at Xsoftclock+0x1f
acpicpu_idle() at acpicpu_idle+0x2eb sys/dev/acpi/acpicpu.c:1206
sched_idle(ffffffff826ceff0) at sched_idle+0x417 sys/kern/kern_sched.c:178
end trace frame: 0x0, count: -13
ddb{0}> machine ddbcpu 1
Stopped at x86_ipi_db+0x1a: addq $0x8,%rsp
x86_ipi_db(ffff800020d58ff0) at x86_ipi_db+0x1a sys/arch/amd64/amd64/db_interface.c:352
x86_ipi_handler() at x86_ipi_handler+0xb7 sys/arch/amd64/amd64/ipi.c:106
Xresume_lapic_ipi() at Xresume_lapic_ipi+0x23
acpicpu_idle() at acpicpu_idle+0x2eb sys/dev/acpi/acpicpu.c:1206
sched_idle(ffff800020d58ff0) at sched_idle+0x417 sys/kern/kern_sched.c:178
end trace frame: 0x0, count: 10
ddb{1}> trace
x86_ipi_db(ffff800020d58ff0) at x86_ipi_db+0x1a sys/arch/amd64/amd64/db_interface.c:352
x86_ipi_handler() at x86_ipi_handler+0xb7 sys/arch/amd64/amd64/ipi.c:106
Xresume_lapic_ipi() at Xresume_lapic_ipi+0x23
acpicpu_idle() at acpicpu_idle+0x2eb sys/dev/acpi/acpicpu.c:1206
sched_idle(ffff800020d58ff0) at sched_idle+0x417 sys/kern/kern_sched.c:178
end trace frame: 0x0, count: -5
ddb{1}>

Anton Lindqvist

unread,
Apr 27, 2021, 2:17:20 AM4/27/21
to syzbot, syzkaller-o...@googlegroups.com
#syz fix: Revert per-socket `so_lock' rwlock(9) and use it to protect routing (PF_ROUTE) sockets. There is a locking issue with timeouts that needs to be fixed. Requested by deraadt@
Reply all
Reply to author
Forward
0 new messages