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:438 panic(ffffffff83408af9) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff833b4574,ffffffff832fd646,3b0,ffffffff833b636d) at __assert+0x29 refcnt_finalize(ffff80003a941588,ffffffff832feefd) at refcnt_finalize+0x1c8 sys/kern/kern_synch.c:945 pppx_if_destroy(205b9a,ffff80003a941580) at pppx_if_destroy+0x3d sys/net/if_pppx.c:806 pppxclose(205b9a,1,2000,ffff80002a7de018) at pppxclose+0xa0 sys/net/if_pppx.c:553 spec_close(ffff80003c967140) at spec_close+0x412 VOP_CLOSE(fffffd8066a91570,1,fffffd807f7d7478,ffff80002a7de018) at VOP_CLOSE+0x12a sys/kern/vfs_vops.c:156 vn_closefile(fffffd806bf272e0,ffff80002a7de018) at vn_closefile+0x11d vn_close sys/kern/vfs_vnops.c:292 [inline] vn_closefile(fffffd806bf272e0,ffff80002a7de018) at vn_closefile+0x11d sys/kern/vfs_vnops.c:615 fdrop(fffffd806bf272e0,ffff80002a7de018) at fdrop+0x126 sys/kern/kern_descrip.c:1265 closef(fffffd806bf272e0,ffff80002a7de018) at closef+0x18d sys/kern/kern_descrip.c:1249 fdfree(ffff80002a7de018) at fdfree+0x115 sys/kern/kern_descrip.c:1181 exit1(ffff80002a7de018,0,0,1) at exit1+0x57f sys/kern/kern_exit.c:216 sys_exit(ffff80002a7de018,ffff80003c9674b0,ffff80003c967400) at sys_exit+0x1a end trace frame: 0xffff80003c9674a0, 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:438 panic(ffffffff83408af9) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff833b4574,ffffffff832fd646,3b0,ffffffff833b636d) at __assert+0x29 refcnt_finalize(ffff80003a941588,ffffffff832feefd) at refcnt_finalize+0x1c8 sys/kern/kern_synch.c:945 pppx_if_destroy(205b9a,ffff80003a941580) at pppx_if_destroy+0x3d sys/net/if_pppx.c:806 pppxclose(205b9a,1,2000,ffff80002a7de018) at pppxclose+0xa0 sys/net/if_pppx.c:553 spec_close(ffff80003c967140) at spec_close+0x412 VOP_CLOSE(fffffd8066a91570,1,fffffd807f7d7478,ffff80002a7de018) at VOP_CLOSE+0x12a sys/kern/vfs_vops.c:156 vn_closefile(fffffd806bf272e0,ffff80002a7de018) at vn_closefile+0x11d vn_close sys/kern/vfs_vnops.c:292 [inline] vn_closefile(fffffd806bf272e0,ffff80002a7de018) at vn_closefile+0x11d sys/kern/vfs_vnops.c:615 fdrop(fffffd806bf272e0,ffff80002a7de018) at fdrop+0x126 sys/kern/kern_descrip.c:1265 closef(fffffd806bf272e0,ffff80002a7de018) at closef+0x18d sys/kern/kern_descrip.c:1249 fdfree(ffff80002a7de018) at fdfree+0x115 sys/kern/kern_descrip.c:1181 exit1(ffff80002a7de018,0,0,1) at exit1+0x57f sys/kern/kern_exit.c:216 sys_exit(ffff80002a7de018,ffff80003c9674b0,ffff80003c967400) at sys_exit+0x1a syscall(ffff80003c9674b0) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7199b63aa110, count: -16 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80003c966f20 rbx 0xffffffff81e58a50 pppxclose rdx 0 rcx 0 rax 0xffff80002a7de018 r8 0 r9 0x8080808080808080 r10 0x25018924b1d914a5 r11 0xea7d5a551485b24d r12 0 r13 0 r14 0 r15 0x1 rip 0xffffffff828f07e5 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff80003c966f10 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb> show proc PROC (syz-executor) tid=270699 pid=77219 tcnt=0 stat=onproc flags process=1008 proc=2000 runpri=32, usrpri=81, slppri=32, nice=20 wchan=0x0, wmesg=, ps_single=0xffff80002a7de018 scnt=-1 ecnt=1 forw=0xffffffffffffffff, list=0xffff80002a7de538,0xffff80003c9614b8 process=0xffff800036d248c8 user=0xffff80003c962000, vmspace=0xfffffd806c0da2e0 estcpu=31, cpticks=1, pctcpu=0.0, user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 24169 128894 67828 0 3 0x80 fsleep syz-executor 24169 362766 67828 0 3 0x4000000 smrbar syz-executor 66326 165358 1218 0 3 0x80 fsleep syz-executor 66326 153468 1218 0 3 0x4000080 sbwait syz-executor 66326 370998 1218 0 3 0x4000080 fsleep syz-executor 78745 158014 77236 0 3 0x80 fsleep syz-executor 78745 188998 77236 0 2 0x4000000 syz-executor 58666 217454 27130 0 3 0x80 fsleep syz-executor 58666 174789 27130 0 3 0x4000080 piperd syz-executor 60178 406290 0 0 3 0x14200 acct acct 13515 311981 0 0 3 0x14200 bored sosplice 39721 409234 57938 0 3 0x82 wait syz-executor 27130 214139 57938 0 3 0x82 nanoslp syz-executor 77236 23763 57938 0 3 0x82 nanoslp syz-executor 57342 356794 57938 0 3 0x82 nanoslp syz-executor 67828 51158 57938 0 2 0x482 syz-executor 64271 147084 57938 0 2 0x2 syz-executor 1218 409354 57938 0 3 0x82 nanoslp syz-executor 71859 490984 57938 0 3 0x82 nanoslp syz-executor 57938 66070 24556 0 3 0x82 kqread syz-executor 24556 287965 13538 0 3 0x10008a sigsusp ksh 13538 177271 82895 0 3 0x98 kqread sshd-session 82895 262048 72057 0 3 0x92 kqread sshd-session 74444 373385 1 0 3 0x100083 ttyopn getty 72057 10875 1 0 3 0x88 kqread sshd 11370 465351 13447 73 3 0x1100090 kqread syslogd 13447 263114 1 0 3 0x100082 sbwait syslogd 39094 385954 1 0 3 0x100080 kqread resolvd 82646 336132 57650 77 3 0x100092 kqread dhcpleased 73839 57308 57650 77 3 0x100092 kqread dhcpleased 57650 363932 1 0 3 0x80 kqread dhcpleased 64713 410087 0 0 3 0x14200 bored smr 63538 467247 0 0 2 0x14200 zerothread 39627 317772 0 0 3 0x14200 aiodoned aiodoned 60877 10669 0 0 3 0x14200 syncer update 65937 86396 0 0 3 0x14200 cleaner cleaner 50402 324536 0 0 2 0x14200 reaper 1234 271420 0 0 3 0x14200 pgdaemon pagedaemon 15545 155191 0 0 3 0x14200 bored viomb 68806 408133 0 0 3 0x40014200 acpi0 acpi0 20733 98557 0 0 3 0x14200 bored softnet3 8590 517135 0 0 3 0x14200 bored softnet2 54570 410375 0 0 3 0x14200 bored softnet1 69130 95009 0 0 3 0x14200 bored softnet0 49197 138931 0 0 3 0x14200 bored systqmp 6454 407845 0 0 3 0x14200 bored systq 92215 206907 0 0 2 0x40014200 softclock 15070 411014 0 0 3 0x40014200 idle0 1 474590 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 10222 11077K 11374K 166960K 11724 0 pcb 17 14K 16K 166960K 217 0 rtable 214 9K 10K 166960K 453 0 pf 35 13K 20K 166960K 70 0 ifaddr 41 7K 7K 166960K 62 0 ifgroup 57 2K 2K 166960K 82 0 sysctl 3 1K 1K 166960K 3 0 counters 34 17K 17K 166960K 48 0 ioctlops 0 0K 4K 166960K 136 0 iov 1 4K 20K 166960K 28 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1372 86K 86K 166960K 1754 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 2K 14K 166960K 12 0 VM map 2 1K 1K 166960K 2 0 sem 12 0K 0K 166960K 23 0 dirhash 12 2K 2K 166960K 15 0 ACPI 1692 195K 286K 166960K 12470 0 file desc 17 61K 240K 166960K 513 0 sigio 0 0K 0K 166960K 11 0 proc 60 59K 124K 166960K 523 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 30 0 in_multi 86 6K 7K 166960K 105 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 91 413K 413K 166960K 91 0 exec 0 0K 1K 166960K 403 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 216 72K 86K 166960K 6145 0 UVM aobj 15 2K 2K 166960K 17 0 pinsyscall 38 76K 96K 166960K 1539 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 19 0 NDP 13 0K 2K 166960K 38 0 temp 51 8633K 8697K 166960K 15827 0 kqueue 14 22K 32K 166960K 107 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 66 0 63 1 0 1 1 0 8 0 rtentry 112 133 0 39 4 0 4 4 0 8 0 unpcb 144 411 0 392 4 0 4 4 0 8 3 syncache 336 3 0 3 1 1 0 1 0 8 0 tcpcb 808 108 0 104 4 3 1 4 0 8 0 arp 88 23 0 6 1 0 1 1 0 8 0 ipq 40 1 0 0 1 0 1 1 0 8 0 ipqe 40 1 0 0 1 0 1 1 0 8 0 inpcb 344 552 0 542 13 6 7 7 0 8 5 nd6 104 27 0 4 1 0 1 1 0 8 0 pkpcb 40 2 0 2 2 1 1 1 0 8 1 kcovpl 48 8 0 0 1 0 1 1 0 8 0 ppxss 1072 14 0 11 2 1 1 1 0 8 0 pppxif 1376 4 0 2 1 0 1 1 0 8 0 pfanchor 1288 1 0 0 1 0 1 1 0 8 0 pfrule 1344 3 0 2 1 0 1 1 0 8 0 art_heap8 4096 3 0 0 3 0 3 3 0 8 0 art_heap4 256 504 0 110 29 0 29 29 0 8 3 art_table 32 507 0 110 4 0 4 4 0 8 0 art_node 16 128 0 44 1 0 1 1 0 8 0 sysvmsgpl 40 6 0 3 2 1 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 19 0 9 1 0 1 1 0 8 0 shmpl 112 14 0 2 1 0 1 1 0 8 0 dirhash 1024 19 0 2 3 0 3 3 0 8 0 dino2pl 256 2321 0 822 95 0 95 95 0 8 0 ffsino 248 2321 0 822 95 0 95 95 0 8 0 nchpl 144 3057 0 1375 63 0 63 63 0 8 0 rtmask 32 1 0 1 1 0 1 1 0 8 1 uvmvnodes 80 2575 0 0 53 0 53 53 0 8 0 vnodes 216 2575 0 0 144 0 144 144 0 8 0 namei 1024 9484 0 9484 4 2 2 2 0 8 2 kstatmem 264 44 0 18 2 0 2 2 0 8 0 scsiplug 72 1 0 1 1 0 1 1 0 8 1 scxspl 216 9264 0 9264 8 7 1 8 1 8 1 plimitpl 152 255 0 238 1 0 1 1 0 8 0 sigapl 424 784 0 737 7 1 6 7 0 8 0 futexpl 64 6161 0 6156 1 0 1 1 0 8 0 knotepl 120 23787 0 23738 21 12 9 14 0 8 7 kqueuepl 184 148 0 137 1 0 1 1 0 8 0 pipepl 296 152 0 124 3 0 3 3 0 8 0 fdescpl 440 766 0 737 5 1 4 5 0 8 0 filepl 120 4471 0 4212 14 0 14 14 0 8 6 lockfpl 104 314 0 310 2 0 2 2 0 8 1 lockfspl 48 64 0 60 1 0 1 1 0 8 0 sessionpl 144 21 0 13 1 0 1 1 0 8 0 pgrppl 48 33 0 17 1 0 1 1 0 8 0 ucredpl 104 953 0 941 1 0 1 1 0 8 0 zombiepl 144 892 0 889 1 0 1 1 0 8 0 processpl 1112 784 0 737 4 0 4 4 0 8 0 procpl 656 1405 0 1352 6 0 6 6 0 8 0 sosppl 168 1 0 1 1 1 0 1 0 8 0 sockpl 528 1042 0 1012 11 4 7 7 0 8 5 mcl64k 65536 6 0 6 2 1 1 1 0 8 1 mcl16k 16384 6 0 6 2 1 1 1 0 8 1 mcl12k 12288 1 0 1 1 1 0 1 0 8 0 mcl8k 8192 13 0 13 2 1 1 1 0 8 1 mcl4k 4096 2928 0 2878 13 5 8 12 0 8 1 mcl2k2 2112 1 0 1 1 0 1 1 0 8 1 mcl2k 2048 474 0 472 1 0 1 1 0 8 0 mtagpl 96 20 0 5 1 0 1 1 0 8 0 mbufpl 256 7729 0 7537 14 0 14 14 0 8 1 bufpl 280 3080 0 125 212 0 212 212 0 8 0 anonpl 24 152431 0 149098 68 22 46 46 0 187 17 amapchunkpl 152 20480 0 19988 32 5 27 27 0 158 6 amappl16 200 3138 0 3106 27 15 12 15 0 8 8 amappl15 192 34 0 34 1 1 0 1 0 8 0 amappl14 184 107 0 97 1 0 1 1 0 8 0 amappl13 176 7 0 7 1 1 0 1 0 8 0 amappl12 168 1382 0 1353 3 1 2 3 0 8 0 amappl11 160 50 0 40 1 0 1 1 0 8 0 amappl10 152 20 0 20 1 1 0 1 0 8 0 amappl9 144 250 0 250 1 1 0 1 0 8 0 amappl8 136 26 0 24 1 0 1 1 0 8 0 amappl7 128 102 0 92 1 0 1 1 0 8 0 amappl6 120 168 0 164 1 0 1 1 0 8 0 amappl5 112 142 0 136 1 0 1 1 0 8 0 amappl4 104 287 0 271 1 0 1 1 0 8 0 amappl3 96 3688 0 3579 4 0 4 4 0 8 0 amappl2 88 620 0 565 2 0 2 2 0 8 0 amappl1 80 8634 0 8120 13 1 12 13 0 8 0 amappl 88 5771 0 5603 5 0 5 5 0 92 0 dma65536 65536 2 0 2 1 0 1 1 0 8 1 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 1 1 0 1 0 8 0 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 16 0 2 1 0 1 1 0 8 0 uaddrrnd 24 766 0 737 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 766 0 737 1 0 1 1 0 8 0 vmmpekpl 168 7556 0 7523 2 0 2 2 0 8 0 vmmpepl 168 52842 0 51112 100 10 90 90 0 357 11 vmsppl 360 765 0 737 4 1 3 4 0 8 0 rwobjpl 32 19786 0 16350 29 1 28 28 0 8 0 pdppl 4096 1539 0 1474 99 32 67 83 0 8 2 pvpl 32 367385 0 357972 139 30 109 117 0 265 24 pmappl 216 765 0 737 3 0 3 3 0 8 0 extentpl 40 55 0 38 1 0 1 1 0 8 0 phpool 112 276 0 48 7 0 7 7 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(ffffffff83408af9) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff833b4574,ffffffff832fd646,3b0,ffffffff833b636d) at __assert+0x29 refcnt_finalize(ffff80003a941588,ffffffff832feefd) at refcnt_finalize+0x1c8 sys/kern/kern_synch.c:945 pppx_if_destroy(205b9a,ffff80003a941580) at pppx_if_destroy+0x3d sys/net/if_pppx.c:806 pppxclose(205b9a,1,2000,ffff80002a7de018) at pppxclose+0xa0 sys/net/if_pppx.c:553 spec_close(ffff80003c967140) at spec_close+0x412 VOP_CLOSE(fffffd8066a91570,1,fffffd807f7d7478,ffff80002a7de018) at VOP_CLOSE+0x12a sys/kern/vfs_vops.c:156 vn_closefile(fffffd806bf272e0,ffff80002a7de018) at vn_closefile+0x11d vn_close sys/kern/vfs_vnops.c:292 [inline] vn_closefile(fffffd806bf272e0,ffff80002a7de018) at vn_closefile+0x11d sys/kern/vfs_vnops.c:615 fdrop(fffffd806bf272e0,ffff80002a7de018) at fdrop+0x126 sys/kern/kern_descrip.c:1265 closef(fffffd806bf272e0,ffff80002a7de018) at closef+0x18d sys/kern/kern_descrip.c:1249 fdfree(ffff80002a7de018) at fdfree+0x115 sys/kern/kern_descrip.c:1181 exit1(ffff80002a7de018,0,0,1) at exit1+0x57f sys/kern/kern_exit.c:216 sys_exit(ffff80002a7de018,ffff80003c9674b0,ffff80003c967400) at sys_exit+0x1a syscall(ffff80003c9674b0) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7199b63aa110, 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(ffffffff83408af9) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff833b4574,ffffffff832fd646,3b0,ffffffff833b636d) at __assert+0x29 refcnt_finalize(ffff80003a941588,ffffffff832feefd) at refcnt_finalize+0x1c8 sys/kern/kern_synch.c:945 pppx_if_destroy(205b9a,ffff80003a941580) at pppx_if_destroy+0x3d sys/net/if_pppx.c:806 pppxclose(205b9a,1,2000,ffff80002a7de018) at pppxclose+0xa0 sys/net/if_pppx.c:553 spec_close(ffff80003c967140) at spec_close+0x412 VOP_CLOSE(fffffd8066a91570,1,fffffd807f7d7478,ffff80002a7de018) at VOP_CLOSE+0x12a sys/kern/vfs_vops.c:156 vn_closefile(fffffd806bf272e0,ffff80002a7de018) at vn_closefile+0x11d vn_close sys/kern/vfs_vnops.c:292 [inline] vn_closefile(fffffd806bf272e0,ffff80002a7de018) at vn_closefile+0x11d sys/kern/vfs_vnops.c:615 fdrop(fffffd806bf272e0,ffff80002a7de018) at fdrop+0x126 sys/kern/kern_descrip.c:1265 closef(fffffd806bf272e0,ffff80002a7de018) at closef+0x18d sys/kern/kern_descrip.c:1249 fdfree(ffff80002a7de018) at fdfree+0x115 sys/kern/kern_descrip.c:1181 exit1(ffff80002a7de018,0,0,1) at exit1+0x57f sys/kern/kern_exit.c:216 sys_exit(ffff80002a7de018,ffff80003c9674b0,ffff80003c967400) at sys_exit+0x1a syscall(ffff80003c9674b0) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7199b63aa110, count: -16