panic: kernel diagnostic assertion "refs != ~0" failed: file "/syzkaller/managers/multicore/kernel/sys/kern/kern_synch.c", line 944 Stopped at db_enter+0x25: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 441731 28807 0 0 0 1 syz-executor db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff8343724f) at panic+0x1e5 sys/kern/subr_prf.c:198 __assert(ffffffff833e7e11,ffffffff833ee69b,3b0,ffffffff833ee6e3) at __assert+0x29 refcnt_finalize(ffff80003c4ff990,ffffffff83333298) at refcnt_finalize+0x1c8 sys/kern/kern_synch.c:945 pppx_if_destroy(205b9a,ffff80003c4ff988) at pppx_if_destroy+0x3d sys/net/if_pppx.c:806 pppxclose(205b9a,1,2000,ffff80003c51e2b8) at pppxclose+0xa0 sys/net/if_pppx.c:553 spec_close(ffff80002a41be80) at spec_close+0x412 VOP_CLOSE(fffffd806b9dd7f0,1,fffffd807f7d3340,ffff80003c51e2b8) at VOP_CLOSE+0x133 sys/kern/vfs_vops.c:156 vn_closefile(fffffd806ccaa608,ffff80003c51e2b8) at vn_closefile+0x12b vn_close sys/kern/vfs_vnops.c:292 [inline] vn_closefile(fffffd806ccaa608,ffff80003c51e2b8) at vn_closefile+0x12b sys/kern/vfs_vnops.c:615 fdrop(fffffd806ccaa608,ffff80003c51e2b8) at fdrop+0x126 sys/kern/kern_descrip.c:1265 closef(fffffd806ccaa608,ffff80003c51e2b8) at closef+0x192 sys/kern/kern_descrip.c:1249 fdfree(ffff80003c51e2b8) at fdfree+0x116 sys/kern/kern_descrip.c:1181 exit1(ffff80003c51e2b8,0,0,1) at exit1+0x57f sys/kern/kern_exit.c:214 sys_exit(ffff80003c51e2b8,ffff80002a41c1f0,ffff80002a41c140) at sys_exit+0x1a end trace frame: 0xffff80002a41c1e0, 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{0}> ddb{0}> set $lines = 0 ddb{0}> set $maxwidth = 0 ddb{0}> show panic *cpu0: kernel diagnostic assertion "refs != ~0" failed: file "/syzkaller/managers/multicore/kernel/sys/kern/kern_synch.c", line 944 ddb{0}> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff8343724f) at panic+0x1e5 sys/kern/subr_prf.c:198 __assert(ffffffff833e7e11,ffffffff833ee69b,3b0,ffffffff833ee6e3) at __assert+0x29 refcnt_finalize(ffff80003c4ff990,ffffffff83333298) at refcnt_finalize+0x1c8 sys/kern/kern_synch.c:945 pppx_if_destroy(205b9a,ffff80003c4ff988) at pppx_if_destroy+0x3d sys/net/if_pppx.c:806 pppxclose(205b9a,1,2000,ffff80003c51e2b8) at pppxclose+0xa0 sys/net/if_pppx.c:553 spec_close(ffff80002a41be80) at spec_close+0x412 VOP_CLOSE(fffffd806b9dd7f0,1,fffffd807f7d3340,ffff80003c51e2b8) at VOP_CLOSE+0x133 sys/kern/vfs_vops.c:156 vn_closefile(fffffd806ccaa608,ffff80003c51e2b8) at vn_closefile+0x12b vn_close sys/kern/vfs_vnops.c:292 [inline] vn_closefile(fffffd806ccaa608,ffff80003c51e2b8) at vn_closefile+0x12b sys/kern/vfs_vnops.c:615 fdrop(fffffd806ccaa608,ffff80003c51e2b8) at fdrop+0x126 sys/kern/kern_descrip.c:1265 closef(fffffd806ccaa608,ffff80003c51e2b8) at closef+0x192 sys/kern/kern_descrip.c:1249 fdfree(ffff80003c51e2b8) at fdfree+0x116 sys/kern/kern_descrip.c:1181 exit1(ffff80003c51e2b8,0,0,1) at exit1+0x57f sys/kern/kern_exit.c:214 sys_exit(ffff80003c51e2b8,ffff80002a41c1f0,ffff80002a41c140) at sys_exit+0x1a syscall(ffff80002a41c1f0) at syscall+0xb08 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80002a41c1f0) at syscall+0xb08 sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7d8d0cf689c0, count: -16 ddb{0}> show registers rdi 0 rsi 0x1 rbp 0xffff80002a41bc50 rbx 0xffffffff83829dc7 cpu_info_full_primary+0x2dc7 rdx 0 rcx 0xffff80003c51e2b8 rax 0xffffffff83828ff0 cpu_info_full_primary+0x1ff0 r8 0x101010101010101 r9 0x8080808080808080 r10 0xab015ce9524a955e r11 0xa489cf93f7ef3296 r12 0xffffffff83829bc8 cpu_info_full_primary+0x2bc8 r13 0 r14 0 r15 0x1 rip 0xffffffff82bc42d5 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff80002a41bc40 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor) tid=324098 pid=85497 tcnt=0 stat=onproc flags process=1008 proc=2000 runpri=32, usrpri=86, slppri=32, nice=20 wchan=0x0, wmesg=, ps_single=0xffff80003c51e2b8 scnt=-1 ecnt=1 forw=0xffffffffffffffff, list=0xffff80003c51fc58,0xffff8000ffffb4a0 process=0xffff80002a313498 user=0xffff80002a417000, vmspace=0xfffffd807eb8cab0 estcpu=36, cpticks=4, pctcpu=0.0, user=0, sys=1, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 82942 446621 73937 0 2 0 syz-executor 82942 47910 73937 0 2 0x4000000 syz-executor 88140 105956 81355 0 3 0x80 nanoslp syz-executor 88140 291840 81355 0 3 0x4000000 smrbar syz-executor 88140 42643 81355 0 3 0x4000080 fsleep syz-executor 28807 441731 13130 0 7 0 syz-executor 28807 20622 13130 0 2 0x4000000 syz-executor 76893 2803 76589 0 3 0x80 nanoslp syz-executor 76893 142902 76589 0 3 0x4000080 kqread syz-executor 76893 509524 76589 0 3 0x4000080 fsleep syz-executor 60481 497769 33122 0 3 0x80 nanoslp syz-executor 60481 259476 33122 0 3 0x4000080 sbwait syz-executor 60481 37916 33122 0 3 0x4000080 sbwait syz-executor 60481 199645 33122 0 3 0x4000080 sbwait syz-executor 60481 367507 33122 0 3 0x4000080 fsleep syz-executor 60481 463085 33122 0 3 0x4000080 fsleep syz-executor 60481 513502 33122 0 3 0x4000080 fsleep syz-executor 76589 301260 34651 0 3 0x82 nanoslp syz-executor 47028 198753 0 0 3 0x14200 acct acct 33122 458884 34651 0 3 0x82 nanoslp syz-executor 52865 380076 1 0 3 0x100083 ttyin getty 73937 444736 34651 0 3 0x82 nanoslp syz-executor 28396 60989 0 0 3 0x14200 bored sosplice 72366 152844 34651 0 3 0x82 nanoslp syz-executor 81355 115256 34651 0 3 0x82 nanoslp syz-executor 13130 37007 34651 0 3 0x82 nanoslp syz-executor 30808 490000 34651 0 2 0x2 syz-executor 34651 424855 54908 0 2 0x2 syz-executor 54908 383738 18044 0 3 0x10008a sigsusp ksh 18044 169694 94039 0 3 0x98 kqread sshd-session 94039 147749 88473 0 3 0x92 kqread sshd-session 88473 159091 1 0 3 0x88 kqread sshd 40452 380395 27493 74 3 0x1100092 bpf pflogd 27493 243866 1 0 3 0x80 sbwait pflogd 5611 246756 79126 73 3 0x1100090 kqread syslogd 79126 70482 1 0 3 0x100082 sbwait syslogd 18031 354413 1 0 3 0x100080 kqread resolvd 70191 224907 70957 77 3 0x100092 kqread dhcpleased 17211 490754 70957 77 3 0x100092 kqread dhcpleased 70957 413673 1 0 3 0x80 kqread dhcpleased 39691 403114 0 0 3 0x14200 bored smr 22166 171831 0 0 2 0x14200 zerothread 64843 58502 0 0 3 0x14200 aiodoned aiodoned 37083 119486 0 0 3 0x14200 syncer update 55632 246244 0 0 3 0x14200 cleaner cleaner 23418 308157 0 0 3 0x14200 reaper reaper 70027 444161 0 0 3 0x14200 pgdaemon pagedaemon 5564 82028 0 0 3 0x14200 bored viomb 83735 345497 0 0 3 0x40014200 acpi0 acpi0 85729 100416 0 0 3 0x40014200 idle1 24099 224215 0 0 3 0x14200 bored softnet3 44634 417927 0 0 3 0x14200 bored softnet2 26282 395899 0 0 3 0x14200 bored softnet1 74502 428072 0 0 3 0x14200 bored softnet0 56628 444326 0 0 3 0x14200 bored systqmp 70710 83765 0 0 3 0x14200 bored systq 43612 39688 0 0 3 0x14200 tmoslp softclockmp 22023 308534 0 0 2 0x40014200 softclock 50957 163054 0 0 3 0x40014200 idle0 1 402644 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks ddb{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 10209 11152K 11343K 166960K 12533 0 pcb 17 13K 13K 166960K 117 0 rtable 226 8K 8K 166960K 516 0 pf 44 20K 26K 166960K 150 0 ifaddr 42 7K 7K 166960K 89 0 ifgroup 56 2K 2K 166960K 140 0 sysctl 4 1K 1K 166960K 4 0 counters 66 36K 36K 166960K 126 0 ioctlops 0 0K 4K 166960K 1588 0 iov 0 0K 28K 166960K 51 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1458 92K 92K 166960K 2301 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 9K 166960K 23 0 VM map 2 1K 1K 166960K 2 0 sem 12 0K 0K 166960K 30 0 dirhash 12 2K 3K 166960K 39 0 ACPI 1692 195K 286K 166960K 12470 0 file desc 16 57K 240K 166960K 914 0 sigio 0 0K 0K 166960K 11 0 proc 72 91K 128K 166960K 712 0 subproc 63 3K 4K 166960K 100 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 1 0K 0K 166960K 146 0 in_multi 89 6K 7K 166960K 153 0 ether_multi 1 0K 0K 166960K 2 0 mrt 2 0K 0K 166960K 2 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 535 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 230 64K 87K 166960K 9822 0 UVM aobj 39 2K 2K 166960K 41 0 pinsyscall 41 82K 104K 166960K 2071 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 74 0 NDP 12 0K 2K 166960K 61 0 temp 56 8638K 8704K 166960K 18667 0 kqueue 14 22K 30K 166960K 157 0 SYN cache 2 16K 16K 166960K 2 0 ddb{0}> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle plcache 128 24 0 0 1 0 1 1 0 8 0 rtpcb 120 84 0 80 1 0 1 1 0 8 0 rtentry 168 163 0 61 5 0 5 5 0 8 0 unpcb 144 587 0 560 7 5 2 6 0 8 1 syncache 336 5 0 5 3 2 1 1 0 8 1 tcpqe 32 1 0 1 1 1 0 1 0 8 0 tcpcb 808 218 0 212 4 2 2 4 0 8 1 arp 120 28 0 11 1 0 1 1 0 8 0 inpcb 376 785 0 773 9 1 8 8 0 8 6 nd6 136 36 0 13 1 0 1 1 0 8 0 pkpcb 40 2 0 2 2 1 1 1 0 8 1 kcovpl 48 11 0 4 1 0 1 1 0 8 0 ppxss 1168 19 0 18 1 0 1 1 0 8 0 pppxif 1472 3 0 2 2 1 1 1 0 8 0 pfstscr 40 3 0 2 1 0 1 1 0 8 0 pffrag 232 5 0 0 1 0 1 1 0 482 0 pffrnode 88 5 0 0 1 0 1 1 0 8 0 pffrent 40 13 0 8 1 0 1 1 0 8 0 pfosfp 40 1428 0 1005 5 0 5 5 0 8 0 pfosfpen 112 1428 0 714 21 0 21 21 0 8 0 pfrktable 1344 6 0 5 1 0 1 1 0 8 0 pftag 88 1 0 0 1 0 1 1 0 8 0 pfqueue 320 33 0 33 1 0 1 1 0 8 1 pfstitem 24 62 0 13 1 0 1 1 0 8 0 pfstkey 128 65 0 16 2 0 2 2 0 8 0 pfstate 376 63 0 15 6 0 6 6 0 8 0 pfrule 1344 29 0 22 2 1 1 2 0 8 0 art_heap8 4096 2 0 0 2 0 2 2 0 8 0 art_heap4 256 662 0 213 32 3 29 29 0 8 0 art_table 32 664 0 213 4 0 4 4 0 8 0 art_node 16 161 0 71 1 0 1 1 0 8 0 sysvmsgpl 40 17 0 11 1 0 1 1 0 8 0 semupl 112 2 0 2 1 1 0 1 0 8 0 semapl 112 26 0 16 1 0 1 1 0 8 0 shmpl 112 38 0 2 2 0 2 2 0 8 0 dirhash 1024 35 0 18 3 0 3 3 0 8 0 dino2pl 256 2991 0 1482 95 0 95 95 0 8 0 ffsino 280 2991 0 1482 109 0 109 109 0 8 0 nchpl 144 4242 0 3691 64 31 33 64 0 8 8 rtmask 32 1 0 1 1 1 0 1 0 8 0 uvmvnodes 80 3722 0 0 76 0 76 76 0 8 0 vnodes 216 3722 0 0 207 0 207 207 0 8 0 namei 1024 14771 0 14771 3 1 2 2 0 8 2 percpumem 16 77 0 30 1 0 1 1 0 8 0 kstatmem 264 76 0 52 2 0 2 2 0 8 0 scsiplug 72 3 0 3 1 1 0 1 0 8 0 scxspl 216 13001 0 13001 10 8 2 8 1 8 2 plimitpl 152 157 0 139 1 0 1 1 0 8 0 sigapl 424 1199 0 1148 7 1 6 7 0 8 0 futexpl 64 11044 0 11039 1 0 1 1 0 8 0 knotepl 120 518 0 0 16 0 16 16 0 8 0 kqueuepl 216 344 0 331 5 4 1 5 0 8 0 pipepl 328 174 0 147 3 0 3 3 0 8 0 fdescpl 504 1178 0 1148 5 0 5 5 0 8 0 filepl 152 6754 0 6532 17 5 12 17 0 8 0 lockfpl 104 464 0 462 2 1 1 2 0 8 0 lockfspl 48 192 0 190 1 0 1 1 0 8 0 sessionpl 144 28 0 19 1 0 1 1 0 8 0 pgrppl 48 43 0 26 1 0 1 1 0 8 0 ucredpl 104 920 0 907 1 0 1 1 0 8 0 zombiepl 144 1151 0 1148 1 0 1 1 0 8 0 processpl 1168 1199 0 1148 5 1 4 5 0 8 0 procpl 656 2451 0 2388 6 0 6 6 0 8 0 srpgc 96 8 0 8 1 1 0 1 0 8 0 sosppl 168 7 0 7 1 1 0 1 0 8 0 sockpl 688 1467 0 1424 17 8 9 15 0 8 5 mcl64k 65536 3 0 0 1 0 1 1 0 8 0 mcl16k 16384 6 0 0 1 0 1 1 0 8 0 mcl12k 12288 2 0 0 1 0 1 1 0 8 0 mcl9k 9216 2 0 0 1 0 1 1 0 8 0 mcl8k 8192 4 0 0 1 0 1 1 0 8 0 mcl4k 4096 120 0 0 15 0 15 15 0 8 0 mcl2k 2048 24 0 0 3 0 3 3 0 8 0 mtagpl 96 23 0 0 1 0 1 1 0 8 0 mbufpl 256 183 0 0 11 0 11 11 0 8 0 bufpl 280 3746 0 136 258 0 258 258 0 8 0 anonpl 24 171606 0 168251 52 6 46 50 0 184 18 amapchunkpl 152 31177 0 30663 27 3 24 27 0 158 2 amappl16 200 3257 0 3230 19 8 11 15 0 8 7 amappl15 192 5 0 5 2 2 0 1 0 8 0 amappl14 184 123 0 110 1 0 1 1 0 8 0 amappl13 176 7 0 7 1 1 0 1 0 8 0 amappl12 168 1870 0 1840 3 1 2 2 0 8 0 amappl11 160 83 0 69 1 0 1 1 0 8 0 amappl10 152 5 0 5 1 1 0 1 0 8 0 amappl9 144 242 0 242 1 1 0 1 0 8 0 amappl8 136 29 0 26 1 0 1 1 0 8 0 amappl7 128 115 0 102 1 0 1 1 0 8 0 amappl6 120 207 0 204 1 0 1 1 0 8 0 amappl5 112 135 0 126 1 0 1 1 0 8 0 amappl4 104 336 0 315 1 0 1 1 0 8 0 amappl3 96 6345 0 6226 4 0 4 4 0 8 0 amappl2 88 712 0 649 2 0 2 2 0 8 0 amappl1 80 10786 0 10218 15 1 14 14 0 8 0 amappl 88 9360 0 9186 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 2 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 40 0 2 1 0 1 1 0 8 0 uaddrrnd 24 1178 0 1148 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1178 0 1148 1 0 1 1 0 8 0 vmmpekpl 168 10809 0 10755 3 0 3 3 0 8 0 vmmpepl 168 77099 0 75243 99 6 93 98 0 357 1 vmsppl 456 1177 0 1148 6 1 5 5 0 8 0 rwobjpl 64 26161 0 21468 79 0 79 79 0 8 2 pdppl 4096 2363 0 2296 107 36 71 85 0 8 4 pvpl 32 16209 0 0 131 0 131 131 0 265 0 pmappl 248 1177 0 1148 3 0 3 3 0 8 0 extentpl 40 55 0 38 1 0 1 1 0 8 0 phpool 112 295 0 47 8 0 8 8 0 8 0 ddb{0}> machine ddbcpu 0 Invalid cpu 0 ddb{0}> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff8343724f) at panic+0x1e5 sys/kern/subr_prf.c:198 __assert(ffffffff833e7e11,ffffffff833ee69b,3b0,ffffffff833ee6e3) at __assert+0x29 refcnt_finalize(ffff80003c4ff990,ffffffff83333298) at refcnt_finalize+0x1c8 sys/kern/kern_synch.c:945 pppx_if_destroy(205b9a,ffff80003c4ff988) at pppx_if_destroy+0x3d sys/net/if_pppx.c:806 pppxclose(205b9a,1,2000,ffff80003c51e2b8) at pppxclose+0xa0 sys/net/if_pppx.c:553 spec_close(ffff80002a41be80) at spec_close+0x412 VOP_CLOSE(fffffd806b9dd7f0,1,fffffd807f7d3340,ffff80003c51e2b8) at VOP_CLOSE+0x133 sys/kern/vfs_vops.c:156 vn_closefile(fffffd806ccaa608,ffff80003c51e2b8) at vn_closefile+0x12b vn_close sys/kern/vfs_vnops.c:292 [inline] vn_closefile(fffffd806ccaa608,ffff80003c51e2b8) at vn_closefile+0x12b sys/kern/vfs_vnops.c:615 fdrop(fffffd806ccaa608,ffff80003c51e2b8) at fdrop+0x126 sys/kern/kern_descrip.c:1265 closef(fffffd806ccaa608,ffff80003c51e2b8) at closef+0x192 sys/kern/kern_descrip.c:1249 fdfree(ffff80003c51e2b8) at fdfree+0x116 sys/kern/kern_descrip.c:1181 exit1(ffff80003c51e2b8,0,0,1) at exit1+0x57f sys/kern/kern_exit.c:214 sys_exit(ffff80003c51e2b8,ffff80002a41c1f0,ffff80002a41c140) at sys_exit+0x1a syscall(ffff80002a41c1f0) at syscall+0xb08 mi_syscall sys/sys/syscall_mi.h:176 [inline] syscall(ffff80002a41c1f0) at syscall+0xb08 sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x7d8d0cf689c0, count: -16 ddb{0}> machine ddbcpu 1 Stopped at x86_ipi_db+0x27: addq $0x8,%rsp x86_ipi_db(ffff800029aabff0) at x86_ipi_db+0x27 sys/arch/amd64/amd64/db_interface.c:394 x86_ipi_handler() at x86_ipi_handler+0xd9 sys/arch/amd64/amd64/ipi.c:106 Xresume_lapic_ipi() at Xresume_lapic_ipi+0x27 end of kernel end trace frame: 0x77538ebb5710, count: 12 ddb{1}> trace x86_ipi_db(ffff800029aabff0) at x86_ipi_db+0x27 sys/arch/amd64/amd64/db_interface.c:394 x86_ipi_handler() at x86_ipi_handler+0xd9 sys/arch/amd64/amd64/ipi.c:106 Xresume_lapic_ipi() at Xresume_lapic_ipi+0x27 end of kernel end trace frame: 0x77538ebb5710, count: -3