panic: kernel diagnostic assertion "refs != ~0" failed: file "/syzkaller/managers/multicore/kernel/sys/kern/kern_synch.c", line 953 Stopped at db_enter+37: addq $8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND db_enter() at db_enter+37 panic(ffffffff833956d0) at panic+485 __assert(ffffffff833d22f8,ffffffff833dddd1,3b9,ffffffff83407984) at __assert+41 refcnt_finalize(ffff80003c479d98,ffffffff8338dd6f) at refcnt_finalize+475 pppx_if_destroy(285b98,ffff80003c479d90) at pppx_if_destroy+61 pppxclose(285b98,1,2000,ffff800039408fb0) at pppxclose+160 spec_close(ffff80002a279990) at spec_close+1047 VOP_CLOSE(fffffd800b537450,1,fffffd80097fb478,ffff800039408fb0) at VOP_CLOSE+306 vn_closefile(fffffd806c1e2038,ffff800039408fb0) at vn_closefile+299 fdrop(fffffd806c1e2038,ffff800039408fb0) at fdrop+289 closef(fffffd806c1e2038,ffff800039408fb0) at closef+402 fdfree(ffff800039408fb0) at fdfree+278 exit1(ffff800039408fb0,0,0,1) at exit1+1398 sys_exit(ffff800039408fb0,ffff80002a279d00,ffff80002a279c50) at sys_exit+26 end trace frame: 0xffff80002a279cf0, 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 953 ddb{0}> trace db_enter() at db_enter+37 panic(ffffffff833956d0) at panic+485 __assert(ffffffff833d22f8,ffffffff833dddd1,3b9,ffffffff83407984) at __assert+41 refcnt_finalize(ffff80003c479d98,ffffffff8338dd6f) at refcnt_finalize+475 pppx_if_destroy(285b98,ffff80003c479d90) at pppx_if_destroy+61 pppxclose(285b98,1,2000,ffff800039408fb0) at pppxclose+160 spec_close(ffff80002a279990) at spec_close+1047 VOP_CLOSE(fffffd800b537450,1,fffffd80097fb478,ffff800039408fb0) at VOP_CLOSE+306 vn_closefile(fffffd806c1e2038,ffff800039408fb0) at vn_closefile+299 fdrop(fffffd806c1e2038,ffff800039408fb0) at fdrop+289 closef(fffffd806c1e2038,ffff800039408fb0) at closef+402 fdfree(ffff800039408fb0) at fdfree+278 exit1(ffff800039408fb0,0,0,1) at exit1+1398 sys_exit(ffff800039408fb0,ffff80002a279d00,ffff80002a279c50) at sys_exit+26 syscall(ffff80002a279d00) at syscall+2839 Xsyscall() at Xsyscall+296 end of kernel end trace frame: 0x7c2ddb10b800, count: -16 ddb{0}> show registers rdi 0 rsi 1 rbp 18446603336928434016 rbx 18446744071620808159 cpu_info_full_primary+11743 rdx 0 rcx 18446603337181728688 rax 18446744071620804592 cpu_info_full_primary+8176 r8 72340172838076673 r9 9259542123273814144 r10 7018636066426841593 r11 2065580693877421134 r12 18446744071620807648 cpu_info_full_primary+11232 r13 0 r14 0 r15 1 rip 18446744071606658517 db_enter+37 cs 8 rflags 582 rsp 18446603336928434000 ss 16 db_enter+37: addq $8,%rsp ddb{0}> show proc PROC (syz-executor) tid=497927 pid=90436 tcnt=0 stat=onproc flags process=1008 proc=2000 runpri=32, usrpri=86, slppri=32, nice=20 wchan=0x0, wmesg=, ps_single=0xffff800039408fb0 scnt=-1 ecnt=1 forw=0xffffffffffffffff, list=0xffff800039409ca8,0xffff800039408a90 process=0xffff80002a3cc4e8 user=0xffff80002a274000, vmspace=0xfffffd806bfd9b90 estcpu=36, cpticks=2, pctcpu=0.0, user=0, sys=1, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 54486 113291 30162 0 2 0 syz-executor 54486 468949 30162 0 3 0x4000000 smrbar syz-executor 28317 461409 20246 0 2 0 syz-executor 28317 150187 20246 0 2 0x4000000 syz-executor 28317 482370 20246 0 3 0x4000080 fsleep syz-executor 28317 271455 20246 0 2 0x4000000 syz-executor 69595 208776 60898 0 2 0x2 arp 60898 186756 83248 0 3 0x10008a sigsusp sh 45090 486184 78725 60928 2 0x10 syz-executor 45090 179260 78725 60928 3 0x4000090 fsleep syz-executor 45090 348126 78725 60928 3 0x4000090 fsleep syz-executor 26032 197187 66730 0 2 0 syz-executor 26032 511500 66730 0 3 0x4000080 netacc syz-executor 26032 80577 66730 0 3 0x4000080 rest syz-executor 83248 505621 96873 0 3 0x82 wait syz-executor 30162 256095 96873 0 2 0xc82 syz-executor 89036 507804 0 0 3 0x14200 acct acct 20246 119329 96873 0 2 0xc82 syz-executor 57846 498473 1 0 3 0x100083 ttyopn getty 78725 413321 96873 0 2 0xc82 syz-executor 44946 113403 96873 0 2 0xc82 syz-executor 66730 191700 96873 0 2 0xc82 syz-executor 19925 464834 96873 0 2 0xc82 syz-executor 17168 474585 96873 0 2 0xc82 syz-executor 96873 258460 23831 0 2 0x2 syz-executor 23831 329493 61864 0 3 0x10008a sigsusp ksh 61864 172232 20401 0 3 0x98 kqread sshd-session 20401 14883 23124 0 3 0x92 kqread sshd-session 23124 65844 1 0 3 0x88 kqread sshd 68068 392645 34628 74 3 0x1100092 bpf pflogd 34628 400126 1 0 3 0x80 sbwait pflogd 91110 203406 79477 73 3 0x1100090 kqread syslogd 79477 279398 1 0 3 0x100082 sbwait syslogd 20712 308585 1 0 3 0x100080 kqread resolvd 87006 318762 0 0 3 0x14200 bored smr 8478 158515 0 0 2 0x14200 zerothread 2231 140144 0 0 3 0x14200 aiodoned aiodoned 7744 149314 0 0 3 0x14200 syncer update 65385 167491 0 0 3 0x14200 cleaner cleaner 40344 376319 0 0 3 0x14200 reaper reaper 46614 163765 0 0 3 0x14200 pgdaemon pagedaemon 87865 444641 0 0 3 0x14200 bored viomb 62916 472084 0 0 3 0x40014200 acpi0 acpi0 63547 10181 0 0 7 0x40014200 idle1 84469 319339 0 0 3 0x14200 bored softnet1 47281 108676 0 0 3 0x14200 bored softnet0 31048 153928 0 0 3 0x14200 smrbar systqmp 59458 262759 0 0 3 0x14200 bored systq 58515 349401 0 0 3 0x14200 tmoslp softclockmp 55890 280203 0 0 3 0x40014200 tmoslp softclock 25046 10684 0 0 3 0x40014200 idle0 1 111004 0 0 3 0x82 wait init 0 0 -1 0 3 0x10010200 scheduler swapper ddb{0}> show all locks Process 28317 (syz-executor) thread 0xffff800039408d18 (150187) Process 31048 (systqmp) thread 0xffff8000ffffe530 (153928) ddb{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 10238 11045K 11728K 166960K 13476 0 pcb 17 16K 18K 166960K 502 0 rtable 194 10K 11K 166960K 1385 0 pf 44 19K 67486K 166960K 362 0 ifaddr 41 8K 8K 166960K 307 0 ifgroup 70 2K 2K 166960K 496 0 sysctl 4 1K 9K 166960K 30 0 counters 82 38K 38K 166960K 546 0 ioctlops 0 0K 4K 166960K 2155 0 iov 0 0K 36K 166960K 191 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1565 98K 98K 166960K 3582 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 5K 166960K 6 0 VM map 2 1K 1K 166960K 2 0 sem 12 0K 1K 166960K 145 0 dirhash 12 2K 3K 166960K 48 0 ACPI 1692 195K 286K 166960K 12470 0 file desc 19 69K 240K 166960K 2791 0 sigio 0 0K 0K 166960K 56 0 proc 68 83K 180K 166960K 1333 0 subproc 72 4K 4K 166960K 279 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 1 0K 0K 166960K 433 0 in_multi 67 5K 7K 166960K 490 0 ether_multi 1 0K 0K 166960K 34 0 mrt 1 0K 0K 166960K 31 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 223 996K 996K 166960K 223 0 exec 0 0K 1K 166960K 1052 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 241 137K 176K 166960K 24894 0 UVM aobj 31 2K 2K 166960K 36 0 pinsyscall 39 78K 102K 166960K 4535 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 204 0 NDP 16 0K 2K 166960K 201 0 temp 78 8660K 8732K 166960K 149397 0 kqueue 8 14K 32K 166960K 635 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 26 0 0 1 0 1 1 0 8 0 rtpcb 120 196 0 195 1 0 1 1 0 8 0 rtentry 176 469 0 397 6 1 5 6 0 8 0 unpcb 144 1500 0 1488 14 13 1 6 0 8 0 syncache 336 8 0 8 4 4 0 1 0 8 0 tcpcb 736 567 0 562 7 6 1 4 0 8 0 arp 136 70 0 55 1 0 1 1 0 8 0 ipq 40 1 0 1 1 1 0 1 0 8 0 ipqe 40 3 0 3 1 1 0 1 0 8 0 inpcb 328 2617 0 2607 31 29 2 10 0 8 0 nd6 152 101 0 85 1 0 1 1 0 8 0 pkpcb 40 21 0 21 8 7 1 1 0 8 1 kcovpl 48 31 0 23 1 0 1 1 0 8 0 ppxss 1192 166 0 162 2 1 1 1 0 8 0 pppxif 1504 43 0 41 7 6 1 1 0 8 0 pffrag 232 23 0 14 1 0 1 1 0 482 0 pffrnode 88 17 0 9 1 0 1 1 0 8 0 pffrent 40 35 0 26 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 1 0 1 1 1 0 1 0 8 0 pfstitem 24 193 0 131 1 0 1 1 0 8 0 pfstkey 128 193 0 131 3 0 3 3 0 8 0 pfstate 384 193 0 131 9 0 9 9 0 8 0 pfrule 1344 23 0 18 2 1 1 2 0 8 0 rttmr 136 6 0 6 4 4 0 1 0 8 0 art_heap8 4096 2 0 0 2 0 2 2 0 8 0 art_heap4 256 2341 0 2037 38 16 22 30 0 8 0 art_table 40 2343 0 2037 5 0 5 5 0 8 0 art_node 32 466 0 403 1 0 1 1 0 8 0 sysvmsgpl 40 14 0 7 1 0 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 119 0 109 1 0 1 1 0 8 0 shmpl 112 33 0 5 1 0 1 1 0 8 0 dirhash 1024 41 0 24 3 0 3 3 0 8 0 dino2pl 256 6253 0 4688 98 0 98 98 0 8 0 ffsino 296 6253 0 4688 121 0 121 121 0 8 0 nchpl 144 9788 0 8010 66 0 66 66 0 8 0 rtmask 32 26 0 26 5 5 0 1 0 8 0 vnodes 216 5926 0 0 330 0 330 330 0 8 0 namei 1024 33615 0 33615 4 3 1 2 0 8 1 percpumem 16 288 0 232 1 0 1 1 0 8 0 kstatmem 264 278 0 242 4 1 3 3 0 8 0 acpiwqpl 32 2 0 2 1 0 1 1 1 8 1 scsiplug 72 34 0 34 7 6 1 1 0 8 1 scxspl 216 53817 0 53817 13 12 1 6 1 8 1 plimitpl 152 690 0 672 1 0 1 1 0 8 0 sigapl 424 3075 0 3028 8 2 6 8 0 8 0 knotepl 120 616 0 0 18 0 18 18 0 8 0 kqueuepl 224 1251 0 1243 11 10 1 5 0 8 0 pipepl 344 419 0 391 3 0 3 3 0 8 0 fdescpl 528 3037 0 3007 3 0 3 3 0 8 0 filepl 160 18102 0 17887 34 19 15 19 0 8 3 lockfpl 104 888 0 886 1 0 1 1 0 8 0 lockfspl 48 317 0 315 1 0 1 1 0 8 0 sessionpl 144 46 0 38 1 0 1 1 0 8 0 pgrppl 48 131 0 115 1 0 1 1 0 8 0 ucredpl 104 2993 0 2982 1 0 1 1 0 8 0 zombiepl 144 3175 0 3172 1 0 1 1 0 8 0 processpl 1232 3075 0 3028 6 2 4 6 0 8 0 procpl 664 6475 0 6420 9 3 6 8 0 8 0 sosppl 176 32 0 32 5 5 0 1 0 8 0 sockpl 752 4377 0 4354 50 46 4 17 0 8 0 mcl64k 65536 29 0 0 4 0 4 4 0 8 0 mcl16k 16384 7 0 0 1 0 1 1 0 8 0 mcl12k 12288 4 0 0 1 0 1 1 0 8 0 mcl9k 9216 4 0 0 1 0 1 1 0 8 0 mcl8k 8192 5 0 0 1 0 1 1 0 8 0 mcl4k 4096 134 0 0 17 0 17 17 0 8 0 mcl2k2 2112 3 0 0 1 0 1 1 0 8 0 mcl2k 2048 89 0 0 8 1 7 8 0 8 0 mtagpl 96 5 0 0 1 0 1 1 0 8 0 mbufpl 256 1919 0 0 118 0 118 118 0 8 0 bufpl 280 20608 0 14471 439 0 439 439 0 8 0 anonpl 32 19929 0 0 161 0 161 161 0 246 0 amapchunkpl 152 85640 0 85015 63 31 32 34 0 158 7 amappl16 200 9018 0 8887 91 72 19 44 0 8 3 amappl15 192 36 0 36 1 1 0 1 0 8 0 amappl14 184 3 0 3 2 2 0 1 0 8 0 amappl13 176 712 0 709 1 0 1 1 0 8 0 amappl12 168 3542 0 3504 3 1 2 3 0 8 0 amappl11 160 10 0 10 3 3 0 1 0 8 0 amappl10 152 52 0 44 1 0 1 1 0 8 0 amappl9 144 252 0 252 1 1 0 1 0 8 0 amappl8 136 28 0 25 1 0 1 1 0 8 0 amappl7 128 202 0 200 1 0 1 1 0 8 0 amappl6 120 554 0 541 1 0 1 1 0 8 0 amappl5 112 80 0 72 1 0 1 1 0 8 0 amappl4 104 548 0 519 1 0 1 1 0 8 0 amappl3 96 15171 0 15079 4 1 3 3 0 8 0 amappl2 88 3089 0 3029 2 0 2 2 0 8 0 amappl1 80 21754 0 21225 14 1 13 14 0 8 0 amappl 88 23381 0 23203 5 0 5 5 0 92 0 uvmvnodes 80 5926 0 0 121 0 121 121 0 8 0 dma65536 65536 3 0 3 3 3 0 1 0 8 0 dma32768 32768 1 0 1 1 1 0 1 0 8 0 dma16384 16384 1 0 1 1 1 0 1 0 8 0 dma4096 4096 2 0 2 2 2 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 277 0 277 5 5 0 1 0 8 0 dma64 64 7 0 7 2 2 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 35 0 5 1 0 1 1 0 8 0 uaddrrnd 24 3037 0 3007 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 3037 0 3007 1 0 1 1 0 8 0 vmmpekpl 168 21892 0 21832 3 0 3 3 0 8 0 vmmpepl 168 193277 0 191405 150 52 98 123 0 357 9 vmsppl 488 3036 0 3007 6 1 5 5 0 8 0 rwobjpl 80 54226 0 47324 162 4 158 158 0 8 0 pdppl 4096 6081 0 6014 149 80 69 83 0 8 2 pvpl 32 27683 0 0 223 0 223 223 0 265 0 pmappl 256 3036 0 3007 4 1 3 3 0 8 0 extentpl 40 45 0 27 1 0 1 1 0 8 0 phpool 112 467 0 119 11 0 11 11 0 8 0 ddb{0}> machine ddbcpu 0 Invalid cpu 0 ddb{0}> trace db_enter() at db_enter+37 panic(ffffffff833956d0) at panic+485 __assert(ffffffff833d22f8,ffffffff833dddd1,3b9,ffffffff83407984) at __assert+41 refcnt_finalize(ffff80003c479d98,ffffffff8338dd6f) at refcnt_finalize+475 pppx_if_destroy(285b98,ffff80003c479d90) at pppx_if_destroy+61 pppxclose(285b98,1,2000,ffff800039408fb0) at pppxclose+160 spec_close(ffff80002a279990) at spec_close+1047 VOP_CLOSE(fffffd800b537450,1,fffffd80097fb478,ffff800039408fb0) at VOP_CLOSE+306 vn_closefile(fffffd806c1e2038,ffff800039408fb0) at vn_closefile+299 fdrop(fffffd806c1e2038,ffff800039408fb0) at fdrop+289 closef(fffffd806c1e2038,ffff800039408fb0) at closef+402 fdfree(ffff800039408fb0) at fdfree+278 exit1(ffff800039408fb0,0,0,1) at exit1+1398 sys_exit(ffff800039408fb0,ffff80002a279d00,ffff80002a279c50) at sys_exit+26 syscall(ffff80002a279d00) at syscall+2839 Xsyscall() at Xsyscall+296 end of kernel end trace frame: 0x7c2ddb10b800, count: -16 ddb{0}> machine ddbcpu 1 Stopped at x86_ipi_db+39: addq $8,%rsp x86_ipi_db(ffff8000299edff0) at x86_ipi_db+39 x86_ipi_handler() at x86_ipi_handler+217 Xresume_lapic_ipi() at Xresume_lapic_ipi+39 acpicpu_idle() at acpicpu_idle+1111 sched_idle(ffff8000299edff0) at sched_idle+913 end trace frame: 0x0, count: 10 ddb{1}> tc No such command