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(ffffffff834b294f) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff834f0ca2,ffffffff8354f873,3bf,ffffffff8352827a) at __assert+0x29 sys/kern/subr_prf.c:-1 refcnt_finalize(ffff80003c4cf1d0,ffffffff834ac81f) at refcnt_finalize+0x1e7 sys/kern/kern_synch.c:960 pppx_if_destroy(285b9a,ffff80003c4cf1c8) at pppx_if_destroy+0x3d sys/net/if_pppx.c:794 pppxclose(285b9a,81,2000,ffff80003c8f02b8) at pppxclose+0xa0 sys/net/if_pppx.c:541 spec_close(ffff8000338af9d0) at spec_close+0x426 sys/kern/spec_vnops.c:-1 VOP_CLOSE(ffffee806bfe5948,81,ffffee8007ffd8f0,ffff80003c8f02b8) at VOP_CLOSE+0x129 sys/kern/vfs_vops.c:156 vn_closefile(ffffee806bed3268,ffff80003c8f02b8) at vn_closefile+0x11d vn_close sys/kern/vfs_vnops.c:298 [inline] vn_closefile(ffffee806bed3268,ffff80003c8f02b8) at vn_closefile+0x11d sys/kern/vfs_vnops.c:621 fdrop(ffffee806bed3268,ffff80003c8f02b8) at fdrop+0x121 sys/kern/kern_descrip.c:1281 closef(ffffee806bed3268,ffff80003c8f02b8) at closef+0x190 sys/kern/kern_descrip.c:1265 fdfree(ffff80003c8f02b8) at fdfree+0x115 sys/kern/kern_descrip.c:1196 exit1(ffff80003c8f02b8,0,0,1) at exit1+0x595 sys/kern/kern_exit.c:215 sys_exit(ffff80003c8f02b8,ffff8000338afd30,ffff8000338afc80) at sys_exit+0x1a sys/kern/kern_exit.c:-1 end trace frame: 0xffff8000338afd20, 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(ffffffff834b294f) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff834f0ca2,ffffffff8354f873,3bf,ffffffff8352827a) at __assert+0x29 sys/kern/subr_prf.c:-1 refcnt_finalize(ffff80003c4cf1d0,ffffffff834ac81f) at refcnt_finalize+0x1e7 sys/kern/kern_synch.c:960 pppx_if_destroy(285b9a,ffff80003c4cf1c8) at pppx_if_destroy+0x3d sys/net/if_pppx.c:794 pppxclose(285b9a,81,2000,ffff80003c8f02b8) at pppxclose+0xa0 sys/net/if_pppx.c:541 spec_close(ffff8000338af9d0) at spec_close+0x426 sys/kern/spec_vnops.c:-1 VOP_CLOSE(ffffee806bfe5948,81,ffffee8007ffd8f0,ffff80003c8f02b8) at VOP_CLOSE+0x129 sys/kern/vfs_vops.c:156 vn_closefile(ffffee806bed3268,ffff80003c8f02b8) at vn_closefile+0x11d vn_close sys/kern/vfs_vnops.c:298 [inline] vn_closefile(ffffee806bed3268,ffff80003c8f02b8) at vn_closefile+0x11d sys/kern/vfs_vnops.c:621 fdrop(ffffee806bed3268,ffff80003c8f02b8) at fdrop+0x121 sys/kern/kern_descrip.c:1281 closef(ffffee806bed3268,ffff80003c8f02b8) at closef+0x190 sys/kern/kern_descrip.c:1265 fdfree(ffff80003c8f02b8) at fdfree+0x115 sys/kern/kern_descrip.c:1196 exit1(ffff80003c8f02b8,0,0,1) at exit1+0x595 sys/kern/kern_exit.c:215 sys_exit(ffff80003c8f02b8,ffff8000338afd30,ffff8000338afc80) at sys_exit+0x1a sys/kern/kern_exit.c:-1 syscall(ffff8000338afd30) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff8000338afd30) at syscall+0x962 sys/arch/amd64/amd64/trap.c:791 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x76ff92c48580, count: -16 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff8000338af7a0 rbx 0x1 rdx 0 rcx 0 rax 0xffff80003c8f02b8 r8 0x101010101010101 r9 0x8080808080808080 r10 0xf85f3a79de82e56b r11 0x6404abad803f61f0 r12 0 r13 0 r14 0 r15 0x1 rip 0xffffffff82ef4905 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff8000338af790 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb> show proc PROC (syz-executor) tid=322788 pid=96313 tcnt=0 stat=onproc flags process=1008 proc=2000 runpri=32, usrpri=86, slppri=32, nice=20 wchan=0x0, wmesg=, ps_single=0xffff80003c8f02b8 scnt=-1 ecnt=1 forw=0xffffffffffffffff, list=0xffff80002a784fa8,0xffff80003c8f1a20 process=0xffff80003c4c9b48 user=0xffff8000338aa000, vmspace=0xffffee806d0ef2f0 estcpu=36, cpticks=3, pctcpu=0.0, user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S PRLAGS PFLAGS WAIT COMMAND 98297 194918 48356 0 3 0x2 0 clonelk ifconfig 51720 399062 5149 0 3 0 0x80 nanoslp syz-executor 51720 449310 5149 0 3 0 0x4000000 smrbar syz-executor 51720 24030 5149 0 3 0 0x4000080 fsleep syz-executor 85689 154683 15275 0 3 0 0x80 nanoslp syz-executor 85689 65286 15275 0 3 0 0x4000080 fsleep syz-executor 85689 148788 15275 0 3 0 0x4000080 fsleep syz-executor 85689 363779 15275 0 3 0 0x4000080 fsleep syz-executor 48356 151092 48496 0 3 0x100002 0x88 sigsusp sh 15275 22738 42925 0 3 0x2 0x80 nanoslp syz-executor 48496 204867 42925 0 3 0x2 0x80 wait syz-executor 94884 112535 42925 0 3 0x2 0x80 piperd syz-executor 60192 170730 42925 0 3 0x2 0x80 piperd syz-executor 6698 505401 42925 0 3 0x2 0x80 nanoslp syz-executor 5149 420153 42925 0 2 0x2 0xc80 syz-executor 42925 464423 75618 0 3 0x2 0x80 wait syz-executor 75618 295269 3899 0 3 0x100002 0x88 sigsusp ksh 3899 192087 94339 0 3 0x10 0x88 kqread sshd-session 94339 148791 37891 0 3 0x12 0x80 kqread sshd-session 62293 468809 1 0 3 0x100003 0x80 ttyin getty 37891 3284 1 0 3 0 0x88 kqread sshd 33104 459292 53787 73 3 0x1100010 0x80 kqread syslogd 53787 105073 1 0 3 0x100002 0x80 sbwait syslogd-parent 82820 498482 1 0 3 0x100000 0x80 kqread resolvd 63233 35245 13825 77 3 0x100012 0x80 kqread dhcpleased 18284 284001 13825 77 3 0x100012 0x80 kqread dhcpleased 13825 91672 1 0 3 0 0x80 kqread dhcpleased 19064 215785 0 0 3 0x14000 0x200 bored smr 98112 405648 0 0 2 0x14000 0x200 zerothread 40433 59175 0 0 3 0x14000 0x200 aiodoned aiodoned 24616 438848 0 0 3 0x14000 0x200 syncer update 94533 348295 0 0 3 0x14000 0x200 cleaner cleaner 30820 52085 0 0 3 0x14000 0x200 reaper reaper 36588 512885 0 0 3 0x14000 0x200 pgdaemon pagedaemon 10291 286598 0 0 3 0x14000 0x200 bored viomb 44574 435299 0 0 3 0x14000 0x40000200 acpi0 acpi0 72690 195352 0 0 3 0x14000 0x200 bored softnet0 67897 423990 0 0 3 0x14000 0x200 bored systqmp 76693 417834 0 0 3 0x14000 0x200 bored systq 78689 511771 0 0 3 0x14000 0x40000200 tmoslp softclock 65620 375483 0 0 3 0x14000 0x40000200 idle0 1 134219 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 11033 12165K 12182K 166960K 12124 0 pcb 17 12K 12K 166960K 19 0 rtable 219 6K 6K 166960K 327 0 pf 31 13K 13K 166960K 31 0 ifaddr 40 7K 7K 166960K 42 0 ifgroup 51 2K 2K 166960K 51 0 sysctl 1 1K 9K 166960K 5 0 counters 34 17K 17K 166960K 34 0 ioctlops 0 0K 2K 166960K 30 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1293 81K 82K 166960K 1362 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 1734 201K 291K 166960K 11964 0 file desc 15 53K 93K 166960K 131 0 proc 64 67K 116K 166960K 474 0 subproc 72 4K 4K 166960K 72 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 in_multi 89 6K 6K 166960K 89 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 43 201K 201K 166960K 43 0 exec 0 0K 1K 166960K 362 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 191 150K 159K 166960K 2896 0 UVM aobj 3 2K 2K 166960K 3 0 pinsyscall 36 72K 94K 166960K 1203 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 1 0 NDP 25 1K 1K 166960K 25 0 temp 33 9114K 9120K 166960K 3135 0 kqueue 13 20K 22K 166960K 27 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 34 0 31 1 0 1 1 0 8 0 rtentry 136 101 0 1 4 0 4 4 0 8 0 unpcb 144 40 0 25 1 0 1 1 0 8 0 syncache 336 4 0 4 1 0 1 1 0 8 1 tcpcb 736 9 0 4 1 0 1 1 0 8 0 arp 96 16 0 0 1 0 1 1 0 8 0 inpcb 328 60 0 51 2 0 2 2 0 8 1 nd6 112 21 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 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 414 0 0 26 0 26 26 0 8 0 art_table 40 415 0 0 5 0 5 5 0 8 0 art_node 32 101 0 10 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 1577 0 110 92 0 92 92 0 8 0 ffsino 256 1577 0 110 92 0 92 92 0 8 0 nchpl 144 1776 0 77 64 0 64 64 0 8 0 vnodes 216 1662 0 0 93 0 93 93 0 8 0 namei 1024 5789 0 5789 3 0 3 3 0 8 3 kstatmem 264 23 0 0 2 0 2 2 0 8 0 scxspl 216 6119 0 6119 4 0 4 4 1 8 4 plimitpl 152 29 0 12 1 0 1 1 0 8 0 sigapl 424 418 0 378 6 0 6 6 0 8 1 knotepl 120 2499 0 2452 2 0 2 2 0 8 0 kqueuepl 184 24 0 15 1 0 1 1 0 8 0 pipepl 304 124 0 97 3 0 3 3 0 8 0 fdescpl 448 405 0 378 5 0 5 5 0 8 1 filepl 120 1423 0 1216 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 86 0 75 1 0 1 1 0 8 0 zombiepl 144 381 0 378 1 0 1 1 0 8 0 processpl 1160 418 0 378 4 0 4 4 0 8 0 procpl 664 442 0 397 5 0 5 5 0 8 0 sockpl 552 134 0 107 3 0 3 3 0 8 0 mcl16k 16384 1 0 1 1 0 1 1 0 8 1 mcl8k 8192 12 0 12 1 0 1 1 0 8 1 mcl4k 4096 2565 0 2513 15 0 15 15 0 8 6 mcl2k 2048 102 0 102 1 0 1 1 0 8 1 mextrefs 64 31 0 31 1 0 1 1 0 8 1 mtagpl 96 4 0 4 1 0 1 1 0 8 1 mbufpl 256 4247 0 4143 10 0 10 10 0 8 1 bufpl 272 2264 0 85 146 0 146 146 0 8 0 anonpl 24 63090 0 60247 20 0 20 20 0 187 0 amapchunkpl 152 7587 0 7223 19 0 19 19 0 158 1 amappl16 200 520 0 507 3 0 3 3 0 8 2 amappl15 192 4 0 4 1 0 1 1 0 8 1 amappl14 184 386 0 384 1 0 1 1 0 8 0 amappl13 176 107 0 97 1 0 1 1 0 8 0 amappl12 168 636 0 611 2 0 2 2 0 8 0 amappl11 160 2 0 2 1 0 1 1 0 8 1 amappl10 152 60 0 52 1 0 1 1 0 8 0 amappl9 144 367 0 367 1 0 1 1 0 8 1 amappl8 136 83 0 81 1 0 1 1 0 8 0 amappl7 128 141 0 131 1 0 1 1 0 8 0 amappl6 120 107 0 105 1 0 1 1 0 8 0 amappl5 112 123 0 116 1 0 1 1 0 8 0 amappl4 104 254 0 242 1 0 1 1 0 8 0 amappl3 96 1407 0 1319 3 0 3 3 0 8 0 amappl2 88 433 0 384 2 0 2 2 0 8 0 amappl1 80 9835 0 9296 13 0 13 13 0 8 0 amappl 88 2244 0 2115 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 405 0 378 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 405 0 378 1 0 1 1 0 8 0 vmmpekpl 168 5054 0 5023 2 0 2 2 0 8 0 vmmpepl 168 34279 0 32719 78 0 78 78 0 357 2 vmsppl 368 404 0 378 4 0 4 4 0 8 1 rwobjpl 40 12416 0 11524 11 0 11 11 0 8 1 pdppl 4096 816 0 756 90 10 80 80 0 8 20 pvpl 32 179585 0 172060 68 0 68 68 0 265 1 pmappl 216 404 0 378 3 0 3 3 0 8 0 extentpl 40 46 0 28 1 0 1 1 0 8 0 phpool 112 495 0 10 14 0 14 14 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(ffffffff834b294f) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff834f0ca2,ffffffff8354f873,3bf,ffffffff8352827a) at __assert+0x29 sys/kern/subr_prf.c:-1 refcnt_finalize(ffff80003c4cf1d0,ffffffff834ac81f) at refcnt_finalize+0x1e7 sys/kern/kern_synch.c:960 pppx_if_destroy(285b9a,ffff80003c4cf1c8) at pppx_if_destroy+0x3d sys/net/if_pppx.c:794 pppxclose(285b9a,81,2000,ffff80003c8f02b8) at pppxclose+0xa0 sys/net/if_pppx.c:541 spec_close(ffff8000338af9d0) at spec_close+0x426 sys/kern/spec_vnops.c:-1 VOP_CLOSE(ffffee806bfe5948,81,ffffee8007ffd8f0,ffff80003c8f02b8) at VOP_CLOSE+0x129 sys/kern/vfs_vops.c:156 vn_closefile(ffffee806bed3268,ffff80003c8f02b8) at vn_closefile+0x11d vn_close sys/kern/vfs_vnops.c:298 [inline] vn_closefile(ffffee806bed3268,ffff80003c8f02b8) at vn_closefile+0x11d sys/kern/vfs_vnops.c:621 fdrop(ffffee806bed3268,ffff80003c8f02b8) at fdrop+0x121 sys/kern/kern_descrip.c:1281 closef(ffffee806bed3268,ffff80003c8f02b8) at closef+0x190 sys/kern/kern_descrip.c:1265 fdfree(ffff80003c8f02b8) at fdfree+0x115 sys/kern/kern_descrip.c:1196 exit1(ffff80003c8f02b8,0,0,1) at exit1+0x595 sys/kern/kern_exit.c:215 sys_exit(ffff80003c8f02b8,ffff8000338afd30,ffff8000338afc80) at sys_exit+0x1a sys/kern/kern_exit.c:-1 syscall(ffff8000338afd30) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff8000338afd30) at syscall+0x962 sys/arch/amd64/amd64/trap.c:791 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x76ff92c48580, 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(ffffffff834b294f) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff834f0ca2,ffffffff8354f873,3bf,ffffffff8352827a) at __assert+0x29 sys/kern/subr_prf.c:-1 refcnt_finalize(ffff80003c4cf1d0,ffffffff834ac81f) at refcnt_finalize+0x1e7 sys/kern/kern_synch.c:960 pppx_if_destroy(285b9a,ffff80003c4cf1c8) at pppx_if_destroy+0x3d sys/net/if_pppx.c:794 pppxclose(285b9a,81,2000,ffff80003c8f02b8) at pppxclose+0xa0 sys/net/if_pppx.c:541 spec_close(ffff8000338af9d0) at spec_close+0x426 sys/kern/spec_vnops.c:-1 VOP_CLOSE(ffffee806bfe5948,81,ffffee8007ffd8f0,ffff80003c8f02b8) at VOP_CLOSE+0x129 sys/kern/vfs_vops.c:156 vn_closefile(ffffee806bed3268,ffff80003c8f02b8) at vn_closefile+0x11d vn_close sys/kern/vfs_vnops.c:298 [inline] vn_closefile(ffffee806bed3268,ffff80003c8f02b8) at vn_closefile+0x11d sys/kern/vfs_vnops.c:621 fdrop(ffffee806bed3268,ffff80003c8f02b8) at fdrop+0x121 sys/kern/kern_descrip.c:1281 closef(ffffee806bed3268,ffff80003c8f02b8) at closef+0x190 sys/kern/kern_descrip.c:1265 fdfree(ffff80003c8f02b8) at fdfree+0x115 sys/kern/kern_descrip.c:1196 exit1(ffff80003c8f02b8,0,0,1) at exit1+0x595 sys/kern/kern_exit.c:215 sys_exit(ffff80003c8f02b8,ffff8000338afd30,ffff8000338afc80) at sys_exit+0x1a sys/kern/kern_exit.c:-1 syscall(ffff8000338afd30) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff8000338afd30) at syscall+0x962 sys/arch/amd64/amd64/trap.c:791 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x76ff92c48580, count: -16