panic: kernel diagnostic assertion "refs != ~0" failed: file "/syzkaller/managers/main/kernel/sys/kern/kern_synch.c", line 955 Stopped at db_enter+0x25: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *464155 20171 0 0 0x4000000 0 syz-executor db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff83483052) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff834c4f02,ffffffff835248d0,3bb,ffffffff834fdbeb) at __assert+0x29 sys/kern/subr_prf.c:-1 refcnt_finalize(ffff8000ffff7760,ffffffff83480d5a) at refcnt_finalize+0x1c8 sys/kern/kern_synch.c:956 pppx_if_destroy(0,ffff8000ffff7758) at pppx_if_destroy+0x3d sys/net/if_pppx.c:794 pppxclose(285b9a,1,2000,ffff80003c8fa7e8) at pppxclose+0xa0 sys/net/if_pppx.c:541 spec_close(ffff80002a7fd5f0) at spec_close+0x417 sys/kern/spec_vnops.c:-1 VOP_CLOSE(fffff7806b6c7628,1,fffff78007ffd750,ffff80003c8fa7e8) at VOP_CLOSE+0x129 sys/kern/vfs_vops.c:156 vn_closefile(fffff78067c9f9f0,ffff80003c8fa7e8) at vn_closefile+0x11d vn_close sys/kern/vfs_vnops.c:298 [inline] vn_closefile(fffff78067c9f9f0,ffff80003c8fa7e8) at vn_closefile+0x11d sys/kern/vfs_vnops.c:621 fdrop(fffff78067c9f9f0,ffff80003c8fa7e8) at fdrop+0x121 sys/kern/kern_descrip.c:1281 closef(fffff78067c9f9f0,ffff80003c8fa7e8) at closef+0x190 sys/kern/kern_descrip.c:1265 sys_closefrom(ffff80003c8fa7e8,ffff80002a7fd8b0,ffff80002a7fd800) at sys_closefrom+0x13c sys/kern/kern_descrip.c:1471 syscall(ffff80002a7fd8b0) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80002a7fd8b0) at syscall+0x962 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x56e5b3dbd80, 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 955 ddb> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff83483052) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff834c4f02,ffffffff835248d0,3bb,ffffffff834fdbeb) at __assert+0x29 sys/kern/subr_prf.c:-1 refcnt_finalize(ffff8000ffff7760,ffffffff83480d5a) at refcnt_finalize+0x1c8 sys/kern/kern_synch.c:956 pppx_if_destroy(0,ffff8000ffff7758) at pppx_if_destroy+0x3d sys/net/if_pppx.c:794 pppxclose(285b9a,1,2000,ffff80003c8fa7e8) at pppxclose+0xa0 sys/net/if_pppx.c:541 spec_close(ffff80002a7fd5f0) at spec_close+0x417 sys/kern/spec_vnops.c:-1 VOP_CLOSE(fffff7806b6c7628,1,fffff78007ffd750,ffff80003c8fa7e8) at VOP_CLOSE+0x129 sys/kern/vfs_vops.c:156 vn_closefile(fffff78067c9f9f0,ffff80003c8fa7e8) at vn_closefile+0x11d vn_close sys/kern/vfs_vnops.c:298 [inline] vn_closefile(fffff78067c9f9f0,ffff80003c8fa7e8) at vn_closefile+0x11d sys/kern/vfs_vnops.c:621 fdrop(fffff78067c9f9f0,ffff80003c8fa7e8) at fdrop+0x121 sys/kern/kern_descrip.c:1281 closef(fffff78067c9f9f0,ffff80003c8fa7e8) at closef+0x190 sys/kern/kern_descrip.c:1265 sys_closefrom(ffff80003c8fa7e8,ffff80002a7fd8b0,ffff80002a7fd800) at sys_closefrom+0x13c sys/kern/kern_descrip.c:1471 syscall(ffff80002a7fd8b0) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80002a7fd8b0) at syscall+0x962 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x56e5b3dbd80, count: -14 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80002a7fd3d0 rbx 0 rdx 0 rcx 0 rax 0xffff80003c8fa7e8 r8 0x101010101010101 r9 0x8080808080808080 r10 0xab1b3225ee6395cf r11 0x85e7cfbb584b3146 r12 0 r13 0 r14 0 r15 0x1 rip 0xffffffff81849d45 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff80002a7fd3c0 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb> show proc PROC (syz-executor) tid=464155 pid=20171 tcnt=3 stat=onproc flags process=0 proc=4000000 runpri=32, usrpri=81, slppri=32, nice=20 wchan=0x0, wmesg=, ps_single=0x0 scnt=0 ecnt=0 forw=0xffffffffffffffff, list=0xffff80003c8fa020,0xffff80002a736a78 process=0xffff8000ffff8d98 user=0xffff80002a7f8000, vmspace=0xfffff7806cbef460 estcpu=31, cpticks=1, pctcpu=0.0, user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 16102 288248 19312 0 2 0x10 syz-executor 16102 458984 19312 0 3 0x4000090 fsleep syz-executor 44528 414730 39475 0 2 0 syz-executor 44528 183845 39475 0 2 0x4000000 syz-executor 20171 143421 72100 0 2 0 syz-executor *20171 464155 72100 0 7 0x4000000 syz-executor 20171 118606 72100 0 3 0x4000080 fsleep syz-executor 57400 210317 19764 -1 2 0xc90 syz-executor 57400 198719 19764 -1 3 0x4000090 pipewr syz-executor 57400 162496 19764 -1 3 0x4000090 pipewr syz-executor 57400 116502 19764 -1 3 0x4000090 fsleep syz-executor 61174 332859 86637 0 3 0x80 nanoslp syz-executor 61174 395799 86637 0 3 0x4000080 pipewr syz-executor 61174 53130 86637 0 3 0x4000080 pipewr syz-executor 39475 440637 93378 0 2 0xc82 syz-executor 86637 412240 93378 0 3 0x82 nanoslp syz-executor 25733 393893 93378 0 2 0x2 syz-executor 46798 178860 93378 0 2 0x2 syz-executor 19312 93902 93378 0 2 0xc82 syz-executor 19764 292742 93378 0 3 0x82 nanoslp syz-executor 72100 221556 93378 0 3 0x82 nanoslp syz-executor 33649 111493 93378 0 3 0x82 wait syz-executor 93378 318963 76392 0 3 0x82 kqread syz-executor 76392 279019 15610 0 3 0x10008a sigsusp ksh 15610 89375 77689 0 3 0x98 kqread sshd-session 77689 209897 14895 0 3 0x92 kqread sshd-session 75617 238894 1 0 3 0x100083 ttyin getty 14895 368369 1 0 3 0x88 kqread sshd 59435 517650 98134 73 2 0x1100090 syslogd 98134 273103 1 0 3 0x100082 sbwait syslogd 32836 475569 1 0 3 0x100080 kqread resolvd 31863 298441 39556 77 2 0x100012 dhcpleased 53986 267961 39556 77 3 0x100092 kqread dhcpleased 39556 428729 1 0 3 0x80 kqread dhcpleased 88663 275641 0 0 3 0x14200 bored smr 12138 500891 0 0 2 0x14200 zerothread 50435 48130 0 0 3 0x14200 aiodoned aiodoned 77924 452828 0 0 3 0x14200 syncer update 42878 185888 0 0 3 0x14200 cleaner cleaner 19447 55476 0 0 3 0x14200 reaper reaper 29515 28730 0 0 3 0x14200 pgdaemon pagedaemon 39260 271034 0 0 3 0x14200 bored viomb 6039 398856 0 0 3 0x40014200 acpi0 acpi0 41099 197455 0 0 2 0x14200 softnet0 85439 385793 0 0 3 0x14200 smrbar systqmp 82845 48359 0 0 3 0x14200 bored systq 7162 360439 0 0 3 0x40014200 tmoslp softclock 24374 23135 0 0 3 0x40014200 idle0 1 422685 0 0 3 0x82 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 11068 12114K 12379K 166960K 12759 0 pcb 18 13K 13K 166960K 92 0 rtable 243 7K 8K 166960K 539 0 pf 32 13K 20K 166960K 283 0 ifaddr 39 6K 7K 166960K 81 0 ifgroup 50 2K 2K 166960K 135 0 sysctl 4 1K 9K 166960K 15 0 counters 34 17K 18K 166960K 62 0 ioctlops 0 0K 4K 166960K 186 0 iov 0 0K 16K 166960K 16 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1359 86K 86K 166960K 2036 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 5K 166960K 10 0 VM map 2 1K 1K 166960K 2 0 sem 12 1K 1K 166960K 98 0 dirhash 12 2K 2K 166960K 12 0 ACPI 1692 195K 286K 166960K 12470 0 file desc 16 57K 97K 166960K 633 0 sigio 0 0K 0K 166960K 6 0 proc 61 59K 124K 166960K 623 0 subproc 72 4K 4K 166960K 99 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 0 0K 0K 166960K 43 0 in_multi 88 6K 7K 166960K 158 0 ether_multi 1 0K 0K 166960K 5 0 mrt 1 0K 0K 166960K 10 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 493 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 219 150K 167K 166960K 6944 0 UVM aobj 77 3K 3K 166960K 84 0 pinsyscall 37 74K 96K 166960K 1821 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 2 0K 0K 166960K 18 0 NDP 12 0K 2K 166960K 55 0 temp 75 9116K 9180K 166960K 28455 0 kqueue 15 24K 28K 166960K 96 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 130 0 127 3 2 1 3 0 8 0 rtentry 136 168 0 60 5 0 5 5 0 8 0 unpcb 144 627 0 612 6 5 1 6 0 8 0 syncache 336 7 0 7 1 1 0 1 0 8 0 tcpcb 736 186 0 181 5 4 1 5 0 8 0 arp 96 24 0 8 1 0 1 1 0 8 0 ipq 40 3 0 0 1 0 1 1 0 8 0 ipqe 40 3 0 0 1 0 1 1 0 8 0 inpcb 328 567 0 555 7 5 2 7 0 8 0 ip6q 72 5 0 3 1 0 1 1 0 8 0 ip6af 40 8 0 6 1 0 1 1 0 8 0 nd6 112 43 0 16 1 0 1 1 0 8 0 pkpcb 40 3 0 3 1 1 0 1 0 8 0 kcovpl 48 11 0 3 1 0 1 1 0 8 0 mppekey 1024 1 0 1 1 1 0 1 0 8 0 ppxss 1072 16 0 15 2 1 1 1 0 8 0 pppxif 1416 8 0 7 2 1 1 1 0 8 0 pfstscr 40 1 0 0 1 0 1 1 0 8 0 pfrktable 1344 3 0 3 1 1 0 1 0 8 0 pfsrclim 320 5 0 4 1 0 1 1 0 8 0 pfanchor 1288 7 0 2 1 0 1 1 0 8 0 pfstitem 24 2 0 0 1 0 1 1 0 8 0 pfstkey 128 2 0 0 1 0 1 1 0 8 0 pfstate 384 1 0 0 1 0 1 1 0 8 0 pfrule 1360 7 0 7 1 1 0 1 0 8 0 art_heap8 4096 3 0 0 3 0 3 3 0 8 0 art_heap4 256 736 0 229 33 1 32 33 0 8 0 art_table 40 739 0 229 6 0 6 6 0 8 0 art_node 32 168 0 67 1 0 1 1 0 8 0 semapl 72 95 0 85 1 0 1 1 0 8 0 shmpl 112 81 0 7 3 0 3 3 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 2493 0 1030 92 0 92 92 0 8 0 ffsino 256 2493 0 1030 92 0 92 92 0 8 0 nchpl 144 3345 0 1640 64 0 64 64 0 8 0 rtmask 32 1 0 1 1 1 0 1 0 8 0 vnodes 216 2969 0 0 165 0 165 165 0 8 0 namei 1024 11259 0 11258 3 2 1 2 0 8 0 pfiaddrpl 120 1 0 1 1 1 0 1 0 8 0 acpiwqpl 32 1 0 1 1 0 1 1 1 8 1 kstatmem 264 63 0 40 2 0 2 2 0 8 0 scsiplug 72 1 0 1 1 1 0 1 0 8 0 scxspl 216 11114 0 11114 9 7 2 8 1 8 2 plimitpl 152 129 0 113 1 0 1 1 0 8 0 sigapl 424 925 0 884 6 1 5 6 0 8 0 knotepl 120 19088 0 19038 17 14 3 17 0 8 0 kqueuepl 184 136 0 124 1 0 1 1 0 8 0 pipepl 304 161 0 132 3 0 3 3 0 8 0 fdescpl 448 912 0 884 5 1 4 5 0 8 0 filepl 120 5554 0 5270 17 6 11 16 0 8 1 lockfpl 104 293 0 291 2 1 1 2 0 8 0 lockfspl 48 74 0 72 1 0 1 1 0 8 0 sessionpl 144 70 0 62 1 0 1 1 0 8 0 pgrppl 48 87 0 71 1 0 1 1 0 8 0 ucredpl 104 1243 0 1230 1 0 1 1 0 8 0 zombiepl 144 885 0 884 1 0 1 1 0 8 0 processpl 1152 925 0 884 4 0 4 4 0 8 0 procpl 664 1593 0 1543 6 1 5 6 0 8 0 sosppl 176 1 0 1 1 1 0 1 0 8 0 sockpl 552 1338 0 1307 19 16 3 15 0 8 0 mcl64k 65536 32 0 32 1 1 0 1 0 8 0 mcl8k 8192 11 0 11 1 1 0 1 0 8 0 mcl4k 4096 3119 0 3057 15 6 9 14 0 8 0 mcl2k 2048 609 0 603 4 0 4 4 0 8 2 mtagpl 96 9 0 6 1 0 1 1 0 8 0 mbufpl 256 9484 0 9297 22 6 16 21 0 8 0 bufpl 280 3554 0 103 247 0 247 247 0 8 0 anonpl 24 130774 0 127569 33 10 23 33 0 186 0 amapchunkpl 152 23074 0 22616 36 15 21 35 0 158 0 amappl16 200 1888 0 1862 4 1 3 4 0 8 0 amappl15 192 5 0 5 1 1 0 1 0 8 0 amappl14 184 451 0 450 1 0 1 1 0 8 0 amappl13 176 121 0 111 1 0 1 1 0 8 0 amappl12 168 1169 0 1141 2 0 2 2 0 8 0 amappl11 160 32 0 32 1 1 0 1 0 8 0 amappl10 152 92 0 82 1 0 1 1 0 8 0 amappl9 144 269 0 269 1 1 0 1 0 8 0 amappl8 136 120 0 118 1 0 1 1 0 8 0 amappl7 128 170 0 159 1 0 1 1 0 8 0 amappl6 120 182 0 180 1 0 1 1 0 8 0 amappl5 112 99 0 91 1 0 1 1 0 8 0 amappl4 104 282 0 265 1 0 1 1 0 8 0 amappl3 96 4506 0 4401 4 1 3 4 0 8 0 amappl2 88 550 0 496 2 0 2 2 0 8 0 amappl1 80 12727 0 12175 13 1 12 13 0 8 0 amappl 88 6105 0 5948 5 1 4 5 0 92 0 uvmvnodes 80 110 0 0 3 0 3 3 0 8 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 7 0 7 1 1 0 1 0 8 0 dma128 128 254 0 254 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 83 0 7 2 0 2 2 0 8 0 uaddrrnd 24 912 0 884 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 912 0 884 1 0 1 1 0 8 0 vmmpekpl 168 8530 0 8478 3 0 3 3 0 8 0 vmmpepl 168 64440 0 62708 82 1 81 82 0 357 0 vmsppl 368 911 0 884 4 1 3 4 0 8 0 rwobjpl 40 19495 0 18465 11 0 11 11 0 8 0 pdppl 4096 1830 0 1768 108 42 66 82 0 8 4 pvpl 32 391450 0 382864 106 19 87 100 0 265 0 pmappl 216 911 0 884 3 0 3 3 0 8 0 extentpl 40 45 0 27 1 0 1 1 0 8 0 phpool 112 397 0 70 11 0 11 11 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(ffffffff83483052) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff834c4f02,ffffffff835248d0,3bb,ffffffff834fdbeb) at __assert+0x29 sys/kern/subr_prf.c:-1 refcnt_finalize(ffff8000ffff7760,ffffffff83480d5a) at refcnt_finalize+0x1c8 sys/kern/kern_synch.c:956 pppx_if_destroy(0,ffff8000ffff7758) at pppx_if_destroy+0x3d sys/net/if_pppx.c:794 pppxclose(285b9a,1,2000,ffff80003c8fa7e8) at pppxclose+0xa0 sys/net/if_pppx.c:541 spec_close(ffff80002a7fd5f0) at spec_close+0x417 sys/kern/spec_vnops.c:-1 VOP_CLOSE(fffff7806b6c7628,1,fffff78007ffd750,ffff80003c8fa7e8) at VOP_CLOSE+0x129 sys/kern/vfs_vops.c:156 vn_closefile(fffff78067c9f9f0,ffff80003c8fa7e8) at vn_closefile+0x11d vn_close sys/kern/vfs_vnops.c:298 [inline] vn_closefile(fffff78067c9f9f0,ffff80003c8fa7e8) at vn_closefile+0x11d sys/kern/vfs_vnops.c:621 fdrop(fffff78067c9f9f0,ffff80003c8fa7e8) at fdrop+0x121 sys/kern/kern_descrip.c:1281 closef(fffff78067c9f9f0,ffff80003c8fa7e8) at closef+0x190 sys/kern/kern_descrip.c:1265 sys_closefrom(ffff80003c8fa7e8,ffff80002a7fd8b0,ffff80002a7fd800) at sys_closefrom+0x13c sys/kern/kern_descrip.c:1471 syscall(ffff80002a7fd8b0) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80002a7fd8b0) at syscall+0x962 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x56e5b3dbd80, 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(ffffffff83483052) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff834c4f02,ffffffff835248d0,3bb,ffffffff834fdbeb) at __assert+0x29 sys/kern/subr_prf.c:-1 refcnt_finalize(ffff8000ffff7760,ffffffff83480d5a) at refcnt_finalize+0x1c8 sys/kern/kern_synch.c:956 pppx_if_destroy(0,ffff8000ffff7758) at pppx_if_destroy+0x3d sys/net/if_pppx.c:794 pppxclose(285b9a,1,2000,ffff80003c8fa7e8) at pppxclose+0xa0 sys/net/if_pppx.c:541 spec_close(ffff80002a7fd5f0) at spec_close+0x417 sys/kern/spec_vnops.c:-1 VOP_CLOSE(fffff7806b6c7628,1,fffff78007ffd750,ffff80003c8fa7e8) at VOP_CLOSE+0x129 sys/kern/vfs_vops.c:156 vn_closefile(fffff78067c9f9f0,ffff80003c8fa7e8) at vn_closefile+0x11d vn_close sys/kern/vfs_vnops.c:298 [inline] vn_closefile(fffff78067c9f9f0,ffff80003c8fa7e8) at vn_closefile+0x11d sys/kern/vfs_vnops.c:621 fdrop(fffff78067c9f9f0,ffff80003c8fa7e8) at fdrop+0x121 sys/kern/kern_descrip.c:1281 closef(fffff78067c9f9f0,ffff80003c8fa7e8) at closef+0x190 sys/kern/kern_descrip.c:1265 sys_closefrom(ffff80003c8fa7e8,ffff80002a7fd8b0,ffff80002a7fd800) at sys_closefrom+0x13c sys/kern/kern_descrip.c:1471 syscall(ffff80002a7fd8b0) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80002a7fd8b0) at syscall+0x962 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x56e5b3dbd80, count: -14