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(ffffffff83405a4d) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff833af7dc,ffffffff832ffc06,3b0,ffffffff833b8d9a) at __assert+0x29 refcnt_finalize(ffff80002a872b08,ffffffff832ff175) at refcnt_finalize+0x1c8 sys/kern/kern_synch.c:945 pppx_if_destroy(205b9a,ffff80002a872b00) at pppx_if_destroy+0x3d sys/net/if_pppx.c:806 pppxclose(205b9a,1,2000,ffff80003c997c00) at pppxclose+0xa0 sys/net/if_pppx.c:553 spec_close(ffff800034122d90) at spec_close+0x412 VOP_CLOSE(fffffd805f8cd560,1,fffffd807f7d79c0,ffff80003c997c00) at VOP_CLOSE+0x12a sys/kern/vfs_vops.c:156 vn_closefile(fffffd806c0b59d8,ffff80003c997c00) at vn_closefile+0x11d vn_close sys/kern/vfs_vnops.c:292 [inline] vn_closefile(fffffd806c0b59d8,ffff80003c997c00) at vn_closefile+0x11d sys/kern/vfs_vnops.c:615 fdrop(fffffd806c0b59d8,ffff80003c997c00) at fdrop+0x126 sys/kern/kern_descrip.c:1265 closef(fffffd806c0b59d8,ffff80003c997c00) at closef+0x18d sys/kern/kern_descrip.c:1249 fdfree(ffff80003c997c00) at fdfree+0x115 sys/kern/kern_descrip.c:1181 exit1(ffff80003c997c00,0,0,1) at exit1+0x57f sys/kern/kern_exit.c:214 sys_exit(ffff80003c997c00,ffff800034123100,ffff800034123050) at sys_exit+0x1a end trace frame: 0xffff8000341230f0, 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(ffffffff83405a4d) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff833af7dc,ffffffff832ffc06,3b0,ffffffff833b8d9a) at __assert+0x29 refcnt_finalize(ffff80002a872b08,ffffffff832ff175) at refcnt_finalize+0x1c8 sys/kern/kern_synch.c:945 pppx_if_destroy(205b9a,ffff80002a872b00) at pppx_if_destroy+0x3d sys/net/if_pppx.c:806 pppxclose(205b9a,1,2000,ffff80003c997c00) at pppxclose+0xa0 sys/net/if_pppx.c:553 spec_close(ffff800034122d90) at spec_close+0x412 VOP_CLOSE(fffffd805f8cd560,1,fffffd807f7d79c0,ffff80003c997c00) at VOP_CLOSE+0x12a sys/kern/vfs_vops.c:156 vn_closefile(fffffd806c0b59d8,ffff80003c997c00) at vn_closefile+0x11d vn_close sys/kern/vfs_vnops.c:292 [inline] vn_closefile(fffffd806c0b59d8,ffff80003c997c00) at vn_closefile+0x11d sys/kern/vfs_vnops.c:615 fdrop(fffffd806c0b59d8,ffff80003c997c00) at fdrop+0x126 sys/kern/kern_descrip.c:1265 closef(fffffd806c0b59d8,ffff80003c997c00) at closef+0x18d sys/kern/kern_descrip.c:1249 fdfree(ffff80003c997c00) at fdfree+0x115 sys/kern/kern_descrip.c:1181 exit1(ffff80003c997c00,0,0,1) at exit1+0x57f sys/kern/kern_exit.c:214 sys_exit(ffff80003c997c00,ffff800034123100,ffff800034123050) at sys_exit+0x1a syscall(ffff800034123100) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7c6942512a00, count: -16 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff800034122b70 rbx 0xffffffff82ec0180 pppxclose rdx 0 rcx 0 rax 0xffff80003c997c00 r8 0x101010101010101 r9 0x8080808080808080 r10 0x10bdacc3453afcfb r11 0x8861747ca165d855 r12 0 r13 0 r14 0 r15 0x1 rip 0xffffffff81f19ef5 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff800034122b60 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb> show proc PROC (syz-executor) tid=388977 pid=39355 tcnt=0 stat=onproc flags process=1008 proc=2000 runpri=32, usrpri=50, slppri=32, nice=20 wchan=0x0, wmesg=, ps_single=0xffff80003c997c00 scnt=-1 ecnt=1 forw=0xffffffffffffffff, list=0xffff80003c996f58,0xffff80003c996ce0 process=0xffff800034124018 user=0xffff80003411e000, vmspace=0xfffffd8077b19180 estcpu=36, cpticks=1, pctcpu=0.0, user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 56985 107249 20211 0 2 0 syz-executor 56985 339246 20211 0 3 0x4000000 smrbar syz-executor 70750 393031 54960 0 2 0x480 syz-executor 70750 401650 54960 0 3 0x4000080 ttyin syz-executor 70750 215855 54960 0 3 0x4000080 fsleep syz-executor 54960 107720 74251 0 3 0x82 nanoslp syz-executor 59986 91546 57886 0 3 0x80 nanoslp syz-executor 59986 317512 57886 0 3 0x4000080 rest syz-executor 59986 253701 57886 0 3 0x4000080 fsleep syz-executor 88478 306852 52623 -1 2 0x490 syz-executor 88478 256850 52623 -1 3 0x4000090 kqsel syz-executor 20211 282375 74251 0 3 0x82 nanoslp syz-executor 68041 247452 0 0 3 0x14200 acct acct 84501 316560 74251 0 3 0x82 nanoslp syz-executor 97932 416051 0 0 3 0x14200 bored sosplice 54389 132460 74251 0 3 0x82 nanoslp syz-executor 54227 340616 74251 0 3 0x82 nanoslp syz-executor 52623 439253 74251 0 3 0x82 nanoslp syz-executor 57886 45834 74251 0 3 0x82 nanoslp syz-executor 15251 313466 74251 0 3 0x82 nanoslp syz-executor 74251 299674 51157 0 3 0x82 kqread syz-executor 51157 222315 96668 0 3 0x10008a sigsusp ksh 96668 97535 61486 0 3 0x98 kqread sshd-session 61486 119365 19219 0 3 0x92 kqread sshd-session 75384 475511 1 0 3 0x100083 ttyin getty 19219 489645 1 0 3 0x88 kqread sshd 82614 409838 83695 73 3 0x1100090 kqread syslogd 83695 333448 1 0 3 0x100082 sbwait syslogd 75651 505165 1 0 3 0x100080 kqread resolvd 96982 510405 90113 77 3 0x100092 kqread dhcpleased 98354 107100 90113 77 3 0x100092 kqread dhcpleased 90113 120816 1 0 3 0x80 kqread dhcpleased 48166 407221 0 0 3 0x14200 bored smr 59871 265746 0 0 2 0x14200 zerothread 26878 510865 0 0 3 0x14200 aiodoned aiodoned 92622 40380 0 0 3 0x14200 syncer update 45675 286860 0 0 3 0x14200 cleaner cleaner 16412 397301 0 0 3 0x14200 reaper reaper 63138 49917 0 0 3 0x14200 pgdaemon pagedaemon 58208 204295 0 0 3 0x14200 bored viomb 3942 414692 0 0 3 0x40014200 acpi0 acpi0 95486 155855 0 0 3 0x14200 bored softnet3 54420 219826 0 0 3 0x14200 bored softnet2 20259 276599 0 0 3 0x14200 bored softnet1 36636 134148 0 0 3 0x14200 bored softnet0 38405 513338 0 0 3 0x14200 bored systqmp 77425 344760 0 0 3 0x14200 bored systq 94172 483084 0 0 2 0x40014200 softclock 5842 244099 0 0 3 0x40014200 idle0 1 73039 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 10238 11380K 15539K 166960K 13382 0 pcb 18 16K 18K 166960K 388 0 rtable 218 11K 12K 166960K 644 0 pf 34 13K 20K 166960K 122 0 ifaddr 43 7K 8K 166960K 104 0 ifgroup 55 2K 2K 166960K 166 0 sysctl 4 1K 5K 166960K 5 0 counters 32 17K 17K 166960K 73 0 ioctlops 0 0K 4K 166960K 149 0 iov 0 0K 17K 166960K 73 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1462 92K 92K 166960K 2786 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 9K 166960K 16 0 VM map 2 1K 1K 166960K 2 0 sem 12 0K 0K 166960K 71 0 dirhash 12 2K 2K 166960K 21 0 ACPI 1690 195K 286K 166960K 12468 0 file desc 18 65K 85K 166960K 1196 0 sigio 0 0K 0K 166960K 18 0 proc 60 59K 91K 166960K 691 0 subproc 72 4K 4K 166960K 108 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 0 0K 0K 166960K 139 0 in_multi 96 7K 7K 166960K 179 0 ether_multi 1 0K 0K 166960K 6 0 mrt 1 0K 0K 166960K 5 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 265 1182K 1182K 166960K 265 0 exec 0 0K 1K 166960K 546 0 fusefs mount 1 32K 32K 166960K 1 0 pfkey data 0 0K 0K 166960K 2 0 tdb 3 0K 0K 166960K 3 0 VM swap 8 62K 64K 166960K 10 0 UVM amap 222 72K 88K 166960K 12124 0 UVM aobj 27 2K 4K 166960K 33 0 pinsyscall 39 78K 92K 166960K 2322 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 2 0K 0K 166960K 97 0 NDP 13 0K 1K 166960K 73 0 temp 63 8632K 8760K 166960K 27125 0 kqueue 15 24K 30K 166960K 199 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 198 0 195 3 0 3 3 0 8 2 rtentry 112 185 0 89 4 0 4 4 0 8 0 unpcb 144 921 0 902 7 1 6 6 0 8 5 syncache 336 4 0 4 2 1 1 1 0 8 1 tcpcb 808 531 0 526 11 2 9 11 0 8 8 arp 88 31 0 13 1 0 1 1 0 8 0 ipq 40 5 0 1 1 0 1 1 0 8 0 ipqe 40 10 0 6 1 0 1 1 0 8 0 inpcb 344 1546 0 1532 10 1 9 10 0 8 7 nd6 104 41 0 18 1 0 1 1 0 8 0 pkpcb 40 9 0 9 1 0 1 1 0 8 1 kcovpl 48 12 0 4 1 0 1 1 0 8 0 ppxss 1072 25 0 24 2 1 1 1 0 8 0 pppxif 1376 6 0 5 1 0 1 1 0 8 0 art_heap8 4096 3 0 0 3 0 3 3 0 8 0 art_heap4 256 742 0 309 29 0 29 29 0 8 1 art_table 32 745 0 309 4 0 4 4 0 8 0 art_node 16 181 0 99 1 0 1 1 0 8 0 sysvmsgpl 40 14 0 7 1 0 1 1 0 8 0 semapl 112 67 0 57 1 0 1 1 0 8 0 shmpl 112 30 0 6 2 1 1 1 0 8 0 dirhash 1024 23 0 6 3 0 3 3 0 8 0 dino2pl 256 3504 0 2004 95 0 95 95 0 8 0 ffsino 248 3504 0 2004 95 0 95 95 0 8 0 nchpl 144 5201 0 3510 63 0 63 63 0 8 0 uvmvnodes 80 4639 0 0 95 0 95 95 0 8 0 vnodes 216 4639 0 0 258 0 258 258 0 8 0 namei 1024 18986 0 18986 3 2 1 2 0 8 1 kstatmem 264 92 0 68 2 0 2 2 0 8 0 scsiplug 72 3 0 3 1 0 1 1 0 8 1 scxspl 216 15917 0 15917 9 1 8 8 1 8 8 plimitpl 152 381 0 364 1 0 1 1 0 8 0 sigapl 424 1468 0 1420 6 0 6 6 0 8 0 futexpl 64 16508 0 16506 1 0 1 1 0 8 0 knotepl 120 40343 0 40291 28 11 17 17 0 8 13 kqueuepl 184 384 0 371 4 0 4 4 0 8 3 pipepl 296 302 0 275 5 0 5 5 0 8 2 fdescpl 440 1449 0 1419 4 0 4 4 0 8 0 filepl 120 10452 0 10215 14 0 14 14 0 8 5 lockfpl 104 549 0 546 2 0 2 2 0 8 1 lockfspl 48 198 0 195 1 0 1 1 0 8 0 sessionpl 144 25 0 17 1 0 1 1 0 8 0 pgrppl 48 53 0 37 1 0 1 1 0 8 0 ucredpl 104 1952 0 1940 1 0 1 1 0 8 0 zombiepl 144 1424 0 1420 2 1 1 1 0 8 0 processpl 1104 1468 0 1420 4 0 4 4 0 8 0 procpl 648 3004 0 2950 6 0 6 6 0 8 0 sosppl 168 1 0 1 1 0 1 1 0 8 1 sockpl 528 2695 0 2658 13 3 10 12 0 8 7 mcl64k 65536 17 0 17 1 0 1 1 0 8 1 mcl9k 9216 34 0 34 1 0 1 1 0 8 1 mcl8k 8192 18 0 18 2 1 1 1 0 8 1 mcl4k 4096 3744 0 3689 15 6 9 14 0 8 1 mcl2k 2048 1310 0 1301 2 0 2 2 0 8 0 mtagpl 96 66 0 21 2 0 2 2 0 8 0 mbufpl 256 15952 0 15751 25 2 23 24 0 8 8 bufpl 280 4332 0 138 300 0 300 300 0 8 0 anonpl 24 253450 0 250146 92 22 70 70 0 187 42 amapchunkpl 152 40769 0 40260 35 3 32 32 0 158 10 amappl16 200 6041 0 6007 66 49 17 28 0 8 13 amappl15 192 2 0 2 1 1 0 1 0 8 0 amappl14 184 117 0 107 1 0 1 1 0 8 0 amappl13 176 24 0 24 2 1 1 1 0 8 1 amappl12 168 2145 0 2115 2 0 2 2 0 8 0 amappl11 160 44 0 34 1 0 1 1 0 8 0 amappl10 152 4 0 3 1 0 1 1 0 8 0 amappl9 144 249 0 249 1 1 0 1 0 8 0 amappl8 136 28 0 27 1 0 1 1 0 8 0 amappl7 128 110 0 100 1 0 1 1 0 8 0 amappl6 120 227 0 223 1 0 1 1 0 8 0 amappl5 112 130 0 123 1 0 1 1 0 8 0 amappl4 104 295 0 279 1 0 1 1 0 8 0 amappl3 96 7954 0 7837 4 0 4 4 0 8 0 amappl2 88 681 0 625 2 0 2 2 0 8 0 amappl1 80 10835 0 10310 13 1 12 13 0 8 0 amappl 88 11661 0 11487 5 0 5 5 0 92 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 6 0 6 1 1 0 1 0 8 0 dma128 128 254 0 254 2 1 1 1 0 8 1 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 32 0 6 1 0 1 1 0 8 0 uaddrrnd 24 1449 0 1419 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1449 0 1419 1 0 1 1 0 8 0 vmmpekpl 168 12331 0 12297 2 0 2 2 0 8 0 vmmpepl 168 94369 0 92575 108 8 100 100 0 357 18 vmsppl 360 1448 0 1419 4 1 3 4 0 8 0 rwobjpl 32 31482 0 25951 47 0 47 47 0 8 1 pdppl 4096 2905 0 2838 105 36 69 77 0 8 2 pvpl 32 655159 0 645724 200 41 159 159 0 265 64 pmappl 216 1448 0 1419 2 0 2 2 0 8 0 extentpl 40 55 0 38 1 0 1 1 0 8 0 phpool 112 299 0 52 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(ffffffff83405a4d) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff833af7dc,ffffffff832ffc06,3b0,ffffffff833b8d9a) at __assert+0x29 refcnt_finalize(ffff80002a872b08,ffffffff832ff175) at refcnt_finalize+0x1c8 sys/kern/kern_synch.c:945 pppx_if_destroy(205b9a,ffff80002a872b00) at pppx_if_destroy+0x3d sys/net/if_pppx.c:806 pppxclose(205b9a,1,2000,ffff80003c997c00) at pppxclose+0xa0 sys/net/if_pppx.c:553 spec_close(ffff800034122d90) at spec_close+0x412 VOP_CLOSE(fffffd805f8cd560,1,fffffd807f7d79c0,ffff80003c997c00) at VOP_CLOSE+0x12a sys/kern/vfs_vops.c:156 vn_closefile(fffffd806c0b59d8,ffff80003c997c00) at vn_closefile+0x11d vn_close sys/kern/vfs_vnops.c:292 [inline] vn_closefile(fffffd806c0b59d8,ffff80003c997c00) at vn_closefile+0x11d sys/kern/vfs_vnops.c:615 fdrop(fffffd806c0b59d8,ffff80003c997c00) at fdrop+0x126 sys/kern/kern_descrip.c:1265 closef(fffffd806c0b59d8,ffff80003c997c00) at closef+0x18d sys/kern/kern_descrip.c:1249 fdfree(ffff80003c997c00) at fdfree+0x115 sys/kern/kern_descrip.c:1181 exit1(ffff80003c997c00,0,0,1) at exit1+0x57f sys/kern/kern_exit.c:214 sys_exit(ffff80003c997c00,ffff800034123100,ffff800034123050) at sys_exit+0x1a syscall(ffff800034123100) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7c6942512a00, 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(ffffffff83405a4d) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff833af7dc,ffffffff832ffc06,3b0,ffffffff833b8d9a) at __assert+0x29 refcnt_finalize(ffff80002a872b08,ffffffff832ff175) at refcnt_finalize+0x1c8 sys/kern/kern_synch.c:945 pppx_if_destroy(205b9a,ffff80002a872b00) at pppx_if_destroy+0x3d sys/net/if_pppx.c:806 pppxclose(205b9a,1,2000,ffff80003c997c00) at pppxclose+0xa0 sys/net/if_pppx.c:553 spec_close(ffff800034122d90) at spec_close+0x412 VOP_CLOSE(fffffd805f8cd560,1,fffffd807f7d79c0,ffff80003c997c00) at VOP_CLOSE+0x12a sys/kern/vfs_vops.c:156 vn_closefile(fffffd806c0b59d8,ffff80003c997c00) at vn_closefile+0x11d vn_close sys/kern/vfs_vnops.c:292 [inline] vn_closefile(fffffd806c0b59d8,ffff80003c997c00) at vn_closefile+0x11d sys/kern/vfs_vnops.c:615 fdrop(fffffd806c0b59d8,ffff80003c997c00) at fdrop+0x126 sys/kern/kern_descrip.c:1265 closef(fffffd806c0b59d8,ffff80003c997c00) at closef+0x18d sys/kern/kern_descrip.c:1249 fdfree(ffff80003c997c00) at fdfree+0x115 sys/kern/kern_descrip.c:1181 exit1(ffff80003c997c00,0,0,1) at exit1+0x57f sys/kern/kern_exit.c:214 sys_exit(ffff80003c997c00,ffff800034123100,ffff800034123050) at sys_exit+0x1a syscall(ffff800034123100) at syscall+0x97e sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7c6942512a00, count: -16