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 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(ffff8000388d31d8,ffffffff83480d5a) at refcnt_finalize+0x1c8 sys/kern/kern_synch.c:956 pppx_if_destroy(285b9a,ffff8000388d31d0) at pppx_if_destroy+0x3d sys/net/if_pppx.c:794 pppxclose(285b9a,41,2000,ffff80003c8fa020) at pppxclose+0xa0 sys/net/if_pppx.c:541 spec_close(ffff8000388d8c60) at spec_close+0x417 sys/kern/spec_vnops.c:-1 VOP_CLOSE(fffffc805f20ecf8,41,fffffc8007ffd5b0,ffff80003c8fa020) at VOP_CLOSE+0x129 sys/kern/vfs_vops.c:156 vn_closefile(fffffc806ea4e5b8,ffff80003c8fa020) at vn_closefile+0x11d vn_close sys/kern/vfs_vnops.c:298 [inline] vn_closefile(fffffc806ea4e5b8,ffff80003c8fa020) at vn_closefile+0x11d sys/kern/vfs_vnops.c:621 fdrop(fffffc806ea4e5b8,ffff80003c8fa020) at fdrop+0x121 sys/kern/kern_descrip.c:1281 closef(fffffc806ea4e5b8,ffff80003c8fa020) at closef+0x190 sys/kern/kern_descrip.c:1265 fdfree(ffff80003c8fa020) at fdfree+0x115 sys/kern/kern_descrip.c:1196 exit1(ffff80003c8fa020,0,0,1) at exit1+0x576 sys/kern/kern_exit.c:215 sys_exit(ffff80003c8fa020,ffff8000388d8fc0,ffff8000388d8f10) at sys_exit+0x1a sys/kern/kern_exit.c:-1 end trace frame: 0xffff8000388d8fb0, 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 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(ffff8000388d31d8,ffffffff83480d5a) at refcnt_finalize+0x1c8 sys/kern/kern_synch.c:956 pppx_if_destroy(285b9a,ffff8000388d31d0) at pppx_if_destroy+0x3d sys/net/if_pppx.c:794 pppxclose(285b9a,41,2000,ffff80003c8fa020) at pppxclose+0xa0 sys/net/if_pppx.c:541 spec_close(ffff8000388d8c60) at spec_close+0x417 sys/kern/spec_vnops.c:-1 VOP_CLOSE(fffffc805f20ecf8,41,fffffc8007ffd5b0,ffff80003c8fa020) at VOP_CLOSE+0x129 sys/kern/vfs_vops.c:156 vn_closefile(fffffc806ea4e5b8,ffff80003c8fa020) at vn_closefile+0x11d vn_close sys/kern/vfs_vnops.c:298 [inline] vn_closefile(fffffc806ea4e5b8,ffff80003c8fa020) at vn_closefile+0x11d sys/kern/vfs_vnops.c:621 fdrop(fffffc806ea4e5b8,ffff80003c8fa020) at fdrop+0x121 sys/kern/kern_descrip.c:1281 closef(fffffc806ea4e5b8,ffff80003c8fa020) at closef+0x190 sys/kern/kern_descrip.c:1265 fdfree(ffff80003c8fa020) at fdfree+0x115 sys/kern/kern_descrip.c:1196 exit1(ffff80003c8fa020,0,0,1) at exit1+0x576 sys/kern/kern_exit.c:215 sys_exit(ffff80003c8fa020,ffff8000388d8fc0,ffff8000388d8f10) at sys_exit+0x1a sys/kern/kern_exit.c:-1 syscall(ffff8000388d8fc0) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff8000388d8fc0) at syscall+0x962 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x79ce1c655cc0, count: -16 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff8000388d8a40 rbx 0 rdx 0 rcx 0 rax 0xffff80003c8fa020 r8 0x101010101010101 r9 0x8080808080808080 r10 0x36a4b2e4c0397bb r11 0x3965745157aceef7 r12 0 r13 0 r14 0 r15 0x1 rip 0xffffffff81849d45 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff8000388d8a30 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb> show proc PROC (syz-executor) tid=468530 pid=66457 tcnt=0 stat=onproc flags process=1008 proc=2000 runpri=32, usrpri=86, slppri=32, nice=20 wchan=0x0, wmesg=, ps_single=0xffff80003c8fa020 scnt=-1 ecnt=1 forw=0xffffffffffffffff, list=0xffff80003c8fa7e8,0xffff80003c8fba20 process=0xffff8000ffffa898 user=0xffff8000388d4000, vmspace=0xfffffc806caaa460 estcpu=36, cpticks=2, pctcpu=0.0, user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 12828 244859 14701 0 2 0 syz-executor 12828 401910 14701 0 3 0x4000000 smrbar syz-executor 12828 75305 14701 0 2 0x4000000 syz-executor 40592 424761 71993 0 2 0 syz-executor 40592 515559 71993 0 3 0x4000080 fsleep syz-executor 40592 138391 71993 0 2 0x4000000 syz-executor 23119 356311 63327 0 2 0 syz-executor 23119 363969 63327 0 3 0x4000080 bell syz-executor 65726 406201 19561 0 2 0 syz-executor 65726 104421 19561 0 2 0x4000c80 syz-executor 99176 403082 66997 0 2 0 syz-executor 99176 361601 66997 0 3 0x4000080 fsleep syz-executor 99176 485880 66997 0 3 0x4000080 fsleep syz-executor 66997 363631 92895 0 2 0xc82 syz-executor 4950 198387 92895 0 3 0x82 nanoslp syz-executor 63327 487909 92895 0 2 0xc82 syz-executor 53076 367870 92895 0 3 0x82 nanoslp syz-executor 86209 79757 92895 0 2 0x2 syz-executor 14701 62970 92895 0 3 0x82 nanoslp syz-executor 71993 259363 92895 0 2 0xc82 syz-executor 19561 426097 92895 0 2 0xc82 syz-executor 92895 425815 44902 0 3 0x82 kqread syz-executor 44902 259590 90973 0 3 0x10008a sigsusp ksh 90973 251384 58495 0 3 0x98 kqread sshd-session 58495 265618 95087 0 3 0x92 kqread sshd-session 7165 244568 1 0 3 0x100083 ttyin getty 95087 374807 1 0 3 0x88 kqread sshd 84649 72259 48975 73 3 0x1100090 kqread syslogd 48975 383045 1 0 3 0x100082 sbwait syslogd 66673 394145 1 0 3 0x100080 kqread resolvd 84638 167101 89754 77 3 0x100092 kqread dhcpleased 76261 52087 89754 77 3 0x100092 kqread dhcpleased 89754 385975 1 0 3 0x80 kqread dhcpleased 55877 316127 0 0 2 0x14200 smr 13772 281168 0 0 2 0x14200 zerothread 40328 168439 0 0 3 0x14200 aiodoned aiodoned 42223 462664 0 0 3 0x14200 syncer update 66424 120840 0 0 3 0x14200 cleaner cleaner 3186 244947 0 0 3 0x14200 reaper reaper 16628 516028 0 0 3 0x14200 pgdaemon pagedaemon 31790 351413 0 0 3 0x14200 bored viomb 30947 277956 0 0 3 0x40014200 acpi0 acpi0 65942 256738 0 0 2 0x14200 softnet0 34027 207417 0 0 3 0x14200 bored systqmp 28918 269561 0 0 3 0x14200 bored systq 24197 451981 0 0 2 0x40014200 softclock 52858 20633 0 0 3 0x40014200 idle0 1 492365 0 0 3 0x80082 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 11045 12127K 12325K 166960K 13198 0 pcb 17 12K 12K 166960K 343 0 rtable 246 8K 10K 166960K 650 0 pf 39 15K 20K 166960K 357 0 ifaddr 45 8K 9K 166960K 166 0 ifgroup 58 2K 2K 166960K 313 0 sysctl 4 1K 9K 166960K 10 0 counters 35 18K 18K 166960K 163 0 ioctlops 0 0K 4K 166960K 464 0 iov 0 0K 16K 166960K 50 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1363 86K 86K 166960K 2449 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 0K 0K 166960K 90 0 dirhash 12 2K 2K 166960K 39 0 ACPI 1692 195K 286K 166960K 12470 0 file desc 17 61K 240K 166960K 1538 0 sigio 0 0K 0K 166960K 10 0 proc 61 59K 108K 166960K 556 0 subproc 72 4K 4K 166960K 73 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 0 0K 0K 166960K 129 0 in_multi 100 7K 7K 166960K 162 0 ether_multi 1 0K 0K 166960K 5 0 mrt 2 0K 0K 166960K 23 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 79 360K 360K 166960K 79 0 exec 0 0K 1K 166960K 444 0 fusefs mount 1 32K 32K 166960K 1 0 pfkey data 0 0K 0K 166960K 3 0 tdb 3 0K 0K 166960K 3 0 VM swap 8 62K 64K 166960K 10 0 UVM amap 216 150K 168K 166960K 13581 0 UVM aobj 15 2K 2K 166960K 15 0 pinsyscall 38 76K 96K 166960K 2589 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 1K 166960K 27 0 NDP 12 0K 2K 166960K 108 0 temp 59 9112K 9171K 166960K 27715 0 kqueue 14 22K 30K 166960K 267 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 119 0 115 1 0 1 1 0 8 0 rtentry 136 216 0 109 5 0 5 5 0 8 0 unpcb 144 443 0 428 1 0 1 1 0 8 0 syncache 336 12 0 12 2 1 1 1 0 8 1 tcpcb 736 152 0 148 1 0 1 1 0 8 0 arp 96 20 0 1 1 0 1 1 0 8 0 inpcb 328 872 0 862 3 0 3 3 0 8 2 nd6 112 68 0 42 2 0 2 2 0 8 0 pkpcb 40 30 0 30 2 1 1 1 0 8 1 kcovpl 48 8 0 0 1 0 1 1 0 8 0 ppxss 1072 94 0 93 2 1 1 1 0 8 0 pppxif 1416 34 0 33 2 1 1 1 0 8 0 pfstscr 40 55 0 51 1 0 1 1 0 8 0 pffrag 232 15 0 7 1 0 1 1 0 482 0 pffrnode 88 15 0 7 1 0 1 1 0 8 0 pffrent 40 34 0 26 1 0 1 1 0 8 0 pfrktable 1344 9 0 7 1 0 1 1 0 8 0 pfsrclim 320 1 0 1 1 1 0 1 0 8 0 pfanchor 1288 15 0 13 2 1 1 1 0 8 0 pftag 88 9 0 7 1 0 1 1 0 8 0 pfqueue 320 1 0 0 1 0 1 1 0 8 0 pfstitem 24 34 0 28 1 0 1 1 0 8 0 pfstkey 128 93 0 59 2 0 2 2 0 8 0 pfstate 384 49 0 46 1 0 1 1 0 8 0 pfrule 1360 28 0 27 2 1 1 1 0 8 0 art_heap8 4096 2 0 0 2 0 2 2 0 8 0 art_heap4 256 1394 0 961 51 13 38 46 0 8 8 art_table 40 1396 0 961 9 1 8 8 0 8 2 art_node 32 216 0 121 1 0 1 1 0 8 0 sysvmsgpl 40 13 0 6 1 0 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 72 84 0 74 1 0 1 1 0 8 0 shmpl 112 12 0 0 1 0 1 1 0 8 0 dirhash 1024 35 0 18 3 0 3 3 0 8 0 dino2pl 256 3951 0 2497 92 0 92 92 0 8 0 ffsino 256 3951 0 2497 92 0 92 92 0 8 0 nchpl 144 6028 0 4330 64 0 64 64 0 8 0 rtmask 32 8 0 8 2 1 1 1 0 8 1 vnodes 216 4640 0 0 258 0 258 258 0 8 0 namei 1024 17243 0 17243 2 1 1 2 0 8 1 pfiaddrpl 120 1 0 0 1 0 1 1 0 8 0 kstatmem 264 175 0 150 2 0 2 2 0 8 0 scsiplug 72 6 0 6 2 1 1 1 0 8 1 scxspl 216 20367 0 20367 10 7 3 8 1 8 3 plimitpl 152 102 0 84 1 0 1 1 0 8 0 sigapl 424 1790 0 1748 6 1 5 6 0 8 0 knotepl 120 55441 0 55392 29 20 9 16 0 8 6 kqueuepl 184 338 0 327 1 0 1 1 0 8 0 pipepl 304 230 0 202 7 0 7 7 0 8 4 fdescpl 448 1777 0 1748 5 1 4 5 0 8 0 filepl 120 7651 0 7424 16 1 15 15 0 8 7 lockfpl 104 355 0 353 1 0 1 1 0 8 0 lockfspl 48 147 0 145 1 0 1 1 0 8 0 sessionpl 144 85 0 77 1 0 1 1 0 8 0 pgrppl 48 125 0 109 1 0 1 1 0 8 0 ucredpl 104 1108 0 1097 1 0 1 1 0 8 0 zombiepl 144 1750 0 1748 1 0 1 1 0 8 0 processpl 1152 1790 0 1748 4 0 4 4 0 8 0 procpl 664 3351 0 3301 6 0 6 6 0 8 1 sosppl 176 3 0 3 2 1 1 1 0 8 1 sockpl 552 1495 0 1466 5 1 4 4 0 8 1 mcl64k 65536 149 0 148 2 1 1 1 0 8 0 mcl16k 16384 71 0 71 2 1 1 1 0 8 1 mcl12k 12288 31 0 30 2 1 1 1 0 8 0 mcl9k128 9344 11 0 11 2 1 1 1 0 8 1 mcl8k 8192 184 0 184 2 1 1 1 0 8 1 mcl4k 4096 5059 0 5004 15 7 8 14 0 8 1 mcl2k2 2112 11 0 11 2 1 1 1 0 8 1 mcl2k 2048 1025 0 1018 2 0 2 2 0 8 0 mtagpl 96 4 0 4 2 1 1 1 0 8 1 mbufpl 256 19171 0 18968 19 0 19 19 0 8 1 bufpl 280 5659 0 106 397 0 397 397 0 8 0 anonpl 24 210660 0 207397 55 10 45 45 0 186 15 amapchunkpl 152 46385 0 45933 36 9 27 28 0 158 7 amappl16 200 3056 0 3018 16 4 12 15 0 8 8 amappl15 192 3 0 3 1 1 0 1 0 8 0 amappl14 184 406 0 405 1 0 1 1 0 8 0 amappl13 176 119 0 109 1 0 1 1 0 8 0 amappl12 168 2010 0 1982 2 0 2 2 0 8 0 amappl11 160 5 0 5 1 1 0 1 0 8 0 amappl10 152 64 0 54 1 0 1 1 0 8 0 amappl9 144 274 0 272 1 0 1 1 0 8 0 amappl8 136 91 0 90 1 0 1 1 0 8 0 amappl7 128 142 0 131 1 0 1 1 0 8 0 amappl6 120 147 0 146 1 0 1 1 0 8 0 amappl5 112 90 0 82 1 0 1 1 0 8 0 amappl4 104 263 0 246 1 0 1 1 0 8 0 amappl3 96 9897 0 9792 4 1 3 4 0 8 0 amappl2 88 534 0 480 2 0 2 2 0 8 0 amappl1 80 16227 0 15676 15 2 13 15 0 8 0 amappl 88 12802 0 12647 5 0 5 5 0 92 0 uvmvnodes 80 127 0 0 3 0 3 3 0 8 0 dma4096 4096 1 0 1 1 1 0 1 0 8 0 dma2048 2048 2 0 2 2 1 1 1 0 8 1 dma1024 1024 1 0 0 1 0 1 1 0 8 0 dma512 512 1 0 1 1 0 1 1 0 8 1 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 14 0 0 1 0 1 1 0 8 0 uaddrrnd 24 1777 0 1748 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1777 0 1748 1 0 1 1 0 8 0 vmmpekpl 168 13875 0 13840 2 0 2 2 0 8 0 vmmpepl 168 112914 0 111114 98 8 90 90 0 357 8 vmsppl 368 1776 0 1748 4 1 3 4 0 8 0 rwobjpl 40 27827 0 26835 14 1 13 13 0 8 0 pdppl 4096 3560 0 3496 104 38 66 82 0 8 2 pvpl 32 739593 0 729737 137 19 118 118 0 265 25 pmappl 216 1776 0 1748 3 0 3 3 0 8 0 extentpl 40 45 0 27 1 0 1 1 0 8 0 phpool 112 408 0 69 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(ffff8000388d31d8,ffffffff83480d5a) at refcnt_finalize+0x1c8 sys/kern/kern_synch.c:956 pppx_if_destroy(285b9a,ffff8000388d31d0) at pppx_if_destroy+0x3d sys/net/if_pppx.c:794 pppxclose(285b9a,41,2000,ffff80003c8fa020) at pppxclose+0xa0 sys/net/if_pppx.c:541 spec_close(ffff8000388d8c60) at spec_close+0x417 sys/kern/spec_vnops.c:-1 VOP_CLOSE(fffffc805f20ecf8,41,fffffc8007ffd5b0,ffff80003c8fa020) at VOP_CLOSE+0x129 sys/kern/vfs_vops.c:156 vn_closefile(fffffc806ea4e5b8,ffff80003c8fa020) at vn_closefile+0x11d vn_close sys/kern/vfs_vnops.c:298 [inline] vn_closefile(fffffc806ea4e5b8,ffff80003c8fa020) at vn_closefile+0x11d sys/kern/vfs_vnops.c:621 fdrop(fffffc806ea4e5b8,ffff80003c8fa020) at fdrop+0x121 sys/kern/kern_descrip.c:1281 closef(fffffc806ea4e5b8,ffff80003c8fa020) at closef+0x190 sys/kern/kern_descrip.c:1265 fdfree(ffff80003c8fa020) at fdfree+0x115 sys/kern/kern_descrip.c:1196 exit1(ffff80003c8fa020,0,0,1) at exit1+0x576 sys/kern/kern_exit.c:215 sys_exit(ffff80003c8fa020,ffff8000388d8fc0,ffff8000388d8f10) at sys_exit+0x1a sys/kern/kern_exit.c:-1 syscall(ffff8000388d8fc0) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff8000388d8fc0) at syscall+0x962 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x79ce1c655cc0, 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(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(ffff8000388d31d8,ffffffff83480d5a) at refcnt_finalize+0x1c8 sys/kern/kern_synch.c:956 pppx_if_destroy(285b9a,ffff8000388d31d0) at pppx_if_destroy+0x3d sys/net/if_pppx.c:794 pppxclose(285b9a,41,2000,ffff80003c8fa020) at pppxclose+0xa0 sys/net/if_pppx.c:541 spec_close(ffff8000388d8c60) at spec_close+0x417 sys/kern/spec_vnops.c:-1 VOP_CLOSE(fffffc805f20ecf8,41,fffffc8007ffd5b0,ffff80003c8fa020) at VOP_CLOSE+0x129 sys/kern/vfs_vops.c:156 vn_closefile(fffffc806ea4e5b8,ffff80003c8fa020) at vn_closefile+0x11d vn_close sys/kern/vfs_vnops.c:298 [inline] vn_closefile(fffffc806ea4e5b8,ffff80003c8fa020) at vn_closefile+0x11d sys/kern/vfs_vnops.c:621 fdrop(fffffc806ea4e5b8,ffff80003c8fa020) at fdrop+0x121 sys/kern/kern_descrip.c:1281 closef(fffffc806ea4e5b8,ffff80003c8fa020) at closef+0x190 sys/kern/kern_descrip.c:1265 fdfree(ffff80003c8fa020) at fdfree+0x115 sys/kern/kern_descrip.c:1196 exit1(ffff80003c8fa020,0,0,1) at exit1+0x576 sys/kern/kern_exit.c:215 sys_exit(ffff80003c8fa020,ffff8000388d8fc0,ffff8000388d8f10) at sys_exit+0x1a sys/kern/kern_exit.c:-1 syscall(ffff8000388d8fc0) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff8000388d8fc0) at syscall+0x962 sys/arch/amd64/amd64/trap.c:783 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x79ce1c655cc0, count: -16