panic: kernel diagnostic assertion "refs != ~0" failed: file "/syzkaller/managers/main/kernel/sys/kern/kern_synch.c", line 944 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:437 panic(ffffffff83405dd0) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff833b3398,ffffffff83301e66,3b0,ffffffff833bb56d) at __assert+0x29 refcnt_finalize(ffff80002a8cb5d0,ffffffff833033a1) at refcnt_finalize+0x1c8 sys/kern/kern_synch.c:945 pppx_if_destroy(205b9a,ffff80002a8cb5c8) at pppx_if_destroy+0x3d sys/net/if_pppx.c:806 pppxclose(205b9a,1,2000,ffff80002a8e67e0) at pppxclose+0xa0 sys/net/if_pppx.c:553 spec_close(ffff800031516be0) at spec_close+0x412 VOP_CLOSE(fffffd806bdf61d0,1,fffffd807f7d7138,ffff80002a8e67e0) at VOP_CLOSE+0x12a sys/kern/vfs_vops.c:156 vn_closefile(fffffd806a8c9168,ffff80002a8e67e0) at vn_closefile+0x11d vn_close sys/kern/vfs_vnops.c:292 [inline] vn_closefile(fffffd806a8c9168,ffff80002a8e67e0) at vn_closefile+0x11d sys/kern/vfs_vnops.c:615 fdrop(fffffd806a8c9168,ffff80002a8e67e0) at fdrop+0x126 sys/kern/kern_descrip.c:1265 closef(fffffd806a8c9168,ffff80002a8e67e0) at closef+0x18d sys/kern/kern_descrip.c:1249 fdfree(ffff80002a8e67e0) at fdfree+0x115 sys/kern/kern_descrip.c:1181 exit1(ffff80002a8e67e0,0,0,1) at exit1+0x57f sys/kern/kern_exit.c:214 sys_exit(ffff80002a8e67e0,ffff800031516f50,ffff800031516ea0) at sys_exit+0x1a end trace frame: 0xffff800031516f40, 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 944 ddb> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff83405dd0) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff833b3398,ffffffff83301e66,3b0,ffffffff833bb56d) at __assert+0x29 refcnt_finalize(ffff80002a8cb5d0,ffffffff833033a1) at refcnt_finalize+0x1c8 sys/kern/kern_synch.c:945 pppx_if_destroy(205b9a,ffff80002a8cb5c8) at pppx_if_destroy+0x3d sys/net/if_pppx.c:806 pppxclose(205b9a,1,2000,ffff80002a8e67e0) at pppxclose+0xa0 sys/net/if_pppx.c:553 spec_close(ffff800031516be0) at spec_close+0x412 VOP_CLOSE(fffffd806bdf61d0,1,fffffd807f7d7138,ffff80002a8e67e0) at VOP_CLOSE+0x12a sys/kern/vfs_vops.c:156 vn_closefile(fffffd806a8c9168,ffff80002a8e67e0) at vn_closefile+0x11d vn_close sys/kern/vfs_vnops.c:292 [inline] vn_closefile(fffffd806a8c9168,ffff80002a8e67e0) at vn_closefile+0x11d sys/kern/vfs_vnops.c:615 fdrop(fffffd806a8c9168,ffff80002a8e67e0) at fdrop+0x126 sys/kern/kern_descrip.c:1265 closef(fffffd806a8c9168,ffff80002a8e67e0) at closef+0x18d sys/kern/kern_descrip.c:1249 fdfree(ffff80002a8e67e0) at fdfree+0x115 sys/kern/kern_descrip.c:1181 exit1(ffff80002a8e67e0,0,0,1) at exit1+0x57f sys/kern/kern_exit.c:214 sys_exit(ffff80002a8e67e0,ffff800031516f50,ffff800031516ea0) at sys_exit+0x1a syscall(ffff800031516f50) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x73c827612890, count: -16 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff8000315169c0 rbx 0xffffffff83228fd0 pppxclose rdx 0 rcx 0 rax 0xffff80002a8e67e0 r8 0 r9 0x8080808080808080 r10 0xfb41ffcb2a232f98 r11 0x2ca74e54a44ee681 r12 0 r13 0 r14 0 r15 0x1 rip 0xffffffff8189d035 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff8000315169b0 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb> show proc PROC (syz-executor) tid=464760 pid=53547 tcnt=0 stat=onproc flags process=1008 proc=2000 runpri=32, usrpri=84, slppri=32, nice=20 wchan=0x0, wmesg=, ps_single=0xffff80002a8e67e0 scnt=-1 ecnt=1 forw=0xffffffffffffffff, list=0xffff80002a7f27c8,0xffff80002a7f2f88 process=0xffff800035d24468 user=0xffff800031512000, vmspace=0xfffffd806a9742e8 estcpu=34, cpticks=8, pctcpu=0.1, user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 32074 98883 93390 0 2 0 syz-executor 32074 492615 93390 0 3 0x4000080 fsleep syz-executor 32074 190551 93390 0 3 0x4000080 fsleep syz-executor 59883 318880 54631 -1 2 0x10 syz-executor 59883 196463 54631 -1 3 0x4000090 fsleep syz-executor 13293 477363 71731 0 2 0 syz-executor 13293 332081 71731 0 3 0x4000000 smrbar syz-executor 13293 364730 71731 0 3 0x4000080 fsleep syz-executor 13293 152618 71731 0 3 0x4000080 fsleep syz-executor 42436 34389 91672 0 2 0 syz-executor 42436 74125 91672 0 2 0x4000000 syz-executor 42436 121220 91672 0 3 0x4000080 fsleep syz-executor 42436 251076 91672 0 3 0x4000000 inode syz-executor 83685 165015 23709 0 2 0x2 syz-executor 54154 482177 1 0 3 0x100083 ttyin getty 20691 370417 23709 0 3 0x82 nanoslp syz-executor 82377 283261 0 0 3 0x14200 bored sosplice 39575 208556 23709 0 3 0x82 nanoslp syz-executor 91672 332019 23709 0 3 0x82 nanoslp syz-executor 93390 444622 23709 0 3 0x82 nanoslp syz-executor 71731 275306 23709 0 3 0x82 nanoslp syz-executor 82381 467859 23709 0 2 0x2 syz-executor 54631 370667 23709 0 3 0x82 nanoslp syz-executor 23709 12268 44711 0 3 0x82 kqread syz-executor 44711 363389 4471 0 3 0x10008a sigsusp ksh 4471 484720 39551 0 3 0x98 kqread sshd-session 39551 205243 83674 0 3 0x92 kqread sshd-session 83674 120474 1 0 3 0x88 kqread sshd 10371 99902 85739 73 3 0x1100090 kqread syslogd 85739 339334 1 0 3 0x100082 sbwait syslogd 46132 159363 1 0 3 0x100080 kqread resolvd 8341 225129 59665 77 3 0x100092 kqread dhcpleased 19354 315549 59665 77 3 0x100092 kqread dhcpleased 59665 41572 1 0 3 0x80 kqread dhcpleased 34327 314912 0 0 3 0x14200 bored smr 33681 188307 0 0 2 0x14200 zerothread 22465 425481 0 0 3 0x14200 aiodoned aiodoned 61817 515624 0 0 3 0x14200 syncer update 37527 331477 0 0 3 0x14200 cleaner cleaner 97957 40614 0 0 3 0x14200 reaper reaper 33854 383182 0 0 3 0x14200 pgdaemon pagedaemon 3563 438138 0 0 3 0x14200 bored viomb 12331 330158 0 0 3 0x40014200 acpi0 acpi0 72 52030 0 0 3 0x14200 bored softnet3 42864 200402 0 0 3 0x14200 bored softnet2 86539 197491 0 0 3 0x14200 bored softnet1 56373 204793 0 0 3 0x14200 bored softnet0 36736 127609 0 0 3 0x14200 bored systqmp 91589 1270 0 0 3 0x14200 bored systq 81634 264792 0 0 2 0x40014200 softclock 89005 129643 0 0 3 0x40014200 idle0 1 142013 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 10267 11289K 11513K 166960K 13741 0 pcb 17 16K 18K 166960K 151 0 rtable 252 9K 9K 166960K 520 0 pf 37 14K 21K 166960K 111 0 ifaddr 46 8K 8K 166960K 81 0 ifgroup 57 2K 2K 166960K 127 0 sysctl 3 1K 1K 166960K 3 0 counters 33 17K 17K 166960K 59 0 ioctlops 0 0K 4K 166960K 207 0 iov 0 0K 16K 166960K 129 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1471 92K 93K 166960K 2547 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 5K 166960K 22 0 VM map 2 1K 1K 166960K 2 0 sem 16 20K 20K 166960K 32 0 dirhash 12 2K 2K 166960K 39 0 ACPI 1692 195K 286K 166960K 12470 0 file desc 16 57K 93K 166960K 968 0 sigio 0 0K 0K 166960K 16 0 proc 60 59K 116K 166960K 613 0 subproc 72 4K 4K 166960K 96 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 0 0K 0K 166960K 287 0 in_multi 100 7K 7K 166960K 148 0 ether_multi 1 0K 0K 166960K 2 0 mrt 1 0K 0K 166960K 3 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 85 387K 387K 166960K 85 0 exec 0 0K 1K 166960K 495 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 217 73K 86K 166960K 10429 0 UVM aobj 30 4K 4K 166960K 32 0 pinsyscall 37 74K 94K 166960K 2056 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 75 0 NDP 13 0K 2K 166960K 55 0 temp 76 8636K 8968K 166960K 43233 0 kqueue 14 22K 28K 166960K 148 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 100 0 97 1 0 1 1 0 8 0 rtentry 112 161 0 47 4 0 4 4 0 8 0 unpcb 144 1085 0 1002 12 8 4 6 0 8 0 syncache 336 4 0 4 2 2 0 1 0 8 0 tcpcb 808 283 0 246 8 0 8 8 0 8 4 arp 88 27 0 7 1 0 1 1 0 8 0 ipq 40 2 0 0 1 0 1 1 0 8 0 ipqe 40 9 0 3 1 0 1 1 0 8 0 inpcb 344 1186 0 1146 26 17 9 10 0 8 5 nd6 104 40 0 14 1 0 1 1 0 8 0 pkpcb 40 4 0 4 2 1 1 1 0 8 1 kcovpl 48 10 0 2 1 0 1 1 0 8 0 ppxss 1072 21 0 19 4 3 1 1 0 8 0 pppxif 1376 2 0 1 2 1 1 1 0 8 0 pfstscr 40 2 0 2 1 0 1 1 0 8 1 pfanchor 1288 7 0 0 1 0 1 1 0 8 0 pfstitem 24 2 0 0 1 0 1 1 0 8 0 pfstkey 128 4 0 2 1 0 1 1 0 8 0 pfstate 344 2 0 1 1 0 1 1 0 8 0 pfrule 1344 5 0 4 3 2 1 1 0 8 0 art_heap8 4096 4 0 0 4 0 4 4 0 8 0 art_heap4 256 665 0 202 34 2 32 32 0 8 2 art_table 32 669 0 202 5 0 5 5 0 8 1 art_node 16 157 0 59 1 0 1 1 0 8 0 sysvmsgpl 40 1 0 1 1 1 0 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 26 0 12 1 0 1 1 0 8 0 shmpl 112 29 0 2 1 0 1 1 0 8 0 dirhash 1024 36 0 19 3 0 3 3 0 8 0 dino2pl 256 3146 0 1645 95 0 95 95 0 8 0 ffsino 248 3146 0 1645 95 0 95 95 0 8 0 nchpl 144 4479 0 2797 63 0 63 63 0 8 0 rtmask 32 2 0 2 2 1 1 1 0 8 1 uvmvnodes 80 4080 0 0 84 0 84 84 0 8 0 vnodes 216 4080 0 0 227 0 227 227 0 8 0 namei 1024 16547 0 16544 5 4 1 2 0 8 0 kstatmem 264 68 0 42 2 0 2 2 0 8 0 scsiplug 72 6 0 6 3 2 1 1 0 8 1 scxspl 216 14204 0 14204 10 8 2 8 1 8 2 plimitpl 152 264 0 248 1 0 1 1 0 8 0 sigapl 424 1246 0 1201 6 0 6 6 0 8 0 futexpl 64 12294 0 12288 1 0 1 1 0 8 0 knotepl 120 169111 0 169062 18 8 10 10 0 8 8 kqueuepl 184 223 0 212 1 0 1 1 0 8 0 pipepl 296 317 0 290 8 0 8 8 0 8 5 fdescpl 440 1229 0 1201 5 1 4 5 0 8 0 filepl 120 8629 0 8169 22 7 15 15 0 8 0 lockfpl 104 376 0 374 1 0 1 1 0 8 0 lockfspl 48 113 0 111 1 0 1 1 0 8 0 sessionpl 144 24 0 16 1 0 1 1 0 8 0 pgrppl 48 140 0 124 1 0 1 1 0 8 0 ucredpl 104 1281 0 1269 1 0 1 1 0 8 0 zombiepl 144 1532 0 1530 2 1 1 1 0 8 0 processpl 1104 1246 0 1201 4 0 4 4 0 8 0 procpl 656 2579 0 2525 7 1 6 6 0 8 0 sosppl 168 1 0 1 1 1 0 1 0 8 0 sockpl 528 2385 0 2259 28 18 10 14 0 8 1 mcl64k 65536 9 0 9 3 2 1 1 0 8 1 mcl8k 8192 23 0 23 4 3 1 1 0 8 1 mcl4k 4096 3536 0 3486 16 8 8 14 0 8 1 mcl2k 2048 1070 0 1068 2 0 2 2 0 8 1 mtagpl 96 131 0 13 3 0 3 3 0 8 0 mbufpl 256 12806 0 12501 25 0 25 25 0 8 4 bufpl 280 4265 0 216 290 0 290 290 0 8 0 anonpl 24 167525 0 161382 95 36 59 59 0 187 7 amapchunkpl 152 34298 0 33741 45 11 34 34 0 158 7 amappl16 200 2177 0 2043 28 15 13 15 0 8 0 amappl15 192 5 0 5 1 1 0 1 0 8 0 amappl14 184 105 0 95 1 0 1 1 0 8 0 amappl13 176 3 0 3 2 1 1 1 0 8 1 amappl12 168 1872 0 1844 2 0 2 2 0 8 0 amappl11 160 47 0 37 1 0 1 1 0 8 0 amappl10 152 5 0 5 2 1 1 1 0 8 1 amappl9 144 250 0 250 1 1 0 1 0 8 0 amappl8 136 22 0 20 1 0 1 1 0 8 0 amappl7 128 96 0 86 1 0 1 1 0 8 0 amappl6 120 188 0 184 1 0 1 1 0 8 0 amappl5 112 121 0 114 1 0 1 1 0 8 0 amappl4 104 295 0 278 1 0 1 1 0 8 0 amappl3 96 6824 0 6719 4 0 4 4 0 8 0 amappl2 88 651 0 595 2 0 2 2 0 8 0 amappl1 80 10219 0 9698 15 3 12 13 0 8 1 amappl 88 9996 0 9827 5 0 5 5 0 92 0 dma32768 32768 1 0 1 1 1 0 1 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 2 1 1 1 0 8 1 dma128 128 253 0 253 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 31 0 2 1 0 1 1 0 8 0 uaddrrnd 24 1229 0 1201 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1229 0 1201 1 0 1 1 0 8 0 vmmpekpl 168 11497 0 11457 3 0 3 3 0 8 0 vmmpepl 168 77845 0 76034 102 14 88 88 0 357 4 vmsppl 360 1228 0 1201 4 1 3 4 0 8 0 rwobjpl 32 25422 0 20350 42 0 42 42 0 8 0 pdppl 4096 2464 0 2402 100 34 66 80 0 8 4 pvpl 32 510022 0 498643 199 70 129 129 0 265 26 pmappl 216 1228 0 1201 3 0 3 3 0 8 0 extentpl 40 55 0 38 1 0 1 1 0 8 0 phpool 112 306 0 58 8 0 8 8 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:437 panic(ffffffff83405dd0) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff833b3398,ffffffff83301e66,3b0,ffffffff833bb56d) at __assert+0x29 refcnt_finalize(ffff80002a8cb5d0,ffffffff833033a1) at refcnt_finalize+0x1c8 sys/kern/kern_synch.c:945 pppx_if_destroy(205b9a,ffff80002a8cb5c8) at pppx_if_destroy+0x3d sys/net/if_pppx.c:806 pppxclose(205b9a,1,2000,ffff80002a8e67e0) at pppxclose+0xa0 sys/net/if_pppx.c:553 spec_close(ffff800031516be0) at spec_close+0x412 VOP_CLOSE(fffffd806bdf61d0,1,fffffd807f7d7138,ffff80002a8e67e0) at VOP_CLOSE+0x12a sys/kern/vfs_vops.c:156 vn_closefile(fffffd806a8c9168,ffff80002a8e67e0) at vn_closefile+0x11d vn_close sys/kern/vfs_vnops.c:292 [inline] vn_closefile(fffffd806a8c9168,ffff80002a8e67e0) at vn_closefile+0x11d sys/kern/vfs_vnops.c:615 fdrop(fffffd806a8c9168,ffff80002a8e67e0) at fdrop+0x126 sys/kern/kern_descrip.c:1265 closef(fffffd806a8c9168,ffff80002a8e67e0) at closef+0x18d sys/kern/kern_descrip.c:1249 fdfree(ffff80002a8e67e0) at fdfree+0x115 sys/kern/kern_descrip.c:1181 exit1(ffff80002a8e67e0,0,0,1) at exit1+0x57f sys/kern/kern_exit.c:214 sys_exit(ffff80002a8e67e0,ffff800031516f50,ffff800031516ea0) at sys_exit+0x1a syscall(ffff800031516f50) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x73c827612890, count: -16 ddb> machine ddbcpu 1 No such command ddb> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff83405dd0) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff833b3398,ffffffff83301e66,3b0,ffffffff833bb56d) at __assert+0x29 refcnt_finalize(ffff80002a8cb5d0,ffffffff833033a1) at refcnt_finalize+0x1c8 sys/kern/kern_synch.c:945 pppx_if_destroy(205b9a,ffff80002a8cb5c8) at pppx_if_destroy+0x3d sys/net/if_pppx.c:806 pppxclose(205b9a,1,2000,ffff80002a8e67e0) at pppxclose+0xa0 sys/net/if_pppx.c:553 spec_close(ffff800031516be0) at spec_close+0x412 VOP_CLOSE(fffffd806bdf61d0,1,fffffd807f7d7138,ffff80002a8e67e0) at VOP_CLOSE+0x12a sys/kern/vfs_vops.c:156 vn_closefile(fffffd806a8c9168,ffff80002a8e67e0) at vn_closefile+0x11d vn_close sys/kern/vfs_vnops.c:292 [inline] vn_closefile(fffffd806a8c9168,ffff80002a8e67e0) at vn_closefile+0x11d sys/kern/vfs_vnops.c:615 fdrop(fffffd806a8c9168,ffff80002a8e67e0) at fdrop+0x126 sys/kern/kern_descrip.c:1265 closef(fffffd806a8c9168,ffff80002a8e67e0) at closef+0x18d sys/kern/kern_descrip.c:1249 fdfree(ffff80002a8e67e0) at fdfree+0x115 sys/kern/kern_descrip.c:1181 exit1(ffff80002a8e67e0,0,0,1) at exit1+0x57f sys/kern/kern_exit.c:214 sys_exit(ffff80002a8e67e0,ffff800031516f50,ffff800031516ea0) at sys_exit+0x1a syscall(ffff800031516f50) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x73c827612890, count: -16