panic: kernel diagnostic assertion "TAILQ_EMPTY(&lock->lf_blkhd)" failed: file "/syzkaller/managers/multicore/kernel/sys/kern/vfs_lockf.c", line 205 Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *430357 35954 0 0 0x4000000 0 syz-executor.2 db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff8259eac4) at panic+0x177 sys/kern/subr_prf.c:202 __assert(ffffffff82612e18,ffffffff8256ffc8,cd,ffffffff825f2f93) at __assert+0x25 sys/kern/subr_prf.c:161 lf_free(fffffd806f0883a8) at lf_free+0xe2 ls_rele sys/kern/vfs_lockf.c:152 [inline] lf_free(fffffd806f0883a8) at lf_free+0xe2 sys/kern/vfs_lockf.c:208 lf_setlock(fffffd806f0883a8) at lf_setlock+0xb54 lf_advlock(ffff800000ce74a0,0,fffffd807f7d55d0,8,ffff800027536090,50) at lf_advlock+0x3a7 sys/kern/vfs_lockf.c:301 VOP_ADVLOCK(fffffd8075e1c870,fffffd807f7d55d0,8,ffff800027536090,50) at VOP_ADVLOCK+0x71 sys/kern/vfs_vops.c:628 sys_fcntl(ffff8000fffeed30,ffff800027536118,ffff800027536170) at sys_fcntl+0xad9 syscall(ffff8000275361e0) at syscall+0x489 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff8000275361e0) at syscall+0x489 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x5b3e7c18580, count: 5 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 "TAILQ_EMPTY(&lock->lf_blkhd)" failed: file "/syzkaller/managers/multicore/kernel/sys/kern/vfs_lockf.c", line 205 ddb{0}> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff8259eac4) at panic+0x177 sys/kern/subr_prf.c:202 __assert(ffffffff82612e18,ffffffff8256ffc8,cd,ffffffff825f2f93) at __assert+0x25 sys/kern/subr_prf.c:161 lf_free(fffffd806f0883a8) at lf_free+0xe2 ls_rele sys/kern/vfs_lockf.c:152 [inline] lf_free(fffffd806f0883a8) at lf_free+0xe2 sys/kern/vfs_lockf.c:208 lf_setlock(fffffd806f0883a8) at lf_setlock+0xb54 lf_advlock(ffff800000ce74a0,0,fffffd807f7d55d0,8,ffff800027536090,50) at lf_advlock+0x3a7 sys/kern/vfs_lockf.c:301 VOP_ADVLOCK(fffffd8075e1c870,fffffd807f7d55d0,8,ffff800027536090,50) at VOP_ADVLOCK+0x71 sys/kern/vfs_vops.c:628 sys_fcntl(ffff8000fffeed30,ffff800027536118,ffff800027536170) at sys_fcntl+0xad9 syscall(ffff8000275361e0) at syscall+0x489 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff8000275361e0) at syscall+0x489 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x5b3e7c18580, count: -10 ddb{0}> show registers rdi 0 rsi 0x1 rbp 0xffff800027535d80 rbx 0xffffffff8297bc5f cpu_info_full_primary+0x2c5f rdx 0xffff800000c049c0 rcx 0 rax 0xffff8000fffeed30 r8 0 r9 0x8080808080808080 r10 0x1842137bf3f6092f r11 0x37a49192e7cb3971 r12 0xffffffff8297ba60 cpu_info_full_primary+0x2a60 r13 0 r14 0 r15 0x1 rip 0xffffffff8232f328 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800027535d70 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor.2) pid=430357 stat=onproc flags process=0 proc=4000000 pri=32, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff8000fffef510,0xffffffff82a71a88 process=0xffff80002a5029a8 user=0xffff800027531000, vmspace=0xfffffd80678515e0 estcpu=36, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 35954 294520 84633 0 2 0 syz-executor.2 35954 156737 84633 0 3 0x4000080 lockf syz-executor.2 *35954 430357 84633 0 7 0x4000000 syz-executor.2 17914 478009 10186 0 2 0 syz-executor.0 17914 113534 10186 0 2 0x4000000 syz-executor.0 96985 416498 87753 0 3 0x80 nanoslp syz-executor.6 96985 370905 87753 0 3 0x4000080 lockf syz-executor.6 96985 233000 87753 0 3 0x4000080 fsleep syz-executor.6 96985 74698 87753 0 3 0x4000080 fsleep syz-executor.6 60109 56992 264 0 2 0x480 syz-executor.1 60109 161207 264 0 3 0x4000080 lockf syz-executor.1 60109 266763 264 0 3 0x4000080 fsleep syz-executor.1 84622 339869 15954 0 3 0x80 nanoslp syz-executor.4 84622 413171 15954 0 3 0x4000080 lockf syz-executor.4 84622 317506 15954 0 3 0x4000080 lockf syz-executor.4 84622 446770 15954 0 3 0x4000080 fsleep syz-executor.4 264 502427 18820 0 2 0x482 syz-executor.1 10186 46628 18820 0 3 0x82 nanoslp syz-executor.0 98456 214817 18820 0 3 0x82 piperd syz-executor.3 51595 329667 18820 0 3 0x82 piperd syz-executor.7 15954 243014 18820 0 2 0x482 syz-executor.4 84633 367068 18820 0 2 0x482 syz-executor.2 87753 507280 18820 0 3 0x82 nanoslp syz-executor.6 7727 459121 18820 0 2 0x2 syz-executor.5 8853 513935 0 0 3 0x14200 acct acct 20905 366283 0 0 3 0x14200 bored sosplice 18820 312450 46733 0 3 0x82 thrsleep syz-fuzzer 18820 409680 46733 0 2 0x4000482 syz-fuzzer 18820 274239 46733 0 3 0x4000082 thrsleep syz-fuzzer 18820 436334 46733 0 3 0x4000082 thrsleep syz-fuzzer 18820 424712 46733 0 3 0x4000082 nanoslp syz-fuzzer 18820 132682 46733 0 3 0x4000082 thrsleep syz-fuzzer 18820 145851 46733 0 3 0x4000082 kqread syz-fuzzer 18820 270692 46733 0 3 0x4000082 thrsleep syz-fuzzer 18820 270738 46733 0 3 0x4000082 thrsleep syz-fuzzer 46733 359143 79206 0 3 0x10008a sigsusp ksh 79206 287770 66627 0 3 0x9a kqread sshd 12984 271695 1 0 3 0x100083 ttyin getty 66627 424125 1 0 3 0x88 kqread sshd 76440 344505 62691 74 3 0x1100092 bpf pflogd 62691 41808 1 0 3 0x80 netio pflogd 15873 146798 70915 73 3 0x1100090 kqread syslogd 70915 193121 1 0 3 0x100082 netio syslogd 52239 412525 1 0 3 0x100080 kqread resolvd 80713 230132 4612 77 3 0x100092 kqread dhcpleased 21544 327590 4612 77 3 0x100092 kqread dhcpleased 4612 186375 1 0 3 0x80 kqread dhcpleased 12935 232482 0 0 3 0x14200 bored smr 2919 464982 0 0 2 0x14200 zerothread 54785 370691 0 0 3 0x14200 aiodoned aiodoned 56531 149883 0 0 3 0x14200 syncer update 67004 393576 0 0 3 0x14200 cleaner cleaner 88084 506249 0 0 3 0x14200 reaper reaper 17876 391294 0 0 3 0x14200 pgdaemon pagedaemon 53899 433765 0 0 3 0x14200 bored viomb 22098 162338 0 0 3 0x40014200 acpi0 acpi0 87404 321418 0 0 7 0x40014200 idle1 66807 368511 0 0 3 0x14200 bored softnet 53058 208227 0 0 3 0x14200 bored softnet 3392 218063 0 0 3 0x14200 bored softnet 20858 484123 0 0 3 0x14200 bored softnet 64923 414641 0 0 3 0x14200 bored systqmp 87547 131524 0 0 3 0x14200 bored systq 54168 271275 0 0 3 0x40014200 bored softclock 51283 22653 0 0 3 0x40014200 idle0 1 199828 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 35954 (syz-executor.2) thread 0xffff8000fffeed30 (430357) Process 17914 (syz-executor.0) thread 0xffff8000fffef510 (113534) Process 7727 (syz-executor.5) thread 0xffff80002116fa48 (459121) ddb{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 10209 6510K 7367K 78643K 25577 0 pcb 13 14K 16K 78643K 845 0 rtable 191 15K 17K 78643K 1792 0 ifaddr 81 18K 21K 78643K 604 0 sysctl 2 0K 0K 78643K 2 0 counters 52 35K 36K 78643K 248 0 ioctlops 0 0K 4K 78643K 3582 0 iov 0 0K 24K 78643K 2151 0 mount 1 1K 1K 78643K 1 0 log 0 0K 0K 78643K 5 0 vnodes 1455 91K 91K 78643K 7951 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 9K 78643K 102 0 VM map 2 1K 1K 78643K 2 0 sem 12 0K 0K 78643K 2018 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1697 195K 286K 78643K 12548 0 file desc 15 53K 93K 78643K 10281 0 sigio 0 0K 0K 78643K 150 0 proc 71 91K 115K 78643K 1805 0 subproc 104 6K 6K 78643K 481 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 ip_moptions 0 0K 0K 78643K 283 0 in_multi 77 5K 6K 78643K 504 0 ether_multi 1 0K 0K 78643K 33 0 mrt 1 0K 0K 78643K 25 0 ISOFS mount 1 32K 32K 78643K 1 0 MSDOSFS mount 1 16K 16K 78643K 1 0 ttys 193 864K 864K 78643K 193 0 exec 0 0K 2K 78643K 2548 0 pfkey data 0 0K 0K 78643K 5 0 tdb 3 0K 0K 78643K 3 0 pagedep 1 8K 8K 78643K 1 0 inodedep 1 32K 32K 78643K 1 0 newblk 1 0K 0K 78643K 1 0 VM swap 7 26K 26K 78643K 7 0 UVM amap 356 428K 444K 78643K 60628 0 UVM aobj 131 6K 6K 78643K 139 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 153 0 NDP 12 0K 2K 78643K 187 0 temp 145 4762K 5786K 78643K 106921 0 kqueue 12 18K 26K 78643K 623 0 SYN cache 2 16K 16K 78643K 2 0 ddb{0}> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle plcache 128 22 0 0 1 0 1 1 0 8 0 rtpcb 120 576 0 573 5 4 1 3 0 8 0 rtentry 112 629 0 548 4 0 4 4 0 8 0 unpcb 136 6932 0 6917 93 92 1 8 0 8 0 syncache 296 32 0 32 10 10 0 1 0 8 0 tcpqe 32 212 0 212 5 5 0 2 0 8 0 tcpcb 736 2540 0 2535 102 101 1 8 0 8 0 arp 120 139 0 125 1 0 1 1 0 8 0 inpcb 312 7227 0 7220 172 166 6 16 0 8 5 nd6 48 116 0 98 1 0 1 1 0 8 0 pkpcb 40 15 0 15 4 4 0 1 0 8 0 kcovpl 48 37 0 29 1 0 1 1 0 8 0 ppxss 1248 30 0 30 8 8 0 1 0 8 0 pffrag 232 34 0 32 6 5 1 1 0 482 0 pffrnode 88 34 0 32 6 5 1 1 0 8 0 pffrent 40 80 0 78 8 7 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 0 1 0 1 1 0 8 0 pfstitem 24 23 0 21 1 0 1 1 0 8 0 pfstkey 112 23 0 21 1 0 1 1 0 8 0 pfstate 336 23 0 21 2 1 1 2 0 8 0 pfrule 1360 57 0 50 2 1 1 2 0 8 0 rttmr 64 5 0 5 1 1 0 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 2125 0 1765 46 17 29 29 0 8 2 art_table 32 2126 0 1765 4 0 4 4 0 8 0 art_node 16 625 0 555 1 0 1 1 0 8 0 sysvmsgpl 40 40 0 14 1 0 1 1 0 8 0 semupl 112 8 0 8 1 1 0 1 0 8 0 semapl 112 2011 0 2001 1 0 1 1 0 8 0 shmpl 112 136 0 8 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 16968 0 15483 94 0 94 94 0 8 0 ffsino 272 16968 0 15483 100 0 100 100 0 8 0 nchpl 144 30371 0 28723 63 0 63 63 0 8 0 uvmvnodes 80 5926 0 0 121 0 121 121 0 8 0 vnodes 224 5926 0 0 349 0 349 349 0 8 0 namei 1024 118452 0 118450 3 2 1 1 0 8 0 percpumem 16 136 0 98 1 0 1 1 0 8 0 vcpupl 2048 22 0 0 3 0 3 3 0 8 0 vmpool 560 50 0 28 3 1 2 2 0 8 0 kstatmem 264 220 0 196 9 6 3 3 0 8 0 scsiplug 72 5 0 5 2 2 0 1 0 8 0 scxspl 216 84400 0 84400 15 14 1 8 0 8 1 plimitpl 152 1286 0 1271 1 0 1 1 0 8 0 sigapl 424 10554 0 10507 10 3 7 8 0 8 0 futexpl 64 99813 0 99809 3 2 1 1 0 8 0 knotepl 120 743 0 0 11 2 9 11 0 8 0 kqueuepl 216 1420 0 1412 19 18 1 5 0 8 0 pipepl 336 1516 0 1487 48 45 3 8 0 8 0 fdescpl 496 10514 0 10486 5 1 4 5 0 8 0 filepl 152 74469 0 74213 160 145 15 22 0 8 4 lockfpl 104 20367 0 20355 17 16 1 4 0 8 0 lockfspl 48 2725 0 2719 2 1 1 2 0 8 0 sessionpl 144 53 0 36 1 0 1 1 0 8 0 pgrppl 48 135 0 118 1 0 1 1 0 8 0 ucredpl 96 22521 0 22504 1 0 1 1 0 8 0 zombiepl 144 10507 0 10507 1 0 1 1 0 8 1 processpl 1064 10554 0 10507 5 0 5 5 0 8 0 procpl 672 29106 0 29040 24 17 7 9 0 8 0 srpgc 96 32 0 32 15 14 1 1 0 8 1 sosppl 168 31 0 31 9 9 0 1 0 8 0 sockpl 480 14758 0 14733 460 448 12 29 0 8 8 mcl64k 65536 17 0 0 3 0 3 3 0 8 0 mcl16k 16384 9 0 0 2 0 2 2 0 8 0 mcl12k 12288 6 0 0 1 0 1 1 0 8 0 mcl9k 9216 9 0 0 1 0 1 1 0 8 0 mcl8k 8192 15 0 0 2 0 2 2 0 8 0 mcl4k 4096 17 0 0 3 0 3 3 0 8 0 mcl2k2 2112 7 0 0 1 0 1 1 0 8 0 mcl2k 2048 340 0 0 36 7 29 36 0 8 0 mtagpl 96 711 0 0 14 0 14 14 0 8 0 mbufpl 256 1377 0 0 54 0 54 54 0 8 0 bufpl 288 18175 0 11843 453 0 453 453 0 8 0 anonpl 24 1969556 0 1954947 227 115 112 129 0 186 0 amapchunkpl 152 175370 0 174712 75 45 30 40 0 158 0 amappl16 200 24894 0 24311 99 67 32 43 0 8 0 amappl15 192 2094 0 2091 1 0 1 1 0 8 0 amappl14 184 1256 0 1252 1 0 1 1 0 8 0 amappl13 176 1269 0 1264 1 0 1 1 0 8 0 amappl12 168 1718 0 1712 1 0 1 1 0 8 0 amappl11 160 767 0 747 1 0 1 1 0 8 0 amappl10 152 1931 0 1920 1 0 1 1 0 8 0 amappl9 144 1608 0 1599 1 0 1 1 0 8 0 amappl8 136 1974 0 1863 4 0 4 4 0 8 0 amappl7 128 910 0 900 1 0 1 1 0 8 0 amappl6 120 1502 0 1469 3 1 2 2 0 8 0 amappl5 112 9782 0 9767 1 0 1 1 0 8 0 amappl4 104 2936 0 2905 2 1 1 2 0 8 0 amappl3 96 33105 0 33049 2 0 2 2 0 8 0 amappl2 88 12727 0 12663 3 1 2 3 0 8 0 amappl1 80 251010 0 250349 22 6 16 20 0 8 0 amappl 88 59439 0 59239 6 1 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 138 0 8 3 0 3 3 0 8 0 uaddrrnd 24 10564 0 10514 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 10564 0 10514 1 0 1 1 0 8 0 vmmpekpl 168 78298 0 78229 4 0 4 4 0 8 0 vmmpepl 168 1018074 0 1015413 275 143 132 145 0 357 0 vmsppl 368 10563 0 10514 6 1 5 5 0 8 0 rwobjpl 56 251339 0 243572 119 8 111 113 0 8 0 pdppl 4096 21135 0 21050 611 520 91 93 0 8 6 pvpl 32 3965285 0 3945906 397 208 189 257 0 265 0 pmappl 248 10563 0 10514 5 1 4 4 0 8 0 extentpl 40 58 0 38 1 0 1 1 0 8 0 phpool 112 1749 0 863 27 1 26 26 0 8 0 ddb{0}> machine ddbcpu 0 Invalid cpu 0 ddb{0}> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff8259eac4) at panic+0x177 sys/kern/subr_prf.c:202 __assert(ffffffff82612e18,ffffffff8256ffc8,cd,ffffffff825f2f93) at __assert+0x25 sys/kern/subr_prf.c:161 lf_free(fffffd806f0883a8) at lf_free+0xe2 ls_rele sys/kern/vfs_lockf.c:152 [inline] lf_free(fffffd806f0883a8) at lf_free+0xe2 sys/kern/vfs_lockf.c:208 lf_setlock(fffffd806f0883a8) at lf_setlock+0xb54 lf_advlock(ffff800000ce74a0,0,fffffd807f7d55d0,8,ffff800027536090,50) at lf_advlock+0x3a7 sys/kern/vfs_lockf.c:301 VOP_ADVLOCK(fffffd8075e1c870,fffffd807f7d55d0,8,ffff800027536090,50) at VOP_ADVLOCK+0x71 sys/kern/vfs_vops.c:628 sys_fcntl(ffff8000fffeed30,ffff800027536118,ffff800027536170) at sys_fcntl+0xad9 syscall(ffff8000275361e0) at syscall+0x489 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff8000275361e0) at syscall+0x489 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x5b3e7c18580, count: -10 ddb{0}> machine ddbcpu 1 Stopped at x86_ipi_db+0x1a: addq $0x8,%rsp x86_ipi_db(ffff800020cd8ff0) at x86_ipi_db+0x1a 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+0x23 acpicpu_idle() at acpicpu_idle+0x312 sys/dev/acpi/acpicpu.c:1206 sched_idle(ffff800020cd8ff0) at sched_idle+0x417 sys/kern/kern_sched.c:178 end trace frame: 0x0, count: 10 ddb{1}> trace x86_ipi_db(ffff800020cd8ff0) at x86_ipi_db+0x1a 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+0x23 acpicpu_idle() at acpicpu_idle+0x312 sys/dev/acpi/acpicpu.c:1206 sched_idle(ffff800020cd8ff0) at sched_idle+0x417 sys/kern/kern_sched.c:178 end trace frame: 0x0, count: -5