ÿ¬D[kÁwitness: lock order reversal: 1st 0xfffffd8077f99258 fdlock (&newfdp->fd_fd.fd_lock) 2nd 0xfffffd806e40d4d8 inode (&ip->i_lock) lock order data w2 -> w1 missing lock order data w1 -> w2 missing Stopped at db_enter+0x18: addq $0x8,%rsp ddb{0}> ddb{0}> set $lines = 0 ddb{0}> set $maxwidth = 0 ddb{0}> show panic the kernel did not panic ddb{0}> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 witness_checkorder(fffffd806e40d4d8,9,0) at witness_checkorder+0x108b rw_enter(fffffd806e40d4c8,1) at rw_enter+0xd4 rrw_enter(fffffd806e40d4c8,1) at rrw_enter+0x88 sys/kern/kern_rwlock.c:461 VOP_LOCK(fffffd807e2c5d70,2001) at VOP_LOCK+0x87 sys/kern/vfs_vops.c:614 vn_lock(fffffd807e2c5d70,2001) at vn_lock+0x84 sys/kern/vfs_vnops.c:579 vget(fffffd807e2c5d70,2001) at vget+0x1f7 sys/kern/vfs_subr.c:676 ktrwriteraw(ffff8000222baa90,fffffd807e2c5d70,fffffd807f7d8960,ffff800021287d00,ffff800021287ce0) at ktrwriteraw+0x138 sys/kern/kern_ktrace.c:659 ktrstruct(ffff8000222baa90,ffffffff823be4dd,ffff800021287de8,8) at ktrstruct+0x169 ktrwrite2 sys/kern/kern_ktrace.c:627 [inline] ktrstruct(ffff8000222baa90,ffffffff823be4dd,ffff800021287de8,8) at ktrstruct+0x169 sys/kern/kern_ktrace.c:311 sys_socketpair(ffff8000222baa90,ffff800021287e58,ffff800021287ea0) at sys_socketpair+0x3ed sys/kern/uipc_syscalls.c:470 syscall(ffff800021287f20) at syscall+0x5bf mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff800021287f20) at syscall+0x5bf sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xb81523258b0, count: -12 ddb{0}> show registers rdi 0xffff8000244b6000 rsi 0xcaa0 __ALIGN_SIZE+0xbaa0 rbp 0xffff800021287910 rbx 0x3 rdx 0xffff8000244b6000 rcx 0xca9f __ALIGN_SIZE+0xba9f rax 0xffffffff81938927 db_enter+0x17 r8 0xffffffff8130d421 witness_checkorder+0x1061 r9 0x5 r10 0x31016d745e24e7be r11 0x67fccf7cdd5c9ded r12 0 r13 0xfffffd806e40d4d8 r14 0 r15 0xfffffd8002cfc740 rip 0xffffffff81938928 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800021287900 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor.0) pid=459465 stat=onproc flags process=0 proc=4000001 pri=61, usrpri=61, nice=20 forw=0xffffffffffffffff, list=0xffff8000222ba2b0,0xffffffff828d7160 process=0xffff80002231d0f8 user=0xffff800021282000, vmspace=0xfffffd806e90be68 estcpu=36, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 89471 170299 842 0 7 0 syz-executor.0 *89471 459465 842 0 7 0x4000001 syz-executor.0 842 29792 99039 0 3 0x82 nanoslp syz-executor.0 493 99490 0 0 3 0x14280 nfsidl nfsio 70922 347016 0 0 3 0x14280 nfsidl nfsio 49790 391746 0 0 3 0x14280 nfsidl nfsio 62986 113016 0 0 3 0x14280 nfsidl nfsio 32815 455487 0 0 3 0x14280 nfsidl nfsio 47715 160231 0 0 3 0x14280 nfsidl nfsio 48780 373576 0 0 3 0x14280 nfsidl nfsio 21430 380493 0 0 3 0x14280 nfsidl nfsio 2216 271271 0 0 3 0x14280 nfsidl nfsio 59961 125158 0 0 3 0x14280 nfsidl nfsio 97135 494585 0 0 3 0x14280 nfsidl nfsio 6549 200329 0 0 3 0x14280 nfsidl nfsio 2275 298500 0 0 3 0x14280 nfsidl nfsio 41062 48550 0 0 3 0x14280 nfsidl nfsio 181 429359 0 0 3 0x14280 nfsidl nfsio 54378 160968 0 0 3 0x14280 nfsidl nfsio 8246 221985 0 0 3 0x14280 nfsidl nfsio 63940 334875 0 0 3 0x14280 nfsidl nfsio 52851 390015 0 0 3 0x14280 nfsidl nfsio 9704 168699 0 0 3 0x14280 nfsidl nfsio 38738 392946 99039 0 3 0x2 biowait syz-executor.1 53789 386603 0 0 3 0x14200 bored sosplice 99039 196114 91215 0 3 0x82 thrsleep syz-fuzzer 99039 481957 91215 0 3 0x4000082 nanoslp syz-fuzzer 99039 460933 91215 0 3 0x4000082 thrsleep syz-fuzzer 99039 230764 91215 0 3 0x4000082 thrsleep syz-fuzzer 99039 199641 91215 0 3 0x4000082 thrsleep syz-fuzzer 99039 137761 91215 0 3 0x4000082 thrsleep syz-fuzzer 99039 409763 91215 0 3 0x4000082 nanoslp syz-fuzzer 99039 139001 91215 0 3 0x4000082 kqread syz-fuzzer 91215 479755 94733 0 3 0x10008a sigsusp ksh 94733 11857 49344 0 3 0x92 select sshd 35566 74975 1 0 3 0x100083 ttyin getty 49344 176964 1 0 3 0x80 select sshd 47072 314448 13552 74 3 0x100092 bpf pflogd 13552 350294 1 0 3 0x80 netio pflogd 267 83077 84130 73 3 0x100090 kqread syslogd 84130 112485 1 0 3 0x100082 netio syslogd 55027 349370 1 77 3 0x100090 poll dhclient 81171 53073 1 0 3 0x80 poll dhclient 62882 412569 0 0 3 0x14200 bored smr 44988 401503 0 0 2 0x14200 zerothread 25877 344594 0 0 3 0x14200 aiodoned aiodoned 99424 456323 0 0 3 0x14200 syncer update 67971 506314 0 0 3 0x14200 cleaner cleaner 78065 208744 0 0 3 0x14200 reaper reaper 94732 107923 0 0 3 0x14200 pgdaemon pagedaemon 13844 219642 0 0 3 0x14200 bored crynlk 66944 442596 0 0 3 0x14200 bored crypto 65918 128656 0 0 3 0x14200 bored viomb 61709 173568 0 0 3 0x40014200 acpi0 acpi0 64482 373808 0 0 3 0x40014200 idle1 547 180388 0 0 3 0x14200 bored softnet 18124 226862 0 0 3 0x14200 bored systqmp 33470 133181 0 0 3 0x14200 bored systq 46961 31519 0 0 3 0x40014200 bored softclock 27565 404314 0 0 3 0x40014200 idle0 1 421415 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 89471 (syz-executor.0) thread 0xffff8000222baa90 (459465) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff828d62a8) #0 witness_lock+0x4b0 stacktrace_save sys/sys/stacktrace.h:36 [inline] #0 witness_lock+0x4b0 sys/kern/subr_witness.c:1182 #1 ktrstruct+0xee #2 sys_socketpair+0x3ed sys/kern/uipc_syscalls.c:470 #3 syscall+0x5bf mi_syscall sys/sys/syscall_mi.h:102 [inline] #3 syscall+0x5bf sys/arch/amd64/amd64/trap.c:585 #4 Xsyscall+0x128 exclusive rwlock fdlock r = 0 (0xfffffd8077f99258) #0 witness_lock+0x4b0 stacktrace_save sys/sys/stacktrace.h:36 [inline] #0 witness_lock+0x4b0 sys/kern/subr_witness.c:1182 #1 sys_socketpair+0x219 #2 syscall+0x5bf mi_syscall sys/sys/syscall_mi.h:102 [inline] #2 syscall+0x5bf sys/arch/amd64/amd64/trap.c:585 #3 Xsyscall+0x128 Process 38738 (syz-executor.1) thread 0xffff80002126aa80 (392946) exclusive rrwlock inode r = 0 (0xfffffd806e40d1a8) #0 witness_lock+0x4b0 stacktrace_save sys/sys/stacktrace.h:36 [inline] #0 witness_lock+0x4b0 sys/kern/subr_witness.c:1182 #1 rw_enter+0x416 sys/kern/kern_rwlock.c:310 #2 rrw_enter+0x88 sys/kern/kern_rwlock.c:461 #3 ufs_ihashins+0x45 sys/ufs/ufs/ufs_ihash.c:140 #4 ffs_vget+0x135 sys/ufs/ffs/ffs_vfsops.c:1350 #5 ffs_inode_alloc+0x1e1 sys/ufs/ffs/ffs_alloc.c:394 #6 ufs_mkdir+0xf4 sys/ufs/ufs/ufs_vnops.c:1162 #7 VOP_MKDIR+0xc6 sys/kern/vfs_vops.c:457 #8 domkdirat+0x121 sys/kern/vfs_syscalls.c:3075 #9 syscall+0x5bf mi_syscall sys/sys/syscall_mi.h:102 [inline] #9 syscall+0x5bf sys/arch/amd64/amd64/trap.c:585 #10 Xsyscall+0x128 exclusive rrwlock inode r = 0 (0xfffffd8079708b40) #0 witness_lock+0x4b0 stacktrace_save sys/sys/stacktrace.h:36 [inline] #0 witness_lock+0x4b0 sys/kern/subr_witness.c:1182 #1 rw_enter+0x416 sys/kern/kern_rwlock.c:310 #2 rrw_enter+0x88 sys/kern/kern_rwlock.c:461 #3 VOP_LOCK+0x87 sys/kern/vfs_vops.c:614 #4 vn_lock+0x84 sys/kern/vfs_vnops.c:579 #5 vfs_lookup+0xe6 sys/kern/vfs_lookup.c:413 #6 namei+0x58a sys/kern/vfs_lookup.c:245 #7 domkdirat+0x75 sys/kern/vfs_syscalls.c:3060 #8 syscall+0x5bf mi_syscall sys/sys/syscall_mi.h:102 [inline] #8 syscall+0x5bf sys/arch/amd64/amd64/trap.c:585 #9 Xsyscall+0x128 ddb{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 10187 6515K 7341K 78643K 16101 0 pcb 13 8K 8K 78643K 229 0 rtable 108 3K 4K 78643K 658 0 ifaddr 81 15K 15K 78643K 238 0 counters 44 34K 34K 78643K 102 0 ioctlops 0 0K 4K 78643K 1582 0 iov 0 0K 16K 78643K 129 0 mount 1 1K 1K 78643K 1 0 log 0 0K 0K 78643K 1 0 vnodes 1223 77K 77K 78643K 2787 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 9K 78643K 23 0 VM map 2 1K 1K 78643K 2 0 sem 12 1K 1K 78643K 30 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1697 195K 286K 78643K 12598 0 file desc 5 13K 25K 78643K 4570 0 sigio 0 0K 0K 78643K 7 0 proc 62 63K 95K 78643K 985 0 subproc 32 2K 2K 78643K 85 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 ip_moptions 0 0K 0K 78643K 235 0 in_multi 33 2K 2K 78643K 239 0 ether_multi 1 0K 0K 78643K 56 0 mrt 0 0K 0K 78643K 20 0 ISOFS mount 1 32K 32K 78643K 1 0 MSDOSFS mount 1 16K 16K 78643K 1 0 ttys 43 201K 201K 78643K 43 0 exec 0 0K 2K 78643K 506 0 pfkey data 0 0K 0K 78643K 8 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 227 109K 109K 78643K 56118 0 UVM aobj 24 2K 2K 78643K 61 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 178 0 NDP 15 0K 0K 78643K 59 0 temp 144 3984K 4050K 78643K 19326 0 kqueue 3 4K 12K 78643K 125 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 20 0 0 1 0 1 1 0 8 0 rtpcb 120 126 0 124 1 0 1 1 0 8 0 rtentry 112 102 0 58 2 0 2 2 0 8 0 unpcb 120 901 0 889 1 0 1 1 0 8 0 syncache 296 32 0 32 5 5 0 1 0 8 0 tcpqe 32 14 0 14 2 2 0 1 0 8 0 tcpcb 736 700 0 696 18 17 1 5 0 8 0 arp 120 17 0 11 1 0 1 1 0 8 0 inpcb 304 1700 0 1694 4 3 1 2 0 8 0 rttmr 72 4 0 4 1 1 0 1 0 8 0 ip6q 72 10 0 10 1 1 0 1 0 8 0 ip6af 40 30 0 30 1 1 0 1 0 8 0 nd6 48 20 0 14 1 0 1 1 0 8 0 pkpcb 40 39 0 39 5 5 0 1 0 8 0 kcovpl 48 5 0 3 1 0 1 1 0 8 0 swfcl 56 4 0 0 1 0 1 1 0 8 0 ppxss 1128 4 0 4 1 1 0 1 0 8 0 pffrag 232 5 0 5 2 2 0 1 0 482 0 pffrnode 88 5 0 5 2 2 0 1 0 8 0 pffrent 40 10 0 10 2 2 0 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 90 0 79 1 0 1 1 0 8 0 pfstkey 112 90 0 79 2 0 2 2 0 8 0 pfstate 320 90 0 79 7 5 2 5 0 8 0 pfrule 1360 35 0 29 2 1 1 2 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 334 0 140 13 0 13 13 0 8 0 art_table 32 335 0 140 2 0 2 2 0 8 0 art_node 16 101 0 61 1 0 1 1 0 8 0 semupl 112 6 0 6 1 1 0 1 0 8 0 semapl 112 14 0 4 1 0 1 1 0 8 0 shmpl 112 58 0 37 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 7012 0 5601 89 0 89 89 0 8 0 ffsino 272 7012 0 5601 95 0 95 95 0 8 0 nchpl 144 12320 0 10724 60 0 60 60 0 8 0 uvmvnodes 72 5926 0 0 108 0 108 108 0 8 0 vnodes 224 5926 0 0 349 0 349 349 0 8 0 namei 1024 30248 0 30247 2 1 1 1 0 8 0 percpumem 16 62 0 29 1 0 1 1 0 8 0 vcpupl 1984 7 0 0 1 0 1 1 0 8 0 vmpool 560 17 0 10 1 0 1 1 0 8 0 scsiplug 72 5 0 5 1 1 0 1 0 8 0 scxspl 216 35835 0 35834 9 8 1 8 0 8 0 plimitpl 152 101 0 93 1 0 1 1 0 8 0 sigapl 424 4797 0 4744 7 0 7 7 0 8 1 futexpl 56 29844 0 29844 2 1 1 1 0 8 1 knotepl 112 243 0 223 1 0 1 1 0 8 0 kqueuepl 168 2147 0 2145 1 0 1 1 0 8 0 pipepl 336 152 0 141 5 4 1 2 0 8 0 fdescpl 496 4760 0 4744 3 0 3 3 0 8 0 filepl 152 14784 0 14681 6 1 5 5 0 8 1 lockfpl 104 543 0 542 1 0 1 1 0 8 0 lockfspl 48 170 0 169 1 0 1 1 0 8 0 sessionpl 144 21 0 10 1 0 1 1 0 8 0 pgrppl 48 34 0 23 1 0 1 1 0 8 0 ucredpl 96 1746 0 1737 1 0 1 1 0 8 0 zombiepl 144 4744 0 4744 1 0 1 1 0 8 1 processpl 1080 4797 0 4744 4 0 4 4 0 8 0 procpl 672 10382 0 10321 6 0 6 6 0 8 0 sosppl 168 41 0 41 4 4 0 1 0 8 0 sockpl 480 2790 0 2770 11 8 3 4 0 8 0 mcl64k 65536 29 0 0 4 0 4 4 0 8 0 mcl16k 16384 8 0 0 1 0 1 1 0 8 0 mcl12k 12288 10 0 0 1 0 1 1 0 8 0 mcl9k 9216 16 0 0 2 0 2 2 0 8 0 mcl8k 8192 12 0 0 2 0 2 2 0 8 0 mcl4k 4096 17 0 0 3 0 3 3 0 8 0 mcl2k2 2112 4 0 0 1 0 1 1 0 8 0 mcl2k 2048 289 0 0 15 1 14 15 0 8 0 mtagpl 96 155 0 0 4 0 4 4 0 8 0 mbufpl 256 1155 0 0 64 0 64 64 0 8 0 bufpl 280 8731 0 2467 448 0 448 448 0 8 0 anonpl 24 1252058 0 1244152 132 67 65 98 0 186 13 amapchunkpl 152 135001 0 134627 43 27 16 28 0 158 0 amappl16 200 11429 0 11169 57 43 14 38 0 8 0 amappl15 192 75 0 68 1 0 1 1 0 8 0 amappl14 184 9 0 7 1 0 1 1 0 8 0 amappl13 176 245 0 242 1 0 1 1 0 8 0 amappl12 168 4007 0 3999 1 0 1 1 0 8 0 amappl11 160 47 0 35 1 0 1 1 0 8 0 amappl10 152 54 0 43 1 0 1 1 0 8 0 amappl9 144 286 0 286 1 1 0 1 0 8 0 amappl8 136 1172 0 1101 3 0 3 3 0 8 0 amappl7 128 70 0 58 1 0 1 1 0 8 0 amappl6 120 162 0 146 1 0 1 1 0 8 0 amappl5 112 4473 0 4461 1 0 1 1 0 8 0 amappl4 104 4580 0 4551 1 0 1 1 0 8 0 amappl3 96 438 0 433 1 0 1 1 0 8 0 amappl2 88 548 0 499 2 0 2 2 0 8 0 amappl1 80 82405 0 81990 14 4 10 12 0 8 0 amappl 88 55605 0 55479 4 0 4 4 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 64 60 0 37 1 0 1 1 0 8 0 uaddrrnd 24 4777 0 4754 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 4777 0 4754 1 0 1 1 0 8 0 vmmpekpl 168 26862 0 26825 2 0 2 2 0 8 0 vmmpepl 168 533554 0 532018 107 34 73 91 0 357 0 vmsppl 368 4776 0 4754 4 1 3 3 0 8 1 rwobjpl 56 95079 0 94109 27 12 15 21 0 8 1 pdppl 4096 9561 0 9515 68 20 48 48 0 8 2 pvpl 32 2638486 0 2627236 270 141 129 162 0 265 32 pmappl 232 4776 0 4754 3 1 2 2 0 8 0 extentpl 40 58 0 40 1 0 1 1 0 8 0 phpool 112 392 0 47 10 0 10 10 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:398 witness_checkorder(fffffd806e40d4d8,9,0) at witness_checkorder+0x108b rw_enter(fffffd806e40d4c8,1) at rw_enter+0xd4 rrw_enter(fffffd806e40d4c8,1) at rrw_enter+0x88 sys/kern/kern_rwlock.c:461 VOP_LOCK(fffffd807e2c5d70,2001) at VOP_LOCK+0x87 sys/kern/vfs_vops.c:614 vn_lock(fffffd807e2c5d70,2001) at vn_lock+0x84 sys/kern/vfs_vnops.c:579 vget(fffffd807e2c5d70,2001) at vget+0x1f7 sys/kern/vfs_subr.c:676 ktrwriteraw(ffff8000222baa90,fffffd807e2c5d70,fffffd807f7d8960,ffff800021287d00,ffff800021287ce0) at ktrwriteraw+0x138 sys/kern/kern_ktrace.c:659 ktrstruct(ffff8000222baa90,ffffffff823be4dd,ffff800021287de8,8) at ktrstruct+0x169 ktrwrite2 sys/kern/kern_ktrace.c:627 [inline] ktrstruct(ffff8000222baa90,ffffffff823be4dd,ffff800021287de8,8) at ktrstruct+0x169 sys/kern/kern_ktrace.c:311 sys_socketpair(ffff8000222baa90,ffff800021287e58,ffff800021287ea0) at sys_socketpair+0x3ed sys/kern/uipc_syscalls.c:470 syscall(ffff800021287f20) at syscall+0x5bf mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff800021287f20) at syscall+0x5bf sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xb81523258b0, count: -12 ddb{0}> machine ddbcpu 1 Stopped at x86_ipi_db+0x1a: addq $0x8,%rsp ddb{1}> trace x86_ipi_db(ffff800020d58ff0) at x86_ipi_db+0x1a sys/arch/amd64/amd64/db_interface.c:352 x86_ipi_handler() at x86_ipi_handler+0xb7 sys/arch/amd64/amd64/ipi.c:106 Xresume_lapic_ipi() at Xresume_lapic_ipi+0x23 end of kernel end trace frame: 0x7f7ffffc06b0, count: -3