panic: kernel diagnostic assertion "fp->f_count >= 2" failed: file "/syzkaller/managers/multicore/kernel/sys/kern/kern_descrip.c", line 1232 count (1) < 2 Stopped at db_enter+0x1c: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND db_enter() at db_enter+0x1c sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff828d6a41) at panic+0x17b sys/kern/subr_prf.c:198 closef(fffffd8066f613a8,ffff80002f8e12b0) at closef+0x187 sys/kern/kern_descrip.c:1232 fdfree(ffff80002f8e12b0) at fdfree+0xe4 sys/kern/kern_descrip.c:1190 exit1(ffff80002f8e12b0,0,0,1) at exit1+0x3a0 sys/kern/kern_exit.c:199 sys_exit(ffff80002f8e12b0,ffff80002a1b25d0,ffff80002a1b2530) at sys_exit+0x1a sys/kern/kern_exit.c:89 syscall(ffff80002a1b25d0) at syscall+0x53b mi_syscall sys/sys/syscall_mi.h:183 [inline] syscall(ffff80002a1b25d0) at syscall+0x53b sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x79cad1cb97c0, count: 7 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 "fp->f_count >= 2" failed: file "/syzkaller/managers/multicore/kernel/sys/kern/kern_descrip.c", line 1232 count (1) < 2 ddb{0}> trace db_enter() at db_enter+0x1c sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff828d6a41) at panic+0x17b sys/kern/subr_prf.c:198 closef(fffffd8066f613a8,ffff80002f8e12b0) at closef+0x187 sys/kern/kern_descrip.c:1232 fdfree(ffff80002f8e12b0) at fdfree+0xe4 sys/kern/kern_descrip.c:1190 exit1(ffff80002f8e12b0,0,0,1) at exit1+0x3a0 sys/kern/kern_exit.c:199 sys_exit(ffff80002f8e12b0,ffff80002a1b25d0,ffff80002a1b2530) at sys_exit+0x1a sys/kern/kern_exit.c:89 syscall(ffff80002a1b25d0) at syscall+0x53b mi_syscall sys/sys/syscall_mi.h:183 [inline] syscall(ffff80002a1b25d0) at syscall+0x53b sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x79cad1cb97c0, count: -8 ddb{0}> show registers rdi 0 rsi 0x1 rbp 0xffff80002a1b22d0 rbx 0xffffffff82c97cb7 cpu_info_full_primary+0x2cb7 rdx 0 rcx 0xffff80002f8e12b0 rax 0xffffffff82c96ff0 cpu_info_full_primary+0x1ff0 r8 0x101010101010101 r9 0x8080808080808080 r10 0x58d72cc72836f4db r11 0xd8404430abd27658 r12 0xffffffff82c97ab8 cpu_info_full_primary+0x2ab8 r13 0 r14 0 r15 0x1 rip 0xffffffff822e5afc db_enter+0x1c cs 0x8 rflags 0x246 rsp 0xffff80002a1b22c0 ss 0x10 db_enter+0x1c: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor.0) tid=407856 pid=98725 tcnt=1 stat=onproc flags process=1008 proc=2000 runpri=32, usrpri=86, slppri=32, nice=20 wchan=0x0, wmesg=, ps_single=0xffff80002f8e12b0 forw=0xffffffffffffffff, list=0xffff80002a210aa0,0xffff80002f8e2800 process=0xffff800033b2df38 user=0xffff80002a1ad000, vmspace=0xfffffd806b743718 estcpu=36, cpticks=2, pctcpu=0.0, user=0, sys=2, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 77607 303285 98595 0 2 0 syz-executor.6 77607 497434 98595 0 2 0x4000000 syz-executor.6 77607 284500 98595 0 2 0x4000000 syz-executor.6 38354 128542 98778 0 2 0 syz-executor.4 38354 53218 98778 0 3 0x4000080 fsleep syz-executor.4 70634 314689 71647 0 2 0 syz-executor.3 70634 272427 71647 0 3 0x4000080 fsleep syz-executor.3 12483 235548 83347 0 2 0 syz-executor.7 12483 248530 83347 0 3 0x4000080 bell syz-executor.7 46059 45866 94173 0 2 0 syz-executor.5 46059 318392 94173 0 3 0x4000080 fsleep syz-executor.5 43100 153134 25367 0 3 0x80 nanoslp syz-executor.2 43100 106061 25367 0 3 0x4000080 netio syz-executor.2 43100 68611 25367 0 3 0x4000080 fsleep syz-executor.2 71647 96009 7852 0 3 0x82 nanoslp syz-executor.3 83347 478521 7852 0 3 0x82 nanoslp syz-executor.7 94173 108120 7852 0 3 0x82 nanoslp syz-executor.5 7394 181038 7852 0 3 0x82 nanoslp syz-executor.0 25367 84538 7852 0 3 0x82 nanoslp syz-executor.2 98576 267948 0 0 3 0x14200 acct acct 97022 59501 7852 0 3 0x82 nanoslp syz-executor.1 52731 116649 0 0 3 0x14280 nfsidl nfsio 64673 353162 0 0 3 0x14280 nfsidl nfsio 63192 481571 0 0 3 0x14280 nfsidl nfsio 81644 289675 0 0 3 0x14280 nfsidl nfsio 7253 309556 0 0 3 0x14280 nfsidl nfsio 31024 296981 0 0 3 0x14280 nfsidl nfsio 50509 143292 0 0 3 0x14280 nfsidl nfsio 18738 32073 0 0 3 0x14280 nfsidl nfsio 49641 511718 0 0 3 0x14280 nfsidl nfsio 69369 197880 0 0 3 0x14280 nfsidl nfsio 3904 195418 0 0 3 0x14280 nfsidl nfsio 28851 94075 0 0 3 0x14280 nfsidl nfsio 92918 349361 0 0 3 0x14280 nfsidl nfsio 11076 276852 0 0 3 0x14280 nfsidl nfsio 64087 422803 0 0 3 0x14280 nfsidl nfsio 81105 419790 0 0 3 0x14280 nfsidl nfsio 88585 209398 0 0 3 0x14280 nfsidl nfsio 62975 135374 0 0 3 0x14280 nfsidl nfsio 48796 392577 0 0 3 0x14280 nfsidl nfsio 7493 232800 0 0 3 0x14280 nfsidl nfsio 98595 169499 7852 0 3 0x82 nanoslp syz-executor.6 98778 88269 7852 0 3 0x82 nanoslp syz-executor.4 10689 6164 1 0 3 0x18100083 ttyin getty 268 333502 0 0 3 0x14200 bored sosplice 7852 346032 21226 0 3 0x1a000082 kqread syz-fuzzer 7852 284364 21226 0 2 0x1e000002 syz-fuzzer 7852 483528 21226 0 3 0x1e000082 wait syz-fuzzer 7852 461352 21226 0 3 0x1e000082 thrsleep syz-fuzzer 7852 93822 21226 0 3 0x1e000082 thrsleep syz-fuzzer 7852 266965 21226 0 3 0x1e000082 thrsleep syz-fuzzer 7852 222825 21226 0 3 0x1e000082 wait syz-fuzzer 7852 293024 21226 0 3 0x1e000082 wait syz-fuzzer 7852 181854 21226 0 2 0x1e000002 syz-fuzzer 7852 157192 21226 0 3 0x1e000082 thrsleep syz-fuzzer 7852 210027 21226 0 3 0x1e000082 thrsleep syz-fuzzer 7852 426396 21226 0 3 0x1e000082 wait syz-fuzzer 7852 245494 21226 0 3 0x1e000082 wait syz-fuzzer 7852 412681 21226 0 3 0x1e000082 wait syz-fuzzer 7852 75008 21226 0 3 0x1e000082 wait syz-fuzzer 7852 90714 21226 0 3 0x1e000082 wait syz-fuzzer 21226 461345 1252 0 3 0x810008a sigsusp ksh 1252 55754 47912 0 3 0x1800009a kqread sshd 47912 206790 1 0 3 0x18000088 kqread sshd 69484 417756 12105 74 3 0x19100092 bpf pflogd 12105 190584 1 0 3 0x18000080 netio pflogd 32091 192839 50360 73 3 0x19100090 kqread syslogd 50360 348846 1 0 3 0x18100082 netio syslogd 47014 287545 1 0 3 0x18100080 kqread resolvd 18244 268619 0 0 3 0x14200 bored smr 88365 493146 0 0 2 0x14200 zerothread 83489 452923 0 0 3 0x14200 aiodoned aiodoned 1765 433231 0 0 3 0x14200 syncer update 84430 87165 0 0 3 0x14200 cleaner cleaner 47165 303942 0 0 3 0x14200 reaper reaper 66187 9501 0 0 3 0x14200 pgdaemon pagedaemon 23105 113846 0 0 3 0x14200 bored viomb 80109 432781 0 0 3 0x40014200 acpi0 acpi0 40323 329170 0 0 7 0x40014200 idle1 55782 438826 0 0 3 0x14200 bored softnet3 58316 445079 0 0 3 0x14200 bored softnet2 65569 81150 0 0 3 0x14200 bored softnet1 80395 447334 0 0 3 0x14200 bored softnet0 35449 143224 0 0 3 0x14200 bored systqmp 29780 31528 0 0 3 0x14200 bored systq 17034 234589 0 0 3 0x14200 tmoslp softclockmp 23520 45402 0 0 3 0x40014200 tmoslp softclock 94634 103564 0 0 3 0x40014200 idle0 1 373095 0 0 3 0x8080082 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 10234 6522K 8637K 166960K 30647 0 pcb 15 32K 36K 166960K 7807 0 rtable 251 8K 8K 166960K 14886 0 pf 39 10K 11K 166960K 1457 0 ifaddr 87 33K 36K 166960K 1511 0 ifgroup 68 2K 3K 166960K 2369 0 sysctl 4 1K 5K 166960K 45 0 counters 70 37K 37K 166960K 1462 0 ioctlops 0 0K 4K 166960K 5832 0 iov 0 0K 32K 166960K 7597 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1764 111K 111K 166960K 23342 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 2 1K 9K 166960K 829 0 VM map 2 1K 1K 166960K 2 0 sem 12 1K 1K 166960K 29 0 dirhash 6 1K 2K 166960K 147 0 ACPI 1697 195K 286K 166960K 12548 0 file desc 17 61K 89K 166960K 75476 0 sigio 0 0K 0K 166960K 2518 0 proc 90 69K 116K 166960K 10372 0 subproc 104 6K 10K 166960K 3223 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 0 0K 0K 166960K 6764 0 in_multi 103 7K 8K 166960K 3447 0 ether_multi 1 0K 0K 166960K 100 0 mrt 4 0K 0K 166960K 66 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 277 1235K 1235K 166960K 277 0 exec 0 0K 1K 166960K 11414 0 pfkey data 0 0K 4K 166960K 103 0 tdb 3 0K 0K 166960K 3 0 VM swap 8 62K 64K 166960K 10 0 UVM amap 630 917K 917K 166960K 718405 0 UVM aobj 131 4K 4K 166960K 148 0 pinsyscall 20 40K 108K 166960K 8819 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 2702 0 NDP 15 0K 1K 166960K 1183 0 temp 74 6812K 7448K 166960K 757199 0 kqueue 6 10K 30K 166960K 5287 0 SYN cache 2 1504K 1512K 166960K 4 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 6160 0 6159 76 75 1 5 0 8 0 rtentry 112 4350 0 4236 7 3 4 4 0 8 0 unpcb 144 57778 0 57768 452 446 6 10 0 8 5 syncache 336 738 0 738 99 99 0 1 0 8 0 sackhl 24 10 20 10 4 4 0 1 0 8 0 tcpqe 32 790 0 790 80 80 0 1 0 8 0 tcpcb 808 24023 0 23994 498 491 7 20 0 8 1 arp 120 945 0 923 1 0 1 1 0 8 0 ipq 40 11 0 11 4 4 0 1 0 8 0 ipqe 40 33 0 33 4 4 0 1 0 8 0 inpcb 392 64679 0 64650 711 704 7 24 0 8 2 nd6 136 731 0 707 1 0 1 1 0 8 0 pkpcb 40 394 0 394 58 58 0 1 0 8 0 kcovpl 48 229 0 221 1 0 1 1 0 8 0 ppxss 1168 265 0 265 71 71 0 1 0 8 0 pffrag 232 414 0 411 9 8 1 1 0 482 0 pffrnode 88 413 0 410 9 8 1 1 0 8 0 pffrent 40 4526 0 4523 10 9 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 pfstitem 24 2152 0 2123 1 0 1 1 0 8 0 pfstkey 128 2175 0 2146 7 5 2 3 0 8 0 pfstate 376 2175 0 2146 31 27 4 8 0 8 0 pfrule 1344 21 0 16 2 1 1 2 0 8 0 art_heap8 4096 49 0 48 11 10 1 3 0 8 0 art_heap4 256 13029 0 12565 101 72 29 34 0 8 0 art_table 32 13078 0 12613 6 2 4 5 0 8 0 art_node 16 4059 0 3958 1 0 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 14 0 4 1 0 1 1 0 8 0 shmpl 112 145 0 17 4 0 4 4 0 8 0 dirhash 1024 107 0 103 3 1 2 3 0 8 0 dino2pl 256 101310 0 99455 117 0 117 117 0 8 0 ffsino 272 101310 0 99455 125 0 125 125 0 8 0 nchpl 144 201760 0 200017 67 0 67 67 0 8 0 uvmvnodes 80 10176 0 0 208 0 208 208 0 8 0 vnodes 216 10176 0 0 566 0 566 566 0 8 0 namei 1024 681472 0 681472 12 11 1 2 0 8 1 percpumem 16 745 0 696 1 0 1 1 0 8 0 vcpupl 2048 518 0 6 65 0 65 65 0 8 0 vmpool 696 581 0 69 47 0 47 47 0 8 0 kstatmem 264 1422 0 1392 10 7 3 3 0 8 0 scxspl 216 588067 0 588067 135 134 1 8 1 8 1 plimitpl 152 7945 0 7930 1 0 1 1 0 8 0 sigapl 424 76687 0 76619 21 13 8 9 0 8 0 futexpl 64 627915 0 627911 3 2 1 1 0 8 0 knotepl 120 2986 0 0 19 3 16 19 0 8 0 kqueuepl 216 12730 0 12724 196 195 1 8 0 8 0 pipepl 320 11655 0 11627 296 293 3 12 0 8 0 fdescpl 496 75330 0 75303 25 21 4 5 0 8 0 filepl 152 446933 0 446705 549 535 14 23 0 8 4 filepl: pool(0xffffffff82e2d230:filepl): page inconsistency: page 0x0; at page head addr 0xfffffd8066f61f90 (p 0xfffffd8066f61000) lockfpl 104 19707 0 19706 28 27 1 2 0 8 0 lockfspl 48 5598 0 5597 1 0 1 1 0 8 0 sessionpl 144 255 0 239 1 0 1 1 0 8 0 pgrppl 48 2023 0 2007 1 0 1 1 0 8 0 ucredpl 104 64847 0 64836 1 0 1 1 0 8 0 zombiepl 144 76621 0 76619 5 4 1 1 0 8 0 processpl 1136 76687 0 76619 6 0 6 6 0 8 0 procpl 680 200940 0 200849 28 19 9 10 0 8 0 srpgc 96 328 0 328 87 87 0 1 0 8 0 sosppl 168 1018 0 1012 17 16 1 1 0 8 0 sockpl 584 129218 0 129177 763 750 13 22 0 8 6 mcl64k 65536 73 0 0 4 1 3 3 0 8 0 mcl16k 16384 65 0 0 5 2 3 3 0 8 0 mcl12k 12288 41 0 0 2 0 2 2 0 8 0 mcl9k 9216 33 0 0 3 1 2 2 0 8 0 mcl8k 8192 90 0 0 4 1 3 3 0 8 0 mcl4k 4096 81 0 0 4 1 3 4 0 8 0 mcl2k2 2112 17 0 0 2 0 2 2 0 8 0 mcl2k 2048 848 0 0 34 21 13 31 0 8 0 mtagpl 96 399 0 0 8 2 6 8 0 8 0 mbufpl 256 9474 0 0 557 1 556 556 0 8 0 bufpl 280 130848 0 120671 734 6 728 728 0 8 0 anonpl 24 7044989 0 7029437 267 143 124 149 0 186 0 amapchunkpl 152 2287369 0 2286444 212 172 40 54 0 158 0 amappl16 200 141558 0 140940 526 487 39 57 0 8 0 amappl15 192 264 0 262 1 0 1 1 0 8 0 amappl14 184 901 0 883 5 3 2 2 0 8 0 amappl13 176 32 0 32 5 5 0 1 0 8 0 amappl12 168 79425 0 79380 24 21 3 3 0 8 0 amappl11 160 65 0 56 1 0 1 1 0 8 0 amappl10 152 375 0 355 2 0 2 2 0 8 0 amappl9 144 753 0 753 74 73 1 1 0 8 1 amappl8 136 3422 0 3108 13 0 13 13 0 8 0 amappl7 128 456 0 439 1 0 1 1 0 8 0 amappl6 120 3899 0 3854 5 3 2 2 0 8 0 amappl5 112 2453 0 2440 1 0 1 1 0 8 0 amappl4 104 3622 0 3562 3 1 2 3 0 8 0 amappl3 96 442171 0 442087 3 0 3 3 0 8 0 amappl2 88 79750 0 79645 9 6 3 4 0 8 0 amappl1 80 287742 0 287281 23 9 14 23 0 8 0 amappl 88 713908 0 713587 15 6 9 9 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 147 0 17 3 0 3 3 0 8 0 uaddrrnd 24 75911 0 75372 4 0 4 4 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 75911 0 75372 4 0 4 4 0 8 0 vmmpekpl 168 478965 0 478850 6 0 6 6 0 8 0 vmmpepl 168 4486105 0 4482863 1390 1164 226 284 0 357 43 vmsppl 448 75910 0 75372 63 2 61 61 0 8 0 rwobjpl 56 1023070 0 1010763 248 74 174 176 0 8 0 pdppl 4096 151829 0 151256 2341 1765 576 585 0 8 3 pvpl 32 48795 0 0 395 1 394 395 0 265 0 pmappl 248 75910 0 75372 35 1 34 35 0 8 0 extentpl 40 56 0 38 1 0 1 1 0 8 0 phpool 112 4908 0 3320 46 0 46 46 0 8 0 ddb{0}> machine ddbcpu 0 Invalid cpu 0 ddb{0}> trace db_enter() at db_enter+0x1c sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff828d6a41) at panic+0x17b sys/kern/subr_prf.c:198 closef(fffffd8066f613a8,ffff80002f8e12b0) at closef+0x187 sys/kern/kern_descrip.c:1232 fdfree(ffff80002f8e12b0) at fdfree+0xe4 sys/kern/kern_descrip.c:1190 exit1(ffff80002f8e12b0,0,0,1) at exit1+0x3a0 sys/kern/kern_exit.c:199 sys_exit(ffff80002f8e12b0,ffff80002a1b25d0,ffff80002a1b2530) at sys_exit+0x1a sys/kern/kern_exit.c:89 syscall(ffff80002a1b25d0) at syscall+0x53b mi_syscall sys/sys/syscall_mi.h:183 [inline] syscall(ffff80002a1b25d0) at syscall+0x53b sys/arch/amd64/amd64/trap.c:577 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x79cad1cb97c0, count: -8 ddb{0}> machine ddbcpu 1 Stopped at x86_ipi_db+0x1e: addq $0x8,%rsp x86_ipi_db(ffff800029cebff0) at x86_ipi_db+0x1e sys/arch/amd64/amd64/db_interface.c:393 x86_ipi_handler() at x86_ipi_handler+0xb7 sys/arch/amd64/amd64/ipi.c:106 Xresume_lapic_ipi() at Xresume_lapic_ipi+0x27 acpicpu_idle() at acpicpu_idle+0x2f1 sys/dev/acpi/acpicpu.c:1206 sched_idle(ffff800029cebff0) at sched_idle+0x41d sys/kern/kern_sched.c:183 end trace frame: 0x0, count: 10 ddb{1}> trace x86_ipi_db(ffff800029cebff0) at x86_ipi_db+0x1e sys/arch/amd64/amd64/db_interface.c:393 x86_ipi_handler() at x86_ipi_handler+0xb7 sys/arch/amd64/amd64/ipi.c:106 Xresume_lapic_ipi() at Xresume_lapic_ipi+0x27 acpicpu_idle() at acpicpu_idle+0x2f1 sys/dev/acpi/acpicpu.c:1206 sched_idle(ffff800029cebff0) at sched_idle+0x41d sys/kern/kern_sched.c:183 end trace frame: 0x0, count: -5