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 * 26851 99735 0 0 0x4000000 0 syz-executor db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff83498ba2) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff834d59ae,ffffffff83531010,3bf,ffffffff8350a2a9) at __assert+0x29 sys/kern/subr_prf.c:-1 refcnt_finalize(ffff80003c92b758,ffffffff8348dfe5) at refcnt_finalize+0x1e7 sys/kern/kern_synch.c:960 pppx_if_destroy(ffff8000318be000,ffff80003c92b750) at pppx_if_destroy+0x3d sys/net/if_pppx.c:794 pppxclose(285b9a,81,2000,ffff80002a796550) at pppxclose+0xa0 sys/net/if_pppx.c:541 spec_close(ffff80002a8619d0) at spec_close+0x417 sys/kern/spec_vnops.c:-1 VOP_CLOSE(ffffef006d583530,81,ffffef0007ffd680,ffff80002a796550) at VOP_CLOSE+0x129 sys/kern/vfs_vops.c:156 vn_closefile(ffffef006d17eac8,ffff80002a796550) at vn_closefile+0x11d vn_close sys/kern/vfs_vnops.c:298 [inline] vn_closefile(ffffef006d17eac8,ffff80002a796550) at vn_closefile+0x11d sys/kern/vfs_vnops.c:621 fdrop(ffffef006d17eac8,ffff80002a796550) at fdrop+0x121 sys/kern/kern_descrip.c:1281 closef(ffffef006d17eac8,ffff80002a796550) at closef+0x190 sys/kern/kern_descrip.c:1265 sys_closefrom(ffff80002a796550,ffff80002a861c90,ffff80002a861be0) at sys_closefrom+0x13c sys/kern/kern_descrip.c:1471 syscall(ffff80002a861c90) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80002a861c90) at syscall+0x962 sys/arch/amd64/amd64/trap.c:791 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x759aa5f2b10, 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(ffffffff83498ba2) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff834d59ae,ffffffff83531010,3bf,ffffffff8350a2a9) at __assert+0x29 sys/kern/subr_prf.c:-1 refcnt_finalize(ffff80003c92b758,ffffffff8348dfe5) at refcnt_finalize+0x1e7 sys/kern/kern_synch.c:960 pppx_if_destroy(ffff8000318be000,ffff80003c92b750) at pppx_if_destroy+0x3d sys/net/if_pppx.c:794 pppxclose(285b9a,81,2000,ffff80002a796550) at pppxclose+0xa0 sys/net/if_pppx.c:541 spec_close(ffff80002a8619d0) at spec_close+0x417 sys/kern/spec_vnops.c:-1 VOP_CLOSE(ffffef006d583530,81,ffffef0007ffd680,ffff80002a796550) at VOP_CLOSE+0x129 sys/kern/vfs_vops.c:156 vn_closefile(ffffef006d17eac8,ffff80002a796550) at vn_closefile+0x11d vn_close sys/kern/vfs_vnops.c:298 [inline] vn_closefile(ffffef006d17eac8,ffff80002a796550) at vn_closefile+0x11d sys/kern/vfs_vnops.c:621 fdrop(ffffef006d17eac8,ffff80002a796550) at fdrop+0x121 sys/kern/kern_descrip.c:1281 closef(ffffef006d17eac8,ffff80002a796550) at closef+0x190 sys/kern/kern_descrip.c:1265 sys_closefrom(ffff80002a796550,ffff80002a861c90,ffff80002a861be0) at sys_closefrom+0x13c sys/kern/kern_descrip.c:1471 syscall(ffff80002a861c90) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80002a861c90) at syscall+0x962 sys/arch/amd64/amd64/trap.c:791 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x759aa5f2b10, count: -14 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80002a8617a0 rbx 0 rdx 0xffff8000015e4900 rcx 0 rax 0xffff80002a796550 r8 0x101010101010101 r9 0x8080808080808080 r10 0x67c20c85ca525860 r11 0xc2822fee6797bf1f r12 0 r13 0 r14 0 r15 0x1 rip 0xffffffff826b47a5 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff80002a861790 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb> show proc PROC (syz-executor) tid=26851 pid=99735 tcnt=3 stat=onproc flags process=0 proc=4000000 runpri=32, usrpri=53, slppri=32, nice=20 wchan=0x0, wmesg=, ps_single=0x0 scnt=0 ecnt=0 forw=0xffffffffffffffff, list=0xffff80002a796d18,0xffffffff83a68848 process=0xffff80003a8df1f0 user=0xffff80002a85c000, vmspace=0xffffef006d1722f0 estcpu=3, cpticks=1, pctcpu=0.0, user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S PRLAGS PFLAGS WAIT COMMAND 99735 428108 83520 0 2 0 0 syz-executor 99735 193848 83520 0 3 0 0x4000000 smrbar syz-executor *99735 26851 83520 0 7 0 0x4000000 syz-executor 73830 65 11917 0 3 0 0x80 nanoslp syz-executor 73830 421247 11917 0 3 0 0x4000080 sbwait syz-executor 73830 22269 11917 0 3 0 0x4000080 fsleep syz-executor 78659 235450 66109 0 3 0x2 0x80 piperd syz-executor 54775 25726 66109 0 3 0x2 0x80 piperd syz-executor 12068 414812 66109 0 3 0x2 0x80 piperd syz-executor 83520 369289 66109 0 3 0x2 0x80 nanoslp syz-executor 89349 113552 66109 0 3 0x2 0x80 nanoslp syz-executor 11917 427818 66109 0 3 0x2 0x80 nanoslp syz-executor 66109 382879 50613 0 3 0x2 0x80 wait syz-executor 50613 358641 11301 0 3 0x100002 0x88 sigsusp ksh 11301 39504 19373 0 3 0x10 0x88 kqread sshd-session 19373 297567 31628 0 3 0x12 0x80 kqread sshd-session 28199 298794 1 0 3 0x100003 0x80 ttyin getty 31628 304012 1 0 3 0 0x88 kqread sshd 71597 123574 3269 73 3 0x1100010 0x80 kqread syslogd 3269 326762 1 0 3 0x100002 0x80 sbwait syslogd 88044 252600 1 0 3 0x100000 0x80 kqread resolvd 41628 315517 1616 77 3 0x100012 0x80 kqread dhcpleased 58635 112939 1616 77 3 0x100012 0x80 kqread dhcpleased 1616 42975 1 0 3 0 0x80 kqread dhcpleased 8323 457656 0 0 3 0x14000 0x200 bored smr 13524 293710 0 0 2 0x14000 0x200 zerothread 29727 453548 0 0 3 0x14000 0x200 aiodoned aiodoned 49534 408820 0 0 3 0x14000 0x200 syncer update 12267 486247 0 0 3 0x14000 0x200 cleaner cleaner 95903 430755 0 0 3 0x14000 0x200 reaper reaper 17613 494195 0 0 3 0x14000 0x200 pgdaemon pagedaemon 29074 44752 0 0 3 0x14000 0x200 bored viomb 8608 130198 0 0 3 0x14000 0x40000200 acpi0 acpi0 33194 138492 0 0 3 0x14000 0x200 bored softnet0 21201 81459 0 0 3 0x14000 0x200 smrbar systqmp 95705 265948 0 0 3 0x14000 0x200 bored systq 79058 445940 0 0 3 0x14000 0x40000200 tmoslp softclock 41415 215757 0 0 3 0x14000 0x40000200 idle0 1 155875 0 0 3 0x2 0x80 wait init 0 0 -1 0 3 0x10010000 0x200 scheduler swapper ddb> show all locks No such command ddb> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 11032 12103K 12198K 166960K 12146 0 pcb 17 12K 12K 166960K 25 0 rtable 241 7K 7K 166960K 424 0 pf 33 13K 13K 166960K 37 0 ifaddr 44 7K 7K 166960K 54 0 ifgroup 55 2K 2K 166960K 63 0 sysctl 1 1K 9K 166960K 5 0 counters 35 18K 18K 166960K 37 0 ioctlops 0 0K 2K 166960K 38 0 iov 0 0K 12K 166960K 3 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1297 82K 82K 166960K 1399 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 5K 166960K 3 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 13 45K 97K 166960K 186 0 sigio 0 0K 0K 166960K 2 0 proc 59 59K 124K 166960K 559 0 subproc 72 4K 4K 166960K 90 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 0 0K 0K 166960K 3 0 in_multi 100 6K 6K 166960K 123 0 ether_multi 1 0K 0K 166960K 1 0 mrt 0 0K 0K 166960K 2 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 49 228K 228K 166960K 49 0 exec 0 0K 2K 166960K 395 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 189 158K 168K 166960K 3260 0 UVM aobj 4 2K 4K 166960K 5 0 pinsyscall 34 68K 96K 166960K 1348 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 NDP 16 0K 2K 166960K 34 0 temp 33 9106K 9112K 166960K 3583 0 kqueue 14 22K 24K 166960K 29 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 45 0 42 1 0 1 1 0 8 0 rtentry 136 134 0 23 4 0 4 4 0 8 0 unpcb 144 45 0 27 1 0 1 1 0 8 0 syncache 336 5 0 5 1 0 1 1 0 8 1 tcpcb 736 13 0 9 1 0 1 1 0 8 0 arp 96 22 0 4 1 0 1 1 0 8 0 inpcb 328 83 0 76 2 0 2 2 0 8 1 nd6 112 30 0 6 1 0 1 1 0 8 0 kcovpl 48 10 0 2 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 547 0 88 32 0 32 32 0 8 1 art_table 40 548 0 88 6 0 6 6 0 8 0 art_node 32 134 0 31 1 0 1 1 0 8 0 semapl 72 1 0 0 1 0 1 1 0 8 0 shmpl 120 2 0 1 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 1620 0 146 93 0 93 93 0 8 0 ffsino 256 1620 0 146 93 0 93 93 0 8 0 nchpl 144 1836 0 131 64 0 64 64 0 8 0 vnodes 216 1732 0 0 97 0 97 97 0 8 0 namei 1024 6575 0 6575 4 0 4 4 0 8 4 kstatmem 264 29 0 4 2 0 2 2 0 8 0 scxspl 216 6407 0 6407 4 0 4 4 1 8 4 plimitpl 152 31 0 15 1 0 1 1 0 8 0 sigapl 424 481 0 443 6 0 6 6 0 8 1 knotepl 120 3481 0 3433 2 0 2 2 0 8 0 kqueuepl 184 32 0 22 1 0 1 1 0 8 0 pipepl 304 129 0 102 3 0 3 3 0 8 0 fdescpl 448 467 0 442 5 0 5 5 0 8 1 filepl 120 1783 0 1572 9 0 9 9 0 8 2 lockfpl 104 21 0 18 1 0 1 1 0 8 0 lockfspl 48 10 0 7 1 0 1 1 0 8 0 sessionpl 144 25 0 17 1 0 1 1 0 8 0 pgrppl 48 35 0 19 1 0 1 1 0 8 0 ucredpl 104 97 0 86 1 0 1 1 0 8 0 zombiepl 144 446 0 443 1 0 1 1 0 8 0 processpl 1160 481 0 443 4 0 4 4 0 8 0 procpl 664 547 0 505 6 0 6 6 0 8 1 sockpl 552 174 0 146 3 0 3 3 0 8 0 mcl64k 65536 4 0 4 1 0 1 1 0 8 1 mcl16k 16384 2 0 2 1 0 1 1 0 8 1 mcl12k 12288 1 0 1 1 0 1 1 0 8 1 mcl8k 8192 6 0 6 1 0 1 1 0 8 1 mcl4k 4096 2508 0 2456 14 0 14 14 0 8 7 mcl2k 2048 170 0 169 2 0 2 2 0 8 1 mextrefs 64 56 0 55 1 0 1 1 0 8 0 mtagpl 96 4 0 4 1 0 1 1 0 8 1 mbufpl 256 4556 0 4428 12 0 12 12 0 8 2 bufpl 272 2265 0 103 145 0 145 145 0 8 0 anonpl 24 80584 0 77743 44 0 44 44 0 187 14 amapchunkpl 152 8643 0 8278 21 0 21 21 0 158 1 amappl16 200 1113 0 1098 14 0 14 14 0 8 10 amappl15 192 16 0 16 1 0 1 1 0 8 1 amappl14 184 436 0 435 1 0 1 1 0 8 0 amappl13 176 121 0 111 1 0 1 1 0 8 0 amappl12 168 715 0 691 2 0 2 2 0 8 0 amappl11 160 3 0 3 1 0 1 1 0 8 1 amappl10 152 80 0 70 1 0 1 1 0 8 0 amappl9 144 271 0 270 1 0 1 1 0 8 0 amappl8 136 98 0 97 1 0 1 1 0 8 0 amappl7 128 142 0 131 1 0 1 1 0 8 0 amappl6 120 167 0 166 1 0 1 1 0 8 0 amappl5 112 100 0 92 1 0 1 1 0 8 0 amappl4 104 267 0 251 1 0 1 1 0 8 0 amappl3 96 1568 0 1499 3 0 3 3 0 8 0 amappl2 88 575 0 512 2 0 2 2 0 8 0 amappl1 80 10551 0 10019 14 0 14 14 0 8 1 amappl 88 2523 0 2398 4 0 4 4 0 92 0 uvmvnodes 80 97 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 4 0 1 1 0 1 1 0 8 0 uaddrrnd 24 467 0 442 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 467 0 442 1 0 1 1 0 8 0 vmmpekpl 168 5843 0 5811 2 0 2 2 0 8 0 vmmpepl 168 39488 0 37937 88 0 88 88 0 357 7 vmsppl 368 466 0 442 4 0 4 4 0 8 1 rwobjpl 40 14185 0 13298 12 0 12 12 0 8 0 pdppl 4096 940 0 884 96 28 68 82 0 8 12 pvpl 32 215501 0 207859 111 0 111 111 0 265 23 pmappl 216 466 0 442 3 0 3 3 0 8 0 extentpl 40 46 0 28 1 0 1 1 0 8 0 phpool 112 512 0 28 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(ffffffff83498ba2) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff834d59ae,ffffffff83531010,3bf,ffffffff8350a2a9) at __assert+0x29 sys/kern/subr_prf.c:-1 refcnt_finalize(ffff80003c92b758,ffffffff8348dfe5) at refcnt_finalize+0x1e7 sys/kern/kern_synch.c:960 pppx_if_destroy(ffff8000318be000,ffff80003c92b750) at pppx_if_destroy+0x3d sys/net/if_pppx.c:794 pppxclose(285b9a,81,2000,ffff80002a796550) at pppxclose+0xa0 sys/net/if_pppx.c:541 spec_close(ffff80002a8619d0) at spec_close+0x417 sys/kern/spec_vnops.c:-1 VOP_CLOSE(ffffef006d583530,81,ffffef0007ffd680,ffff80002a796550) at VOP_CLOSE+0x129 sys/kern/vfs_vops.c:156 vn_closefile(ffffef006d17eac8,ffff80002a796550) at vn_closefile+0x11d vn_close sys/kern/vfs_vnops.c:298 [inline] vn_closefile(ffffef006d17eac8,ffff80002a796550) at vn_closefile+0x11d sys/kern/vfs_vnops.c:621 fdrop(ffffef006d17eac8,ffff80002a796550) at fdrop+0x121 sys/kern/kern_descrip.c:1281 closef(ffffef006d17eac8,ffff80002a796550) at closef+0x190 sys/kern/kern_descrip.c:1265 sys_closefrom(ffff80002a796550,ffff80002a861c90,ffff80002a861be0) at sys_closefrom+0x13c sys/kern/kern_descrip.c:1471 syscall(ffff80002a861c90) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80002a861c90) at syscall+0x962 sys/arch/amd64/amd64/trap.c:791 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x759aa5f2b10, 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(ffffffff83498ba2) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff834d59ae,ffffffff83531010,3bf,ffffffff8350a2a9) at __assert+0x29 sys/kern/subr_prf.c:-1 refcnt_finalize(ffff80003c92b758,ffffffff8348dfe5) at refcnt_finalize+0x1e7 sys/kern/kern_synch.c:960 pppx_if_destroy(ffff8000318be000,ffff80003c92b750) at pppx_if_destroy+0x3d sys/net/if_pppx.c:794 pppxclose(285b9a,81,2000,ffff80002a796550) at pppxclose+0xa0 sys/net/if_pppx.c:541 spec_close(ffff80002a8619d0) at spec_close+0x417 sys/kern/spec_vnops.c:-1 VOP_CLOSE(ffffef006d583530,81,ffffef0007ffd680,ffff80002a796550) at VOP_CLOSE+0x129 sys/kern/vfs_vops.c:156 vn_closefile(ffffef006d17eac8,ffff80002a796550) at vn_closefile+0x11d vn_close sys/kern/vfs_vnops.c:298 [inline] vn_closefile(ffffef006d17eac8,ffff80002a796550) at vn_closefile+0x11d sys/kern/vfs_vnops.c:621 fdrop(ffffef006d17eac8,ffff80002a796550) at fdrop+0x121 sys/kern/kern_descrip.c:1281 closef(ffffef006d17eac8,ffff80002a796550) at closef+0x190 sys/kern/kern_descrip.c:1265 sys_closefrom(ffff80002a796550,ffff80002a861c90,ffff80002a861be0) at sys_closefrom+0x13c sys/kern/kern_descrip.c:1471 syscall(ffff80002a861c90) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80002a861c90) at syscall+0x962 sys/arch/amd64/amd64/trap.c:791 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x759aa5f2b10, count: -14