panic: kernel diagnostic assertion "refs != ~0" failed: file "/syzkaller/managers/main/kernel/sys/kern/kern_synch.c", line 951 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(ffffffff83338bb1) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff8337aff9,ffffffff833dcc6b,3b7,ffffffff833b701a) at __assert+0x29 sys/kern/subr_prf.c:-1 refcnt_finalize(ffff80003c97b618,ffffffff83337dfd) at refcnt_finalize+0x1c8 sys/kern/kern_synch.c:952 pppx_if_destroy(205b92,ffff80003c97b610) at pppx_if_destroy+0x3d sys/net/if_pppx.c:794 pppxclose(205b92,41,2000,ffff800038552550) at pppxclose+0xa0 sys/net/if_pppx.c:541 spec_close(ffff80003c9bd190) at spec_close+0x417 sys/kern/spec_vnops.c:-1 VOP_CLOSE(fffffd8064f29708,41,fffffd8007bfb478,ffff800038552550) at VOP_CLOSE+0x129 sys/kern/vfs_vops.c:156 vn_closefile(fffffd8069a73720,ffff800038552550) at vn_closefile+0x11d vn_close sys/kern/vfs_vnops.c:292 [inline] vn_closefile(fffffd8069a73720,ffff800038552550) at vn_closefile+0x11d sys/kern/vfs_vnops.c:615 fdrop(fffffd8069a73720,ffff800038552550) at fdrop+0x121 sys/kern/kern_descrip.c:1280 closef(fffffd8069a73720,ffff800038552550) at closef+0x190 sys/kern/kern_descrip.c:1264 fdfree(ffff800038552550) at fdfree+0x115 sys/kern/kern_descrip.c:1195 exit1(ffff800038552550,0,0,1) at exit1+0x576 sys/kern/kern_exit.c:215 sys_exit(ffff800038552550,ffff80003c9bd4f0,ffff80003c9bd440) at sys_exit+0x1a sys/kern/kern_exit.c:-1 end trace frame: 0xffff80003c9bd4e0, 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 951 ddb> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff83338bb1) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff8337aff9,ffffffff833dcc6b,3b7,ffffffff833b701a) at __assert+0x29 sys/kern/subr_prf.c:-1 refcnt_finalize(ffff80003c97b618,ffffffff83337dfd) at refcnt_finalize+0x1c8 sys/kern/kern_synch.c:952 pppx_if_destroy(205b92,ffff80003c97b610) at pppx_if_destroy+0x3d sys/net/if_pppx.c:794 pppxclose(205b92,41,2000,ffff800038552550) at pppxclose+0xa0 sys/net/if_pppx.c:541 spec_close(ffff80003c9bd190) at spec_close+0x417 sys/kern/spec_vnops.c:-1 VOP_CLOSE(fffffd8064f29708,41,fffffd8007bfb478,ffff800038552550) at VOP_CLOSE+0x129 sys/kern/vfs_vops.c:156 vn_closefile(fffffd8069a73720,ffff800038552550) at vn_closefile+0x11d vn_close sys/kern/vfs_vnops.c:292 [inline] vn_closefile(fffffd8069a73720,ffff800038552550) at vn_closefile+0x11d sys/kern/vfs_vnops.c:615 fdrop(fffffd8069a73720,ffff800038552550) at fdrop+0x121 sys/kern/kern_descrip.c:1280 closef(fffffd8069a73720,ffff800038552550) at closef+0x190 sys/kern/kern_descrip.c:1264 fdfree(ffff800038552550) at fdfree+0x115 sys/kern/kern_descrip.c:1195 exit1(ffff800038552550,0,0,1) at exit1+0x576 sys/kern/kern_exit.c:215 sys_exit(ffff800038552550,ffff80003c9bd4f0,ffff80003c9bd440) at sys_exit+0x1a sys/kern/kern_exit.c:-1 syscall(ffff80003c9bd4f0) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80003c9bd4f0) at syscall+0x962 sys/arch/amd64/amd64/trap.c:748 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7562539f4570, count: -16 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80003c9bcf70 rbx 0 rdx 0 rcx 0 rax 0xffff800038552550 r8 0x101010101010101 r9 0x8080808080808080 r10 0xede03c586d5715af r11 0x41017a8652079efe r12 0 r13 0 r14 0 r15 0x1 rip 0xffffffff81f5adf5 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff80003c9bcf60 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb> show proc PROC (syz-executor) tid=366521 pid=84368 tcnt=0 stat=onproc flags process=1008 proc=2000 runpri=32, usrpri=86, slppri=32, nice=20 wchan=0x0, wmesg=, ps_single=0xffff800038552550 scnt=-1 ecnt=1 forw=0xffffffffffffffff, list=0xffff80003c980028,0xffff8000385527f8 process=0xffff80002ed2a938 user=0xffff80003c9b8000, vmspace=0xfffffd806ba495d0 estcpu=36, cpticks=4, pctcpu=0.0, user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 28129 372006 45113 0 2 0 syz-executor 28129 39400 45113 0 3 0x4000080 fsleep syz-executor 24858 461546 97009 0 2 0 syz-executor 24858 467404 97009 0 3 0x4000080 kqpoll syz-executor 44995 384519 10451 0 2 0 syz-executor 44995 336420 10451 0 3 0x4000080 fsleep syz-executor 37448 24082 1550 0 2 0 syz-executor 37448 231893 1550 0 3 0x4000080 lockf syz-executor 37448 420089 1550 0 2 0x4000000 syz-executor 97631 9016 94053 0 2 0xc80 syz-executor 97631 427638 94053 0 3 0x4000080 sbwait syz-executor 97631 10066 94053 0 3 0x4000080 fsleep syz-executor 61353 228678 60674 0 3 0x80 nanoslp syz-executor 61353 441238 60674 0 3 0x4000000 smrbar syz-executor 12542 230625 40298 0 2 0 syz-executor 12542 277591 40298 0 3 0x4000080 fsleep syz-executor 5487 111385 0 0 3 0x14200 bored sosplice 45113 317359 72919 0 3 0x82 nanoslp syz-executor 60674 317492 72919 0 3 0x82 nanoslp syz-executor 97009 349284 72919 0 2 0xc82 syz-executor 40298 204441 72919 0 2 0xc82 syz-executor 10451 444547 72919 0 3 0x82 nanoslp syz-executor 94053 122675 72919 0 2 0xc82 syz-executor 1550 505301 72919 0 3 0x82 nanoslp syz-executor 33272 420487 72919 0 2 0xc82 syz-executor 72919 511947 48371 0 3 0x82 kqread syz-executor 48371 17356 7755 0 3 0x10008a sigsusp ksh 7755 446328 36434 0 3 0x98 kqread sshd-session 36434 496109 18181 0 3 0x92 kqread sshd-session 35489 340770 1 0 3 0x100083 ttyin getty 18181 247283 1 0 3 0x88 kqread sshd 76601 257360 6869 73 3 0x1100090 kqread syslogd 6869 11457 1 0 3 0x100082 sbwait syslogd 46548 74933 1 0 3 0x100080 kqread resolvd 61423 119788 93568 77 3 0x100092 kqread dhcpleased 69454 366456 93568 77 3 0x100092 kqread dhcpleased 93568 303416 1 0 3 0x80 kqread dhcpleased 39292 121153 0 0 2 0x14200 smr 92327 84602 0 0 2 0x14200 zerothread 27761 71034 0 0 3 0x14200 aiodoned aiodoned 67088 238002 0 0 3 0x14200 syncer update 85418 266393 0 0 3 0x14200 cleaner cleaner 78546 339721 0 0 3 0x14200 reaper reaper 25481 93290 0 0 3 0x14200 pgdaemon pagedaemon 83722 59503 0 0 3 0x14200 bored viomb 19939 369845 0 0 3 0x40014200 acpi0 acpi0 10663 299001 0 0 3 0x14200 bored softnet7 22164 346126 0 0 3 0x14200 bored softnet6 23921 291297 0 0 3 0x14200 bored softnet5 39659 294198 0 0 3 0x14200 bored softnet4 45242 285505 0 0 3 0x14200 bored softnet3 81851 249375 0 0 3 0x14200 bored softnet2 83765 456076 0 0 3 0x14200 bored softnet1 91526 363705 0 0 3 0x14200 bored softnet0 40610 166359 0 0 3 0x14200 smrbar systqmp 4988 467923 0 0 3 0x14200 bored systq 76735 342136 0 0 3 0x40014200 tmoslp softclock 3707 241598 0 0 3 0x40014200 idle0 1 494064 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 10201 11141K 11316K 166960K 11461 0 pcb 17 12K 12K 166960K 47 0 rtable 217 7K 7K 166960K 294 0 pf 36 14K 14K 166960K 50 0 ifaddr 44 7K 8K 166960K 56 0 ifgroup 59 2K 2K 166960K 72 0 sysctl 1 1K 9K 166960K 7 0 counters 36 18K 18K 166960K 46 0 ioctlops 0 0K 4K 166960K 53 0 iov 0 0K 12K 166960K 5 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1343 84K 85K 166960K 1527 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 5K 166960K 5 0 VM map 2 1K 1K 166960K 2 0 sem 7 0K 0K 166960K 8 0 dirhash 12 2K 2K 166960K 12 0 ACPI 1692 195K 286K 166960K 12470 0 file desc 18 65K 97K 166960K 301 0 sigio 0 0K 0K 166960K 15 0 proc 60 59K 124K 166960K 494 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 14 0 in_multi 99 7K 7K 166960K 107 0 ether_multi 1 0K 0K 166960K 1 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 364 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 228 151K 159K 166960K 4432 0 UVM aobj 10 2K 2K 166960K 10 0 pinsyscall 39 78K 96K 166960K 1333 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 6 0 NDP 13 0K 2K 166960K 34 0 temp 42 8639K 8705K 166960K 7589 0 kqueue 16 24K 26K 166960K 54 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 51 0 48 1 0 1 1 0 8 0 rtentry 136 98 0 6 4 0 4 4 0 8 0 unpcb 144 119 0 98 1 0 1 1 0 8 0 syncache 336 4 0 4 2 1 1 1 0 8 1 tcpcb 736 45 0 40 1 0 1 1 0 8 0 arp 88 10 0 1 1 0 1 1 0 8 0 ipq 40 2 0 0 1 0 1 1 0 8 0 ipqe 40 2 0 0 1 0 1 1 0 8 0 inpcb 328 183 0 174 3 1 2 2 0 8 1 nd6 104 16 0 0 1 0 1 1 0 8 0 pkpcb 40 1 0 1 1 0 1 1 0 8 1 kcovpl 48 8 0 0 1 0 1 1 0 8 0 ppxss 1072 11 0 9 1 0 1 1 0 8 0 pppxif 1384 3 0 1 1 0 1 1 0 8 0 pfstscr 40 2 0 2 1 0 1 1 0 8 1 pfrktable 1344 1 0 1 1 1 0 1 0 8 0 pfstkey 128 2 0 2 1 0 1 1 0 8 1 pfstate 384 1 0 1 1 0 1 1 0 8 1 pfrule 1344 2 0 1 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 449 0 9 28 0 28 28 0 8 0 art_table 40 450 0 9 5 0 5 5 0 8 0 art_node 32 98 0 15 1 0 1 1 0 8 0 sysvmsgpl 40 1 0 0 1 0 1 1 0 8 0 semapl 112 6 0 1 1 0 1 1 0 8 0 shmpl 112 7 0 0 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 1911 0 411 95 0 95 95 0 8 0 ffsino 256 1911 0 411 95 0 95 95 0 8 0 nchpl 144 2335 0 649 63 0 63 63 0 8 0 rtmask 32 2 0 2 1 0 1 1 0 8 1 uvmvnodes 80 2068 0 0 43 0 43 43 0 8 0 vnodes 216 2068 0 0 115 0 115 115 0 8 0 namei 1024 7092 0 7092 2 1 1 2 0 8 1 kstatmem 264 36 0 10 2 0 2 2 0 8 0 scxspl 216 10272 0 10272 15 7 8 8 1 8 8 plimitpl 152 68 0 52 1 0 1 1 0 8 0 sigapl 424 586 0 535 7 1 6 7 0 8 0 knotepl 120 9648 0 9597 10 1 9 9 0 8 7 kqueuepl 184 84 0 71 1 0 1 1 0 8 0 pipepl 304 118 0 89 3 0 3 3 0 8 0 fdescpl 448 565 0 535 5 1 4 5 0 8 0 filepl 120 2312 0 2086 9 0 9 9 0 8 1 lockfpl 104 66 0 62 1 0 1 1 0 8 0 lockfspl 48 32 0 29 1 0 1 1 0 8 0 sessionpl 144 21 0 13 1 0 1 1 0 8 0 pgrppl 48 38 0 22 1 0 1 1 0 8 0 ucredpl 104 424 0 412 1 0 1 1 0 8 0 zombiepl 144 634 0 633 1 0 1 1 0 8 0 processpl 1168 586 0 535 5 1 4 5 0 8 0 procpl 664 887 0 827 6 0 6 6 0 8 0 sosppl 168 2 0 2 2 1 1 1 0 8 1 sockpl 552 359 0 326 3 0 3 3 0 8 0 mcl64k 65536 10 0 10 2 1 1 1 0 8 1 mcl8k 8192 5 0 5 2 1 1 1 0 8 1 mcl4k 4096 2635 0 2585 12 5 7 12 0 8 0 mcl2k 2048 403 0 400 1 0 1 1 0 8 0 mtagpl 96 11 0 4 1 0 1 1 0 8 0 mbufpl 256 7388 0 7212 13 0 13 13 0 8 1 bufpl 280 4145 0 119 288 0 288 288 0 8 0 anonpl 24 117540 0 114372 68 0 68 68 0 187 31 amapchunkpl 152 13158 0 12669 26 1 25 25 0 158 6 amappl16 200 2483 0 2454 27 13 14 24 0 8 9 amappl15 192 4 0 4 1 1 0 1 0 8 0 amappl14 184 107 0 97 1 0 1 1 0 8 0 amappl13 176 2 0 2 1 1 0 1 0 8 0 amappl12 168 1176 0 1146 3 1 2 3 0 8 0 amappl11 160 60 0 50 1 0 1 1 0 8 0 amappl10 152 11 0 11 1 1 0 1 0 8 0 amappl9 144 253 0 253 1 1 0 1 0 8 0 amappl8 136 23 0 22 1 0 1 1 0 8 0 amappl7 128 100 0 90 1 0 1 1 0 8 0 amappl6 120 193 0 190 1 0 1 1 0 8 0 amappl5 112 112 0 106 1 0 1 1 0 8 0 amappl4 104 260 0 243 1 0 1 1 0 8 0 amappl3 96 2310 0 2198 4 0 4 4 0 8 1 amappl2 88 622 0 567 2 0 2 2 0 8 0 amappl1 80 8493 0 7947 13 1 12 13 0 8 0 amappl 88 3764 0 3600 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 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 9 0 0 1 0 1 1 0 8 0 uaddrrnd 24 565 0 535 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 565 0 535 1 0 1 1 0 8 0 vmmpekpl 168 6016 0 5984 3 0 3 3 0 8 0 vmmpepl 168 42679 0 40808 101 0 101 101 0 357 11 vmsppl 368 564 0 535 4 1 3 4 0 8 0 rwobjpl 40 16345 0 13427 33 0 33 33 0 8 1 pdppl 4096 1137 0 1070 99 32 67 83 0 8 0 pvpl 32 276808 0 268073 139 0 139 139 0 265 42 pmappl 216 564 0 535 3 0 3 3 0 8 0 extentpl 40 45 0 27 1 0 1 1 0 8 0 phpool 112 373 0 46 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(ffffffff83338bb1) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff8337aff9,ffffffff833dcc6b,3b7,ffffffff833b701a) at __assert+0x29 sys/kern/subr_prf.c:-1 refcnt_finalize(ffff80003c97b618,ffffffff83337dfd) at refcnt_finalize+0x1c8 sys/kern/kern_synch.c:952 pppx_if_destroy(205b92,ffff80003c97b610) at pppx_if_destroy+0x3d sys/net/if_pppx.c:794 pppxclose(205b92,41,2000,ffff800038552550) at pppxclose+0xa0 sys/net/if_pppx.c:541 spec_close(ffff80003c9bd190) at spec_close+0x417 sys/kern/spec_vnops.c:-1 VOP_CLOSE(fffffd8064f29708,41,fffffd8007bfb478,ffff800038552550) at VOP_CLOSE+0x129 sys/kern/vfs_vops.c:156 vn_closefile(fffffd8069a73720,ffff800038552550) at vn_closefile+0x11d vn_close sys/kern/vfs_vnops.c:292 [inline] vn_closefile(fffffd8069a73720,ffff800038552550) at vn_closefile+0x11d sys/kern/vfs_vnops.c:615 fdrop(fffffd8069a73720,ffff800038552550) at fdrop+0x121 sys/kern/kern_descrip.c:1280 closef(fffffd8069a73720,ffff800038552550) at closef+0x190 sys/kern/kern_descrip.c:1264 fdfree(ffff800038552550) at fdfree+0x115 sys/kern/kern_descrip.c:1195 exit1(ffff800038552550,0,0,1) at exit1+0x576 sys/kern/kern_exit.c:215 sys_exit(ffff800038552550,ffff80003c9bd4f0,ffff80003c9bd440) at sys_exit+0x1a sys/kern/kern_exit.c:-1 syscall(ffff80003c9bd4f0) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80003c9bd4f0) at syscall+0x962 sys/arch/amd64/amd64/trap.c:748 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7562539f4570, 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(ffffffff83338bb1) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff8337aff9,ffffffff833dcc6b,3b7,ffffffff833b701a) at __assert+0x29 sys/kern/subr_prf.c:-1 refcnt_finalize(ffff80003c97b618,ffffffff83337dfd) at refcnt_finalize+0x1c8 sys/kern/kern_synch.c:952 pppx_if_destroy(205b92,ffff80003c97b610) at pppx_if_destroy+0x3d sys/net/if_pppx.c:794 pppxclose(205b92,41,2000,ffff800038552550) at pppxclose+0xa0 sys/net/if_pppx.c:541 spec_close(ffff80003c9bd190) at spec_close+0x417 sys/kern/spec_vnops.c:-1 VOP_CLOSE(fffffd8064f29708,41,fffffd8007bfb478,ffff800038552550) at VOP_CLOSE+0x129 sys/kern/vfs_vops.c:156 vn_closefile(fffffd8069a73720,ffff800038552550) at vn_closefile+0x11d vn_close sys/kern/vfs_vnops.c:292 [inline] vn_closefile(fffffd8069a73720,ffff800038552550) at vn_closefile+0x11d sys/kern/vfs_vnops.c:615 fdrop(fffffd8069a73720,ffff800038552550) at fdrop+0x121 sys/kern/kern_descrip.c:1280 closef(fffffd8069a73720,ffff800038552550) at closef+0x190 sys/kern/kern_descrip.c:1264 fdfree(ffff800038552550) at fdfree+0x115 sys/kern/kern_descrip.c:1195 exit1(ffff800038552550,0,0,1) at exit1+0x576 sys/kern/kern_exit.c:215 sys_exit(ffff800038552550,ffff80003c9bd4f0,ffff80003c9bd440) at sys_exit+0x1a sys/kern/kern_exit.c:-1 syscall(ffff80003c9bd4f0) at syscall+0x962 mi_syscall sys/sys/syscall_mi.h:-1 [inline] syscall(ffff80003c9bd4f0) at syscall+0x962 sys/arch/amd64/amd64/trap.c:748 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7562539f4570, count: -16