panic: rw_enter: solock locking against myself

3 views
Skip to first unread message

syzbot

unread,
Jul 2, 2022, 3:14:22 AM7/2/22
to syzkaller-o...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: a4a82b864d54 Remove PIPEXCSESSION ioctl(2) call only from ..
git tree: openbsd
console output: https://syzkaller.appspot.com/x/log.txt?x=10aebbc0080000
kernel config: https://syzkaller.appspot.com/x/.config?x=7058272de1526588
dashboard link: https://syzkaller.appspot.com/bug?extid=f784cdc68e5300020799

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+f784cd...@syzkaller.appspotmail.com

panic: rw_enter: solock locking against myself
Stopped at db_enter+0x18: addq $0x8,%rsp
TID PID UID PRFLAGS PFLAGS CPU COMMAND
*252910 18469 0 0 0x4000000 0K syz-executor.3
db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:437
panic(ffffffff825e324e) at panic+0x177 sys/kern/subr_prf.c:202
rw_enter(fffffd807e8fb218,1) at rw_enter+0x482 rw_enter_diag sys/kern/kern_rwlock.c:183 [inline]
rw_enter(fffffd807e8fb218,1) at rw_enter+0x482 sys/kern/kern_rwlock.c:274
soshutdown(fffffd807e8fb210,0) at soshutdown+0x2f sys/kern/uipc_socket.c:1200
sys_shutdown(ffff800021305cf0,ffff80002478c578,ffff80002478c5c0) at sys_shutdown+0x63 sys/kern/uipc_syscalls.c:945
syscall(ffff80002478c640) at syscall+0x435 mi_syscall sys/sys/syscall_mi.h:101 [inline]
syscall(ffff80002478c640) at syscall+0x435 sys/arch/amd64/amd64/trap.c:585
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0x7997c738fb0, count: 8
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
*cpu0: rw_enter: solock locking against myself
ddb{0}> trace
db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:437
panic(ffffffff825e324e) at panic+0x177 sys/kern/subr_prf.c:202
rw_enter(fffffd807e8fb218,1) at rw_enter+0x482 rw_enter_diag sys/kern/kern_rwlock.c:183 [inline]
rw_enter(fffffd807e8fb218,1) at rw_enter+0x482 sys/kern/kern_rwlock.c:274
soshutdown(fffffd807e8fb210,0) at soshutdown+0x2f sys/kern/uipc_socket.c:1200
sys_shutdown(ffff800021305cf0,ffff80002478c578,ffff80002478c5c0) at sys_shutdown+0x63 sys/kern/uipc_syscalls.c:945
syscall(ffff80002478c640) at syscall+0x435 mi_syscall sys/sys/syscall_mi.h:101 [inline]
syscall(ffff80002478c640) at syscall+0x435 sys/arch/amd64/amd64/trap.c:585
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0x7997c738fb0, count: -7
ddb{0}> show registers
rdi 0
rsi 0x1
rbp 0xffff80002478c360
rbx 0xffffffff82937bb7 cpu_info_full_primary+0x2bb7
rdx 0
rcx 0
rax 0xffff800021305cf0
r8 0x101010101010101
r9 0x8080808080808080
r10 0xa34f133e0b0fde72
r11 0x8eee07ac21c5843a
r12 0xffffffff829379b8 cpu_info_full_primary+0x29b8
r13 0
r14 0
r15 0x1
rip 0xffffffff81d03c18 db_enter+0x18
cs 0x8
rflags 0x246
rsp 0xffff80002478c350
ss 0x10
db_enter+0x18: addq $0x8,%rsp
ddb{0}> show proc
PROC (syz-executor.3) pid=252910 stat=onproc
flags process=0 proc=4000000<THREAD>
pri=32, usrpri=51, nice=20
forw=0xffffffffffffffff, list=0xffff800021304010,0xffffffff82a6ea48
process=0xffff8000fffe94e0 user=0xffff800024787000, vmspace=0xfffffd805ad6aa18
estcpu=36, cpticks=0, pctcpu=0.0
user=0, sys=0, intr=0
ddb{0}> ps
PID TID PPID UID S FLAGS WAIT COMMAND
18469 360315 51989 0 2 0 syz-executor.3
*18469 252910 51989 0 7 0x4000000 syz-executor.3
51989 103253 743 0 3 0x82 nanoslp syz-executor.3
38805 318456 743 0 3 0x82 piperd syz-executor.7
91517 480979 743 0 3 0x82 piperd syz-executor.4
52455 279103 743 0 3 0x82 piperd syz-executor.1
74764 196098 743 0 3 0x82 piperd syz-executor.0
26008 97350 743 0 3 0x82 piperd syz-executor.5
29774 423875 743 0 3 0x82 piperd syz-executor.6
47469 1110 743 0 3 0x82 piperd syz-executor.2
79904 191682 0 0 3 0x14200 acct acct
92639 449883 0 0 3 0x14280 nfsidl nfsio
51285 411292 0 0 3 0x14280 nfsidl nfsio
51399 145835 0 0 3 0x14280 nfsidl nfsio
43764 336469 0 0 3 0x14280 nfsidl nfsio
37843 524055 0 0 3 0x14280 nfsidl nfsio
40656 245576 0 0 3 0x14280 nfsidl nfsio
75705 62378 0 0 3 0x14280 nfsidl nfsio
65341 16911 0 0 3 0x14280 nfsidl nfsio
32313 328269 0 0 3 0x14280 nfsidl nfsio
47851 22458 0 0 3 0x14280 nfsidl nfsio
61645 305028 0 0 3 0x14280 nfsidl nfsio
14869 381840 0 0 3 0x14280 nfsidl nfsio
37287 22884 0 0 3 0x14280 nfsidl nfsio
65488 27545 0 0 3 0x14280 nfsidl nfsio
19744 96226 0 0 3 0x14280 nfsidl nfsio
58410 335199 0 0 3 0x14280 nfsidl nfsio
89527 287798 0 0 3 0x14280 nfsidl nfsio
21418 253785 0 0 3 0x14280 nfsidl nfsio
23264 203172 0 0 3 0x14280 nfsidl nfsio
84285 463393 0 0 3 0x14280 nfsidl nfsio
97783 263092 0 0 3 0x14200 bored sosplice
743 311425 38292 0 3 0x82 thrsleep syz-fuzzer
743 271763 38292 0 3 0x4000082 thrsleep syz-fuzzer
743 333350 38292 0 3 0x4000082 thrsleep syz-fuzzer
743 288721 38292 0 3 0x4000082 thrsleep syz-fuzzer
743 376844 38292 0 3 0x4000082 thrsleep syz-fuzzer
743 262489 38292 0 3 0x4000082 thrsleep syz-fuzzer
743 181187 38292 0 3 0x4000082 kqread syz-fuzzer
743 503395 38292 0 3 0x4000082 thrsleep syz-fuzzer
38292 306870 48784 0 3 0x10008a sigsusp ksh
48784 39880 31342 0 3 0x9a kqread sshd
13867 29996 1 0 3 0x100083 ttyin getty
31342 342552 1 0 3 0x88 kqread sshd
58116 467269 50043 74 3 0x1100092 bpf pflogd
50043 95756 1 0 3 0x80 netio pflogd
57128 488090 42423 73 3 0x1100090 kqread syslogd
42423 482716 1 0 3 0x100082 netio syslogd
86943 97412 1 0 3 0x100080 kqread resolvd
61990 384810 89702 77 3 0x100092 kqread dhcpleased
82594 484886 89702 77 3 0x100092 kqread dhcpleased
89702 420933 1 0 3 0x80 kqread dhcpleased
29889 165140 0 0 3 0x14200 bored smr
90492 139274 0 0 2 0x14200 zerothread
88146 227481 0 0 3 0x14200 aiodoned aiodoned
7964 146125 0 0 3 0x14200 syncer update
55664 498906 0 0 3 0x14200 cleaner cleaner
88316 63819 0 0 3 0x14200 reaper reaper
5661 52806 0 0 3 0x14200 pgdaemon pagedaemon
26115 1605 0 0 3 0x14200 bored viomb
34761 33882 0 0 3 0x40014200 acpi0 acpi0
20170 443878 0 0 7 0x40014200 idle1
66244 90135 0 0 3 0x14200 bored softnet
72149 131056 0 0 3 0x14200 bored softnet
1374 294635 0 0 3 0x14200 bored softnet
77134 315124 0 0 3 0x14200 bored softnet
89977 246537 0 0 3 0x14200 bored systqmp
24971 277762 0 0 3 0x14200 bored systq
68294 142827 0 0 3 0x40014200 bored softclock
10143 280179 0 0 3 0x40014200 idle0
1 408596 0 0 3 0x82 wait init
0 0 -1 0 3 0x10200 scheduler swapper
ddb{0}> show all locks
ddb{0}> show malloc
Type InUse MemUse HighUse Limit Requests Type Lim
devbuf 10208 6492K 7075K 78643K 23094 0
pcb 13 12K 14K 78643K 654 0
rtable 200 11K 11K 78643K 1792 0
ifaddr 91 19K 21K 78643K 607 0
sysctl 2 0K 0K 78643K 2 0
counters 54 35K 35K 78643K 188 0
ioctlops 0 0K 4K 78643K 2511 0
iov 0 0K 16K 78643K 663 0
mount 1 1K 1K 78643K 1 0
log 0 0K 0K 78643K 5 0
vnodes 1345 84K 84K 78643K 3808 0
UFS quota 1 32K 32K 78643K 1 0
UFS mount 5 36K 36K 78643K 5 0
shm 2 1K 5K 78643K 47 0
VM map 2 1K 1K 78643K 2 0
sem 21 3K 5K 78643K 97 0
dirhash 12 2K 2K 78643K 12 0
ACPI 1697 195K 286K 78643K 12548 0
file desc 12 41K 85K 78643K 5645 0
sigio 0 0K 0K 78643K 151 0
proc 70 91K 128K 78643K 1528 0
subproc 117 7K 7K 78643K 435 0
NFS srvsock 1 0K 0K 78643K 1 0
NFS daemon 1 16K 16K 78643K 1 0
ip_moptions 0 0K 0K 78643K 124 0
in_multi 74 5K 6K 78643K 507 0
ether_multi 1 0K 0K 78643K 17 0
mrt 1 0K 0K 78643K 25 0
ISOFS mount 1 32K 32K 78643K 1 0
MSDOSFS mount 1 16K 16K 78643K 1 0
ttys 175 784K 784K 78643K 175 0
exec 0 0K 2K 78643K 1951 0
tdb 3 0K 0K 78643K 3 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 384 726K 726K 78643K 33140 0
UVM aobj 60 2K 2K 78643K 72 0
memdesc 1 4K 4K 78643K 1 0
crypto data 1 1K 1K 78643K 1 0
ip6_options 0 0K 0K 78643K 224 0
NDP 15 0K 1K 78643K 160 0
temp 332 5110K 6135K 78643K 98648 0
kqueue 12 18K 24K 78643K 407 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 22 0 0 1 0 1 1 0 8 0
rtpcb 120 404 0 401 4 3 1 3 0 8 0
rtentry 112 601 0 522 4 1 3 4 0 8 0
unpcb 144 4147 0 4126 53 52 1 10 0 8 0
syncache 296 39 0 39 11 11 0 1 0 8 0
tcpqe 32 89 0 89 6 6 0 1 0 8 0
tcpcb 736 1629 0 1625 66 65 1 15 0 8 0
arp 120 139 0 125 1 0 1 1 0 8 0
inpcb 320 3689 0 3682 62 61 1 13 0 8 0
nd6 48 116 0 98 1 0 1 1 0 8 0
pkpcb 40 12 0 12 4 4 0 1 0 8 0
kcovpl 48 33 0 24 1 0 1 1 0 8 0
ppxss 1256 22 0 22 4 4 0 1 0 8 0
pfstscr 40 33 0 33 7 7 0 1 0 8 0
pffrag 232 42 0 42 2 2 0 1 0 482 0
pffrnode 88 42 0 42 2 2 0 1 0 8 0
pffrent 40 93 0 93 2 2 0 1 0 8 0
pfosfp 40 1482 0 1056 5 0 5 5 0 8 0
pfosfpen 112 1482 0 762 21 0 21 21 0 8 0
pfrktable 1344 83 0 73 3 2 1 2 0 8 0
pftag 88 14 0 11 1 0 1 1 0 8 0
pfstitem 24 29 0 27 1 0 1 1 0 8 0
pfstkey 120 85 0 83 1 0 1 1 0 8 0
pfstate 336 52 0 50 2 1 1 2 0 8 0
pfrule 1360 169 0 134 4 1 3 3 0 8 0
rttmr 136 4 0 4 1 1 0 1 0 8 0
art_heap8 4096 2 0 1 2 0 2 2 0 8 1
art_heap4 256 2110 0 1773 41 18 23 29 0 8 0
art_table 32 2112 0 1774 4 0 4 4 0 8 0
art_node 16 600 0 533 1 0 1 1 0 8 0
sysvmsgpl 40 60 0 28 1 0 1 1 0 8 0
semupl 112 3 0 3 1 1 0 1 0 8 0
semapl 112 82 0 63 1 0 1 1 0 8 0
shmpl 112 69 0 12 3 1 2 2 0 8 0
dirhash 1024 17 0 0 3 0 3 3 0 8 0
dino2pl 256 8514 0 7033 93 0 93 93 0 8 0
ffsino 272 8514 0 7033 100 0 100 100 0 8 0
nchpl 144 18011 0 16376 63 0 63 63 0 8 0
uvmvnodes 80 5926 0 0 121 0 121 121 0 8 0
vnodes 224 5926 0 0 349 0 349 349 0 8 0
namei 1024 75704 0 75704 6 5 1 2 0 8 1
percpumem 16 106 0 67 1 0 1 1 0 8 0
vcpupl 2048 50 0 0 7 0 7 7 0 8 0
vmpool 568 57 0 7 5 1 4 4 0 8 0
pfiaddrpl 120 50 0 30 1 0 1 1 0 8 0
kstatmem 264 160 0 134 2 0 2 2 0 8 0
scsiplug 72 3 0 3 1 1 0 1 0 8 0
scxspl 216 55966 0 55966 14 13 1 8 0 8 1
plimitpl 152 865 0 849 1 0 1 1 0 8 0
sigapl 424 5941 0 5877 9 1 8 8 0 8 0
futexpl 64 52500 0 52500 2 1 1 1 0 8 1
knotepl 120 377 0 0 9 0 9 9 0 8 0
kqueuepl 224 1025 0 1017 21 20 1 5 0 8 0
pipepl 336 1223 0 1195 32 29 3 8 0 8 0
fdescpl 496 5882 0 5857 5 1 4 5 0 8 0
filepl 152 47908 0 47650 106 96 10 23 0 8 0
lockfpl 104 1429 0 1427 2 1 1 2 0 8 0
lockfspl 48 451 0 449 1 0 1 1 0 8 0
sessionpl 144 49 0 31 1 0 1 1 0 8 0
pgrppl 48 101 0 83 1 0 1 1 0 8 0
ucredpl 104 3965 0 3950 1 0 1 1 0 8 0
zombiepl 144 5878 0 5877 3 2 1 1 0 8 0
processpl 1064 5941 0 5877 5 0 5 5 0 8 0
procpl 672 14733 0 14661 13 5 8 9 0 8 0
srpgc 96 50 0 50 8 8 0 1 0 8 0
sosppl 168 52 0 52 5 5 0 1 0 8 0
sockpl 504 8252 0 8221 228 224 4 34 0 8 0
mcl64k 65536 9 0 0 2 0 2 2 0 8 0
mcl16k 16384 4 0 0 1 0 1 1 0 8 0
mcl12k 12288 7 0 0 1 0 1 1 0 8 0
mcl9k 9216 5 0 0 1 0 1 1 0 8 0
mcl8k 8192 9 0 0 2 0 2 2 0 8 0
mcl4k 4096 12 0 0 2 0 2 2 0 8 0
mcl2k2 2112 5 0 0 1 0 1 1 0 8 0
mcl2k 2048 217 0 0 22 1 21 22 0 8 0
mtagpl 96 590 0 0 11 0 11 11 0 8 0
mbufpl 256 1463 0 0 83 0 83 83 0 8 0
bufpl 288 18159 0 11830 453 0 453 453 0 8 0
anonpl 24 1103416 0 1089082 156 41 115 132 0 186 0
amapchunkpl 152 93997 0 93343 50 19 31 38 0 158 0
amappl16 200 15598 0 15009 72 38 34 46 0 8 1
amappl15 192 1799 0 1799 2 1 1 1 0 8 1
amappl14 184 759 0 757 1 0 1 1 0 8 0
amappl13 176 1313 0 1309 1 0 1 1 0 8 0
amappl12 168 109 0 106 1 0 1 1 0 8 0
amappl11 160 262 0 242 1 0 1 1 0 8 0
amappl10 152 181 0 173 1 0 1 1 0 8 0
amappl9 144 1596 0 1590 1 0 1 1 0 8 0
amappl8 136 1604 0 1540 3 0 3 3 0 8 0
amappl7 128 813 0 800 1 0 1 1 0 8 0
amappl6 120 1459 0 1440 2 1 1 2 0 8 0
amappl5 112 4406 0 4389 1 0 1 1 0 8 0
amappl4 104 1972 0 1944 2 1 1 2 0 8 0
amappl3 96 16921 0 16872 2 0 2 2 0 8 0
amappl2 88 7497 0 7439 3 1 2 3 0 8 0
amappl1 80 139847 0 139269 20 5 15 20 0 8 0
amappl 88 31951 0 31747 7 1 6 6 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 71 0 12 2 0 2 2 0 8 0
uaddrrnd 24 5939 0 5864 1 0 1 1 0 8 0
uaddrbest 32 2 0 0 1 0 1 1 0 8 0
uaddr 24 5939 0 5864 1 0 1 1 0 8 0
vmmpekpl 168 46213 0 46150 4 0 4 4 0 8 0
vmmpepl 168 574003 0 571652 203 71 132 142 0 357 4
vmsppl 368 5938 0 5864 9 1 8 8 0 8 0
rwobjpl 56 143767 0 136154 116 6 110 113 0 8 0
pdppl 4096 11885 0 11778 372 259 113 119 0 8 6
pvpl 32 2239961 0 2221762 338 152 186 257 0 265 0
pmappl 248 5938 0 5864 7 1 6 6 0 8 0
extentpl 40 58 0 38 1 0 1 1 0 8 0
phpool 112 1537 0 610 28 0 28 28 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:437
panic(ffffffff825e324e) at panic+0x177 sys/kern/subr_prf.c:202
rw_enter(fffffd807e8fb218,1) at rw_enter+0x482 rw_enter_diag sys/kern/kern_rwlock.c:183 [inline]
rw_enter(fffffd807e8fb218,1) at rw_enter+0x482 sys/kern/kern_rwlock.c:274
soshutdown(fffffd807e8fb210,0) at soshutdown+0x2f sys/kern/uipc_socket.c:1200
sys_shutdown(ffff800021305cf0,ffff80002478c578,ffff80002478c5c0) at sys_shutdown+0x63 sys/kern/uipc_syscalls.c:945
syscall(ffff80002478c640) at syscall+0x435 mi_syscall sys/sys/syscall_mi.h:101 [inline]
syscall(ffff80002478c640) at syscall+0x435 sys/arch/amd64/amd64/trap.c:585
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0x7997c738fb0, count: -7
ddb{0}> machine ddbcpu 1
Stopped at x86_ipi_db+0x1a: addq $0x8,%rsp
x86_ipi_db(ffff800020dd8ff0) at x86_ipi_db+0x1a sys/arch/amd64/amd64/db_interface.c:393
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+0x312 sys/dev/acpi/acpicpu.c:1206
sched_idle(ffff800020dd8ff0) at sched_idle+0x417 sys/kern/kern_sched.c:178
end trace frame: 0x0, count: 10
ddb{1}> trace
x86_ipi_db(ffff800020dd8ff0) at x86_ipi_db+0x1a sys/arch/amd64/amd64/db_interface.c:393
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+0x312 sys/dev/acpi/acpicpu.c:1206
sched_idle(ffff800020dd8ff0) 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,
Dec 26, 2022, 5:02:41 PM12/26/22
to syzkaller-o...@googlegroups.com
Auto-closing this bug as obsolete.
Crashes did not happen for a while, no reproducer and no activity.
Reply all
Reply to author
Forward
0 new messages