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 db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff834b0e3d) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff834ef8d1,ffffffff835514c2,3bf,ffffffff8352a5c9) at __assert+0x29 sys/kern/subr_prf.c:-1 refcnt_finalize(ffff80003c8fb1d0,ffffffff834a3634) at refcnt_finalize+0x1e7 sys/kern/kern_synch.c:960 pppx_if_destroy(285b9a,ffff80003c8fb1c8) at pppx_if_destroy+0x3d sys/net/if_pppx.c:794 pppxclose(285b9a,81,2000,ffff80003c8f1778) at pppxclose+0xa0 sys/net/if_pppx.c:541 spec_close(ffff8000314a99f0) at spec_close+0x426 sys/kern/spec_vnops.c:-1 VOP_CLOSE(fffff4006c084ca8,81,fffff40007ffd680,ffff80003c8f1778) at VOP_CLOSE+0x129 sys/kern/vfs_vops.c:156 vn_closefile(fffff4006c055718,ffff80003c8f1778) at vn_closefile+0x11d vn_close sys/kern/vfs_vnops.c:298 [inline] vn_closefile(fffff4006c055718,ffff80003c8f1778) at vn_closefile+0x11d sys/kern/vfs_vnops.c:621 fdrop(fffff4006c055718,ffff80003c8f1778) at fdrop+0x121 sys/kern/kern_descrip.c:1281 closef(fffff4006c055718,ffff80003c8f1778) at closef+0x190 sys/kern/kern_descrip.c:1265 fdfree(ffff80003c8f1778) at fdfree+0x115 sys/kern/kern_descrip.c:1196 exit1(ffff80003c8f1778,0,0,1) at exit1+0x595 sys/kern/kern_exit.c:215 sys_exit(ffff80003c8f1778,ffff8000314a9d50,ffff8000314a9ca0) at sys_exit+0x1a sys/kern/kern_exit.c:-1 end trace frame: 0xffff8000314a9d40, count: 0 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(ffffffff834b0e3d) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff834ef8d1,ffffffff835514c2,3bf,ffffffff8352a5c9) at __assert+0x29 sys/kern/subr_prf.c:-1 refcnt_finalize(ffff80003c8fb1d0,ffffffff834a3634) at refcnt_finalize+0x1e7 sys/kern/kern_synch.c:960 pppx_if_destroy(285b9a,ffff80003c8fb1c8) at pppx_if_destroy+0x3d sys/net/if_pppx.c:794 pppxclose(285b9a,81,2000,ffff80003c8f1778) at pppxclose+0xa0 sys/net/if_pppx.c:541 spec_close(ffff8000314a99f0) at spec_close+0x426 sys/kern/spec_vnops.c:-1 VOP_CLOSE(fffff4006c084ca8,81,fffff40007ffd680,ffff80003c8f1778) at VOP_CLOSE+0x129 sys/kern/vfs_vops.c:156 vn_closefile(fffff4006c055718,ffff80003c8f1778) at vn_closefile+0x11d vn_close sys/kern/vfs_vnops.c:298 [inline] vn_closefile(fffff4006c055718,ffff80003c8f1778) at vn_closefile+0x11d sys/kern/vfs_vnops.c:621 fdrop(fffff4006c055718,ffff80003c8f1778) at fdrop+0x121 sys/kern/kern_descrip.c:1281 closef(fffff4006c055718,ffff80003c8f1778) at closef+0x190 sys/kern/kern_descrip.c:1265 fdfree(ffff80003c8f1778) at fdfree+0x115 sys/kern/kern_descrip.c:1196 exit1(ffff80003c8f1778,0,0,1) at exit1+0x595 sys/kern/kern_exit.c:215 sys_exit(ffff80003c8f1778,ffff8000314a9d50,ffff8000314a9ca0) at sys_exit+0x1a sys/kern/kern_exit.c:-1 syscall(ffff8000314a9d50) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff8000314a9d50) at syscall+0x962 sys/arch/amd64/amd64/trap.c:791 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x76acec619370, count: -16 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff8000314a97c0 rbx 0x1 rdx 0 rcx 0 rax 0xffff80003c8f1778 r8 0x101010101010101 r9 0x8080808080808080 r10 0xd4e409ed60178e79 r11 0xacf6ef491545fc0e r12 0 r13 0 r14 0 r15 0x1 rip 0xffffffff8139ee25 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff8000314a97b0 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb> show proc PROC (syz-executor) tid=343331 pid=84560 tcnt=0 stat=onproc flags process=1008 proc=2000 runpri=32, usrpri=86, slppri=32, nice=20 wchan=0x0, wmesg=, ps_single=0xffff80003c8f1778 scnt=-1 ecnt=1 forw=0xffffffffffffffff, list=0xffff80003c8f0fb0,0xffff80003c8f14f0 process=0xffff80003a4c84a0 user=0xffff8000314a4000, vmspace=0xfffff4006c15c5d8 estcpu=36, cpticks=1, pctcpu=0.0, user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S PRLAGS PFLAGS WAIT COMMAND 54519 385252 44518 0 2 0 0 syz-executor 54519 497863 44518 0 3 0 0x4000000 smrbar syz-executor 31457 67282 8853 0 2 0x100002 0 sh 71531 241263 63348 0 2 0x100002 0 sh 77067 327436 94187 0 2 0 0 syz-executor 77067 263177 94187 0 3 0 0x4000080 sbwait syz-executor 77067 193782 94187 0 3 0 0x4000080 sbufrcv syz-executor 21486 462838 73727 0 2 0 0 syz-executor 21486 448689 73727 0 2 0 0x4000000 syz-executor 24515 290319 79006 0 2 0x10 0 syz-executor 24515 286220 79006 0 2 0x10 0x4000000 syz-executor 25499 479391 13085 0 2 0 0 syz-executor 94187 305386 48999 0 2 0x2 0xc80 syz-executor 79006 405725 48999 0 2 0x2 0xc80 syz-executor 44518 4126 48999 0 2 0x2 0xc80 syz-executor 63348 387672 48999 0 3 0x2 0x80 wait syz-executor 8853 170748 48999 0 3 0x2 0x80 wait syz-executor 13085 388210 48999 0 2 0x2 0xc80 syz-executor 73727 358123 48999 0 2 0x2 0xc80 syz-executor 20303 327962 48999 0 2 0x2 0xc80 syz-executor 48999 321023 55344 0 3 0x2 0x80 kqread syz-executor 55344 20649 69212 0 3 0x100002 0x88 sigsusp ksh 69212 427638 52735 0 3 0x10 0x88 kqread sshd-session 52735 432129 49247 0 3 0x12 0x80 kqread sshd-session 73629 290819 1 0 3 0x100003 0x80 ttyin getty 49247 513149 1 0 3 0 0x88 kqread sshd 30306 190910 37508 73 3 0x1100010 0x80 kqread syslogd 37508 464475 1 0 3 0x100002 0x80 sbwait syslogd-parent 54382 88558 1 0 3 0x100000 0x80 kqread resolvd 35157 460084 55962 77 3 0x100012 0x80 kqread dhcpleased 18737 380668 55962 77 3 0x100012 0x80 kqread dhcpleased 55962 434026 1 0 3 0 0x80 kqread dhcpleased 42360 10750 0 0 3 0x14000 0x200 bored smr 58553 149586 0 0 2 0x14000 0x200 zerothread 58231 406647 0 0 3 0x14000 0x200 aiodoned aiodoned 1100 436150 0 0 3 0x14000 0x200 syncer update 47499 350463 0 0 3 0x14000 0x200 cleaner cleaner 12685 203044 0 0 3 0x14000 0x200 reaper reaper 84166 209069 0 0 3 0x14000 0x200 pgdaemon pagedaemon 18059 87698 0 0 3 0x14000 0x200 bored viomb 94306 68760 0 0 3 0x14000 0x40000200 acpi0 acpi0 33183 39651 0 0 3 0x14000 0x200 bored softnet0 16493 23216 0 0 3 0x14000 0x200 smrbar systqmp 65832 88200 0 0 3 0x14000 0x200 bored systq 28386 448714 0 0 3 0x14000 0x40000200 tmoslp softclock 28781 223619 0 0 3 0x14000 0x40000200 idle0 1 21590 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 12103K 12118K 166960K 12118 0 pcb 18 12K 12K 166960K 18 0 rtable 219 7K 7K 166960K 328 0 pf 33 13K 13K 166960K 37 0 ifaddr 42 7K 7K 166960K 44 0 ifgroup 55 2K 2K 166960K 55 0 sysctl 1 1K 9K 166960K 5 0 counters 35 18K 18K 166960K 35 0 ioctlops 0 0K 4K 166960K 34 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1292 81K 81K 166960K 1361 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 3 0K 0K 166960K 3 0 dirhash 12 2K 2K 166960K 12 0 ACPI 1692 195K 286K 166960K 12472 0 file desc 18 65K 97K 166960K 139 0 proc 58 59K 124K 166960K 490 0 subproc 72 4K 4K 166960K 72 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 0 0K 0K 166960K 2 0 in_multi 90 6K 6K 166960K 90 0 ether_multi 1 0K 0K 166960K 1 0 mrt 0 0K 0K 166960K 1 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 37 175K 175K 166960K 37 0 exec 0 0K 1K 166960K 367 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 202 136K 141K 166960K 2828 0 UVM aobj 3 2K 2K 166960K 3 0 pinsyscall 39 78K 96K 166960K 1218 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 NDP 26 1K 1K 166960K 26 0 temp 34 9114K 9134K 166960K 3188 0 kqueue 14 22K 24K 166960K 31 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 37 0 32 1 0 1 1 0 8 0 rtentry 136 105 0 2 4 0 4 4 0 8 0 unpcb 144 43 0 22 1 0 1 1 0 8 0 syncache 336 4 0 4 1 0 1 1 0 8 1 tcpcb 736 9 0 5 1 0 1 1 0 8 0 arp 96 17 0 0 1 0 1 1 0 8 0 inpcb 328 63 0 55 2 0 2 2 0 8 1 nd6 112 20 0 0 1 0 1 1 0 8 0 kcovpl 48 8 0 0 1 0 1 1 0 8 0 ppxss 1072 1 0 0 1 0 1 1 0 8 0 pppxif 1416 1 0 0 1 0 1 1 0 8 0 pfrule 1360 1 0 1 1 0 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 448 0 0 28 0 28 28 0 8 0 art_table 40 449 0 0 5 0 5 5 0 8 0 art_node 32 104 0 7 1 0 1 1 0 8 0 semapl 72 1 0 0 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 1572 0 107 92 0 92 92 0 8 0 ffsino 256 1572 0 107 92 0 92 92 0 8 0 nchpl 144 1776 0 83 63 0 63 63 0 8 0 vnodes 216 1659 0 0 93 0 93 93 0 8 0 namei 1024 5816 0 5816 3 0 3 3 0 8 3 kstatmem 264 25 0 0 2 0 2 2 0 8 0 scxspl 216 6368 0 6368 4 0 4 4 1 8 4 plimitpl 152 31 0 13 1 0 1 1 0 8 0 sigapl 424 426 0 383 6 0 6 6 0 8 0 knotepl 120 2980 0 2932 2 0 2 2 0 8 0 kqueuepl 184 28 0 17 1 0 1 1 0 8 0 pipepl 304 123 0 96 3 0 3 3 0 8 0 fdescpl 448 413 0 383 5 0 5 5 0 8 0 filepl 120 1429 0 1209 7 0 7 7 0 8 0 lockfpl 104 7 0 4 1 0 1 1 0 8 0 lockfspl 48 5 0 2 1 0 1 1 0 8 0 sessionpl 144 23 0 15 1 0 1 1 0 8 0 pgrppl 48 31 0 15 1 0 1 1 0 8 0 ucredpl 104 90 0 78 1 0 1 1 0 8 0 zombiepl 144 384 0 383 1 0 1 1 0 8 0 processpl 1160 426 0 383 4 0 4 4 0 8 0 procpl 664 442 0 394 5 0 5 5 0 8 0 sockpl 552 143 0 109 3 0 3 3 0 8 0 mcl8k 8192 12 0 12 1 0 1 1 0 8 1 mcl4k 4096 2523 0 2468 13 0 13 13 0 8 4 mcl2k 2048 108 0 85 4 0 4 4 0 8 1 mextrefs 64 55 0 33 1 0 1 1 0 8 0 mtagpl 96 4 0 4 1 0 1 1 0 8 1 mbufpl 256 4340 0 4115 15 0 15 15 0 8 0 bufpl 272 2434 0 84 157 0 157 157 0 8 0 anonpl 24 80655 0 77045 23 0 23 23 0 187 0 amapchunkpl 152 7649 0 7244 18 0 18 18 0 158 1 amappl16 200 1242 0 1183 4 0 4 4 0 8 0 amappl15 192 3 0 3 1 0 1 1 0 8 1 amappl14 184 391 0 388 1 0 1 1 0 8 0 amappl13 176 107 0 97 1 0 1 1 0 8 0 amappl12 168 674 0 646 2 0 2 2 0 8 0 amappl11 160 18 0 18 1 0 1 1 0 8 1 amappl10 152 61 0 53 1 0 1 1 0 8 0 amappl9 144 279 0 279 1 0 1 1 0 8 1 amappl8 136 127 0 125 1 0 1 1 0 8 0 amappl7 128 181 0 171 1 0 1 1 0 8 0 amappl6 120 117 0 114 1 0 1 1 0 8 0 amappl5 112 129 0 123 1 0 1 1 0 8 0 amappl4 104 259 0 245 1 0 1 1 0 8 0 amappl3 96 1450 0 1352 3 0 3 3 0 8 0 amappl2 88 434 0 388 2 0 2 2 0 8 0 amappl1 80 9939 0 9390 13 0 13 13 0 8 0 amappl 88 2183 0 2042 4 0 4 4 0 92 0 uvmvnodes 80 98 0 0 2 0 2 2 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 2 0 0 1 0 1 1 0 8 0 uaddrrnd 24 413 0 383 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 413 0 383 1 0 1 1 0 8 0 vmmpekpl 168 5032 0 5005 2 0 2 2 0 8 0 vmmpepl 168 35829 0 34077 81 0 81 81 0 357 2 vmsppl 368 412 0 383 4 0 4 4 0 8 1 rwobjpl 40 13266 0 12314 11 0 11 11 0 8 0 pdppl 4096 832 0 766 92 10 82 82 0 8 16 pvpl 32 199205 0 190504 80 0 80 80 0 265 4 pmappl 216 412 0 383 3 0 3 3 0 8 0 extentpl 40 45 0 27 1 0 1 1 0 8 0 phpool 112 516 0 10 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(ffffffff834b0e3d) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff834ef8d1,ffffffff835514c2,3bf,ffffffff8352a5c9) at __assert+0x29 sys/kern/subr_prf.c:-1 refcnt_finalize(ffff80003c8fb1d0,ffffffff834a3634) at refcnt_finalize+0x1e7 sys/kern/kern_synch.c:960 pppx_if_destroy(285b9a,ffff80003c8fb1c8) at pppx_if_destroy+0x3d sys/net/if_pppx.c:794 pppxclose(285b9a,81,2000,ffff80003c8f1778) at pppxclose+0xa0 sys/net/if_pppx.c:541 spec_close(ffff8000314a99f0) at spec_close+0x426 sys/kern/spec_vnops.c:-1 VOP_CLOSE(fffff4006c084ca8,81,fffff40007ffd680,ffff80003c8f1778) at VOP_CLOSE+0x129 sys/kern/vfs_vops.c:156 vn_closefile(fffff4006c055718,ffff80003c8f1778) at vn_closefile+0x11d vn_close sys/kern/vfs_vnops.c:298 [inline] vn_closefile(fffff4006c055718,ffff80003c8f1778) at vn_closefile+0x11d sys/kern/vfs_vnops.c:621 fdrop(fffff4006c055718,ffff80003c8f1778) at fdrop+0x121 sys/kern/kern_descrip.c:1281 closef(fffff4006c055718,ffff80003c8f1778) at closef+0x190 sys/kern/kern_descrip.c:1265 fdfree(ffff80003c8f1778) at fdfree+0x115 sys/kern/kern_descrip.c:1196 exit1(ffff80003c8f1778,0,0,1) at exit1+0x595 sys/kern/kern_exit.c:215 sys_exit(ffff80003c8f1778,ffff8000314a9d50,ffff8000314a9ca0) at sys_exit+0x1a sys/kern/kern_exit.c:-1 syscall(ffff8000314a9d50) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff8000314a9d50) at syscall+0x962 sys/arch/amd64/amd64/trap.c:791 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x76acec619370, count: -16 ddb> machine ddbcpu 1 No such command ddb> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff834b0e3d) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff834ef8d1,ffffffff835514c2,3bf,ffffffff8352a5c9) at __assert+0x29 sys/kern/subr_prf.c:-1 refcnt_finalize(ffff80003c8fb1d0,ffffffff834a3634) at refcnt_finalize+0x1e7 sys/kern/kern_synch.c:960 pppx_if_destroy(285b9a,ffff80003c8fb1c8) at pppx_if_destroy+0x3d sys/net/if_pppx.c:794 pppxclose(285b9a,81,2000,ffff80003c8f1778) at pppxclose+0xa0 sys/net/if_pppx.c:541 spec_close(ffff8000314a99f0) at spec_close+0x426 sys/kern/spec_vnops.c:-1 VOP_CLOSE(fffff4006c084ca8,81,fffff40007ffd680,ffff80003c8f1778) at VOP_CLOSE+0x129 sys/kern/vfs_vops.c:156 vn_closefile(fffff4006c055718,ffff80003c8f1778) at vn_closefile+0x11d vn_close sys/kern/vfs_vnops.c:298 [inline] vn_closefile(fffff4006c055718,ffff80003c8f1778) at vn_closefile+0x11d sys/kern/vfs_vnops.c:621 fdrop(fffff4006c055718,ffff80003c8f1778) at fdrop+0x121 sys/kern/kern_descrip.c:1281 closef(fffff4006c055718,ffff80003c8f1778) at closef+0x190 sys/kern/kern_descrip.c:1265 fdfree(ffff80003c8f1778) at fdfree+0x115 sys/kern/kern_descrip.c:1196 exit1(ffff80003c8f1778,0,0,1) at exit1+0x595 sys/kern/kern_exit.c:215 sys_exit(ffff80003c8f1778,ffff8000314a9d50,ffff8000314a9ca0) at sys_exit+0x1a sys/kern/kern_exit.c:-1 syscall(ffff8000314a9d50) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff8000314a9d50) at syscall+0x962 sys/arch/amd64/amd64/trap.c:791 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x76acec619370, count: -16