panic: kernel diagnostic assertion "refs != ~0" failed: file "/syzkaller/managers/main/kernel/sys/kern/kern_synch.c", line 959
Stopped at db_enter+0x25: addq $0x8,%rsp
TID PID UID PRFLAGS PFLAGS CPU COMMAND
*101374 60634 0 0 0x4000000 0 syz-executor
db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438
panic(ffffffff8349d0f1) at panic+0x1cf sys/kern/subr_prf.c:198
__assert(ffffffff834db500,ffffffff8353c17a,3bf,ffffffff8351592a) at __assert+0x29 sys/kern/subr_prf.c:-1
refcnt_finalize(ffff80002a807758,ffffffff83491539) at refcnt_finalize+0x1e7 sys/kern/kern_synch.c:960
pppx_if_destroy(ffff80002a8ac000,ffff80002a807750) at pppx_if_destroy+0x3d sys/net/if_pppx.c:794
pppxclose(285b9a,41,2000,ffff80002a7967e8) at pppxclose+0xa0 sys/net/if_pppx.c:541
spec_close(ffff80002a803430) at spec_close+0x417 sys/kern/spec_vnops.c:-1
VOP_CLOSE(fffffa006c88b038,41,fffffa0007ffd618,ffff80002a7967e8) at VOP_CLOSE+0x129 sys/kern/vfs_vops.c:156
vn_closefile(fffffa006d4889f0,ffff80002a7967e8) at vn_closefile+0x11d vn_close sys/kern/vfs_vnops.c:298 [inline]
vn_closefile(fffffa006d4889f0,ffff80002a7967e8) at vn_closefile+0x11d sys/kern/vfs_vnops.c:621
fdrop(fffffa006d4889f0,ffff80002a7967e8) at fdrop+0x121 sys/kern/kern_descrip.c:1281
closef(fffffa006d4889f0,ffff80002a7967e8) at closef+0x190 sys/kern/kern_descrip.c:1265
sys_closefrom(ffff80002a7967e8,ffff80002a8036f0,ffff80002a803640) at sys_closefrom+0x13c sys/kern/kern_descrip.c:1471
syscall(ffff80002a8036f0) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline]
syscall(ffff80002a8036f0) at syscall+0x962 sys/arch/amd64/amd64/trap.c:791
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0xd7e48ba8990, count: 1
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: kernel diagnostic assertion "refs != ~0" failed: file "/syzkaller/managers/main/kernel/sys/kern/kern_synch.c", line 959
ddb> show kasan
No such command
ddb> trace
db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438
panic(ffffffff8349d0f1) at panic+0x1cf sys/kern/subr_prf.c:198
__assert(ffffffff834db500,ffffffff8353c17a,3bf,ffffffff8351592a) at __assert+0x29 sys/kern/subr_prf.c:-1
refcnt_finalize(ffff80002a807758,ffffffff83491539) at refcnt_finalize+0x1e7 sys/kern/kern_synch.c:960
pppx_if_destroy(ffff80002a8ac000,ffff80002a807750) at pppx_if_destroy+0x3d sys/net/if_pppx.c:794
pppxclose(285b9a,41,2000,ffff80002a7967e8) at pppxclose+0xa0 sys/net/if_pppx.c:541
spec_close(ffff80002a803430) at spec_close+0x417 sys/kern/spec_vnops.c:-1
VOP_CLOSE(fffffa006c88b038,41,fffffa0007ffd618,ffff80002a7967e8) at VOP_CLOSE+0x129 sys/kern/vfs_vops.c:156
vn_closefile(fffffa006d4889f0,ffff80002a7967e8) at vn_closefile+0x11d vn_close sys/kern/vfs_vnops.c:298 [inline]
vn_closefile(fffffa006d4889f0,ffff80002a7967e8) at vn_closefile+0x11d sys/kern/vfs_vnops.c:621
fdrop(fffffa006d4889f0,ffff80002a7967e8) at fdrop+0x121 sys/kern/kern_descrip.c:1281
closef(fffffa006d4889f0,ffff80002a7967e8) at closef+0x190 sys/kern/kern_descrip.c:1265
sys_closefrom(ffff80002a7967e8,ffff80002a8036f0,ffff80002a803640) at sys_closefrom+0x13c sys/kern/kern_descrip.c:1471
syscall(ffff80002a8036f0) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline]
syscall(ffff80002a8036f0) at syscall+0x962 sys/arch/amd64/amd64/trap.c:791
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0xd7e48ba8990, count: -14
ddb> show registers
rdi 0
rsi 0x1
rbp 0xffff80002a803200
rbx 0
rdx 0xffff8000015ba980
rcx 0
rax 0xffff80002a7967e8
r8 0x101010101010101
r9 0x8080808080808080
r10 0x63195fe892d5fd4e
r11 0x1efab84943df1c35
r12 0
r13 0
r14 0
r15 0x1
rip 0xffffffff82ca9f95 db_enter+0x25
cs 0x8
rflags 0x246
rsp 0xffff80002a8031f0
ss 0x10
db_enter+0x25: addq $0x8,%rsp
ddb> show proc
PROC (syz-executor) tid=101374 pid=60634 tcnt=3 stat=onproc
flags process=0 proc=4000000<THREAD>
runpri=32, usrpri=68, slppri=32, nice=20
wchan=0x0, wmesg=, ps_single=0x0 scnt=0 ecnt=0
forw=0xffffffffffffffff, list=0xffff80002a796fb0,0xffff80002a797788
process=0xffff80002a746448 user=0xffff80002a7fe000, vmspace=0xfffffa006d199b90
estcpu=18, cpticks=1, pctcpu=0.0, user=0, sys=1, intr=0
ddb> ps
PID TID PPID UID S PRLAGS PFLAGS WAIT COMMAND
45271 485219 86207 0 2 0 0 syz-executor
60634 389455 5208 0 2 0 0 syz-executor
*60634 101374 5208 0 7 0 0x4000000 syz-executor
60634 326502 5208 0 2 0 0x4000000 syz-executor
14702 305615 48374 0 3 0x1000 0x2000 suspend syz-executor
14702 160164 48374 0 2 0x1000 0x4080000 syz-executor
48374 517313 86207 0 2 0x2 0xc80 syz-executor
49096 474418 86207 0 3 0x2 0x80 piperd syz-executor
65184 460913 86207 0 3 0x2 0x80 piperd syz-executor
54394 500093 86207 0 3 0x2 0x80 piperd syz-executor
29649 373324 86207 0 3 0x2 0x80 piperd syz-executor
39852 33161 86207 0 3 0x2 0x80 piperd syz-executor
5208 281383 86207 0 2 0x2 0xc80 syz-executor
86207 416182 10583 0 2 0x2 0 syz-executor
10583 74895 10030 0 3 0x100002 0x88 sigsusp ksh
10030 395940 63810 0 3 0x10 0x88 kqread sshd-session
63810 280930 78609 0 3 0x12 0x80 kqread sshd-session
81876 378092 1 0 3 0x100003 0x80 ttyin getty
78609 343640 1 0 3 0 0x88 kqread sshd
52210 426052 47691 73 3 0x1100010 0x80 kqread syslogd
47691 100969 1 0 3 0x100002 0x80 sbwait syslogd
32179 116505 1 0 3 0x100000 0x80 kqread resolvd
40510 104082 2155 77 3 0x100012 0x80 kqread dhcpleased
47258 330150 2155 77 3 0x100012 0x80 kqread dhcpleased
2155 380742 1 0 3 0 0x80 kqread dhcpleased
75994 464941 0 0 3 0x14000 0x200 bored smr
16094 68083 0 0 2 0x14000 0x200 zerothread
23324 45111 0 0 3 0x14000 0x200 aiodoned aiodoned
78351 515726 0 0 3 0x14000 0x200 syncer update
97148 363467 0 0 3 0x14000 0x200 cleaner cleaner
27459 13651 0 0 3 0x14000 0x200 reaper reaper
21520 372147 0 0 3 0x14000 0x200 pgdaemon pagedaemon
10414 173962 0 0 3 0x14000 0x200 bored viomb
72952 300385 0 0 3 0x14000 0x40000200 acpi0 acpi0
83131 252209 0 0 2 0x14000 0x200 softnet0
26940 260523 0 0 3 0x14000 0x200 smrbar systqmp
41792 364515 0 0 3 0x14000 0x200 bored systq
90130 171650 0 0 3 0x14000 0x40000200 tmoslp softclock
43092 66602 0 0 3 0x14000 0x40000200 idle0
1 272020 0 0 3 0x2 0x80 wait init
0 0 -1 0 3 0x10000 0x200 scheduler swapper
ddb> show all locks
No such command
ddb> show malloc
Type InUse MemUse HighUse Limit Requests Type Lim
devbuf 11031 12105K 12184K 166960K 12161 0
pcb 17 12K 12K 166960K 31 0
rtable 238 8K 9K 166960K 424 0
pf 31 13K 15K 166960K 45 0
ifaddr 41 7K 8K 166960K 59 0
ifgroup 51 2K 2K 166960K 71 0
sysctl 1 1K 9K 166960K 5 0
counters 34 17K 18K 166960K 42 0
ioctlops 0 0K 4K 166960K 46 0
iov 0 0K 12K 166960K 3 0
mount 1 1K 1K 166960K 1 0
log 0 0K 0K 166960K 4 0
vnodes 1295 81K 82K 166960K 1408 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 6 0K 0K 166960K 7 0
dirhash 12 2K 2K 166960K 12 0
ACPI 1692 195K 286K 166960K 12470 0
file desc 12 38K 85K 166960K 199 0
sigio 0 0K 0K 166960K 1 0
proc 61 59K 108K 166960K 533 0
subproc 63 3K 4K 166960K 81 0
NFS srvsock 1 0K 0K 166960K 1 0
NFS daemon 1 16K 16K 166960K 1 0
ip_moptions 0 0K 0K 166960K 4 0
in_multi 93 6K 7K 166960K 122 0
ether_multi 1 0K 0K 166960K 2 0
mrt 0 0K 0K 166960K 3 0
ISOFS mount 1 32K 32K 166960K 1 0
MSDOSFS mount 1 16K 16K 166960K 1 0
ttys 55 254K 254K 166960K 55 0
exec 0 0K 1K 166960K 386 0
fusefs mount 1 32K 32K 166960K 1 0
tdb 3 0K 0K 166960K 3 0
VM swap 8 62K 64K 166960K 10 0
UVM amap 179 141K 158K 166960K 3384 0
UVM aobj 3 2K 4K 166960K 4 0
pinsyscall 33 66K 90K 166960K 1325 0
memdesc 1 4K 4K 166960K 1 0
crypto data 1 1K 1K 166960K 1 0
NDP 11 0K 1K 166960K 35 0
temp 35 9109K 9174K 166960K 5806 0
kqueue 14 22K 24K 166960K 32 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 44 0 41 1 0 1 1 0 8 0
rtentry 136 129 0 26 4 0 4 4 0 8 0
unpcb 144 63 0 47 1 0 1 1 0 8 0
syncache 336 5 0 5 1 0 1 1 0 8 1
tcpcb 736 19 0 15 1 0 1 1 0 8 0
arp 96 21 0 4 1 0 1 1 0 8 0
ipq 40 1 0 0 1 0 1 1 0 8 0
ipqe 40 1 0 0 1 0 1 1 0 8 0
inpcb 328 168 0 159 7 0 7 7 0 8 6
nd6 112 29 0 6 1 0 1 1 0 8 0
kcovpl 48 9 0 2 1 0 1 1 0 8 0
ppxss 1072 5 0 4 1 0 1 1 0 8 0
pppxif 1416 2 0 1 1 0 1 1 0 8 0
art_heap8 4096 2 0 0 2 0 2 2 0 8 0
art_heap4 256 513 0 44 32 0 32 32 0 8 1
art_table 40 515 0 44 6 0 6 6 0 8 0
art_node 32 128 0 33 1 0 1 1 0 8 0
semupl 112 1 0 1 1 0 1 1 0 8 1
semapl 72 5 0 1 1 0 1 1 0 8 0
dirhash 1024 17 0 0 3 0 3 3 0 8 0
dino2pl 256 1667 0 202 92 0 92 92 0 8 0
ffsino 256 1667 0 202 92 0 92 92 0 8 0
nchpl 144 1927 0 230 64 0 64 64 0 8 0
rtmask 32 1 0 1 1 0 1 1 0 8 1
vnodes 216 1780 0 0 99 0 99 99 0 8 0
namei 1024 6512 0 6512 3 0 3 3 0 8 3
vcpupl 3968 16 0 16 2 0 2 2 0 8 2
vmpool 808 1 0 1 1 0 1 1 0 8 1
kstatmem 264 35 0 12 2 0 2 2 0 8 0
scsiplug 72 2 0 2 1 0 1 1 0 8 1
scxspl 216 6624 0 6624 4 0 4 4 1 8 4
plimitpl 152 35 0 20 1 0 1 1 0 8 0
sigapl 424 492 0 455 6 0 6 6 0 8 1
knotepl 120 4420 0 4375 9 0 9 9 0 8 7
kqueuepl 184 35 0 25 1 0 1 1 0 8 0
pipepl 304 197 0 167 8 0 8 8 0 8 5
fdescpl 448 479 0 455 4 0 4 4 0 8 0
filepl 120 1983 0 1781 13 0 13 13 0 8 6
lockfpl 104 30 0 27 1 0 1 1 0 8 0
lockfspl 48 14 0 11 1 0 1 1 0 8 0
sessionpl 144 25 0 17 1 0 1 1 0 8 0
pgrppl 48 34 0 19 1 0 1 1 0 8 0
ucredpl 104 127 0 116 1 0 1 1 0 8 0
zombiepl 144 456 0 455 1 0 1 1 0 8 0
processpl 1160 492 0 455 4 0 4 4 0 8 1
procpl 664 563 0 523 5 0 5 5 0 8 1
sockpl 552 279 0 251 7 0 7 7 0 8 4
mcl64k 65536 5 0 5 1 0 1 1 0 8 1
mcl16k 16384 3 0 3 1 0 1 1 0 8 1
mcl12k 12288 2 0 2 1 0 1 1 0 8 1
mcl8k 8192 7 0 7 1 0 1 1 0 8 1
mcl4k 4096 2537 0 2473 13 0 13 13 0 8 4
mcl2k 2048 195 0 194 4 0 4 4 0 8 3
mextrefs 64 93 0 92 1 0 1 1 0 8 0
mtagpl 96 4 0 4 1 0 1 1 0 8 1
mbufpl 256 4997 0 4834 17 0 17 17 0 8 2
bufpl 272 2457 0 102 157 0 157 157 0 8 0
anonpl 24 88410 0 85670 21 0 21 21 0 187 0
amapchunkpl 152 9520 0 9181 26 0 26 26 0 158 11
amappl16 200 1347 0 1331 4 0 4 4 0 8 2
amappl15 192 3 0 3 1 0 1 1 0 8 1
amappl14 184 421 0 420 1 0 1 1 0 8 0
amappl13 176 117 0 107 1 0 1 1 0 8 0
amappl12 168 722 0 699 2 0 2 2 0 8 0
amappl11 160 4 0 4 1 0 1 1 0 8 1
amappl10 152 77 0 67 1 0 1 1 0 8 0
amappl9 144 274 0 274 1 0 1 1 0 8 1
amappl8 136 106 0 105 1 0 1 1 0 8 0
amappl7 128 140 0 129 1 0 1 1 0 8 0
amappl6 120 176 0 174 1 0 1 1 0 8 0
amappl5 112 91 0 84 1 0 1 1 0 8 0
amappl4 104 261 0 245 1 0 1 1 0 8 0
amappl3 96 1684 0 1619 3 0 3 3 0 8 0
amappl2 88 588 0 527 2 0 2 2 0 8 0
amappl1 80 10539 0 10020 12 0 12 12 0 8 0
amappl 88 2675 0 2557 4 0 4 4 0 92 0
uvmvnodes 80 99 0 0 3 0 3 3 0 8 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 3 0 1 1 0 1 1 0 8 0
uaddrrnd 24 479 0 455 1 0 1 1 0 8 0
uaddrbest 32 2 0 0 1 0 1 1 0 8 0
uaddr 24 479 0 455 1 0 1 1 0 8 0
vmmpekpl 168 6115 0 6077 2 0 2 2 0 8 0
vmmpepl 168 39602 0 38098 79 0 79 79 0 357 7
vmsppl 368 478 0 455 4 0 4 4 0 8 1
rwobjpl 40 14411 0 13552 10 0 10 10 0 8 0
pdppl 4096 966 0 912 90 30 60 76 0 8 6
pvpl 32 225445 0 217644 78 0 78 78 0 265 4
pmappl 216 479 0 456 2 0 2 2 0 8 0
extentpl 40 45 0 27 1 0 1 1 0 8 0
phpool 112 522 0 30 15 0 15 15 0 8 0
ddb> machine ddbcpu 0
No such command
ddb> trace
db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438
panic(ffffffff8349d0f1) at panic+0x1cf sys/kern/subr_prf.c:198
__assert(ffffffff834db500,ffffffff8353c17a,3bf,ffffffff8351592a) at __assert+0x29 sys/kern/subr_prf.c:-1
refcnt_finalize(ffff80002a807758,ffffffff83491539) at refcnt_finalize+0x1e7 sys/kern/kern_synch.c:960
pppx_if_destroy(ffff80002a8ac000,ffff80002a807750) at pppx_if_destroy+0x3d sys/net/if_pppx.c:794
pppxclose(285b9a,41,2000,ffff80002a7967e8) at pppxclose+0xa0 sys/net/if_pppx.c:541
spec_close(ffff80002a803430) at spec_close+0x417 sys/kern/spec_vnops.c:-1
VOP_CLOSE(fffffa006c88b038,41,fffffa0007ffd618,ffff80002a7967e8) at VOP_CLOSE+0x129 sys/kern/vfs_vops.c:156
vn_closefile(fffffa006d4889f0,ffff80002a7967e8) at vn_closefile+0x11d vn_close sys/kern/vfs_vnops.c:298 [inline]
vn_closefile(fffffa006d4889f0,ffff80002a7967e8) at vn_closefile+0x11d sys/kern/vfs_vnops.c:621
fdrop(fffffa006d4889f0,ffff80002a7967e8) at fdrop+0x121 sys/kern/kern_descrip.c:1281
closef(fffffa006d4889f0,ffff80002a7967e8) at closef+0x190 sys/kern/kern_descrip.c:1265
sys_closefrom(ffff80002a7967e8,ffff80002a8036f0,ffff80002a803640) at sys_closefrom+0x13c sys/kern/kern_descrip.c:1471
syscall(ffff80002a8036f0) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline]
syscall(ffff80002a8036f0) at syscall+0x962 sys/arch/amd64/amd64/trap.c:791
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0xd7e48ba8990, count: -14
ddb> machine ddbcpu 1
No such command
ddb> trace
db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438
panic(ffffffff8349d0f1) at panic+0x1cf sys/kern/subr_prf.c:198
__assert(ffffffff834db500,ffffffff8353c17a,3bf,ffffffff8351592a) at __assert+0x29 sys/kern/subr_prf.c:-1
refcnt_finalize(ffff80002a807758,ffffffff83491539) at refcnt_finalize+0x1e7 sys/kern/kern_synch.c:960
pppx_if_destroy(ffff80002a8ac000,ffff80002a807750) at pppx_if_destroy+0x3d sys/net/if_pppx.c:794
pppxclose(285b9a,41,2000,ffff80002a7967e8) at pppxclose+0xa0 sys/net/if_pppx.c:541
spec_close(ffff80002a803430) at spec_close+0x417 sys/kern/spec_vnops.c:-1
VOP_CLOSE(fffffa006c88b038,41,fffffa0007ffd618,ffff80002a7967e8) at VOP_CLOSE+0x129 sys/kern/vfs_vops.c:156
vn_closefile(fffffa006d4889f0,ffff80002a7967e8) at vn_closefile+0x11d vn_close sys/kern/vfs_vnops.c:298 [inline]
vn_closefile(fffffa006d4889f0,ffff80002a7967e8) at vn_closefile+0x11d sys/kern/vfs_vnops.c:621
fdrop(fffffa006d4889f0,ffff80002a7967e8) at fdrop+0x121 sys/kern/kern_descrip.c:1281
closef(fffffa006d4889f0,ffff80002a7967e8) at closef+0x190 sys/kern/kern_descrip.c:1265
sys_closefrom(ffff80002a7967e8,ffff80002a8036f0,ffff80002a803640) at sys_closefrom+0x13c sys/kern/kern_descrip.c:1471
syscall(ffff80002a8036f0) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline]
syscall(ffff80002a8036f0) at syscall+0x962 sys/arch/amd64/amd64/trap.c:791
Xsyscall() at Xsyscall+0x128
end of kernel
end trace frame: 0xd7e48ba8990, count: -14