login: witness: lock order reversal: 1st 0xfffffd807b049258 fdlock (&newfdp->fd_fd.fd_lock) 2nd 0xfffffd8067153d60 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(fffffd8067153d60,9,0) at witness_checkorder+0x108b rw_enter(fffffd8067153d50,1) at rw_enter+0xd4 rrw_enter(fffffd8067153d50,1) at rrw_enter+0x88 sys/kern/kern_rwlock.c:461 VOP_LOCK(fffffd806848e5e0,2001) at VOP_LOCK+0x4b sys/kern/vfs_vops.c:614 vn_lock(fffffd806848e5e0,2001) at vn_lock+0x6c sys/kern/vfs_vnops.c:575 vget(fffffd806848e5e0,2001) at vget+0x1c6 sys/kern/vfs_subr.c:671 ktrwriteraw(ffff800021282a80,fffffd806848e5e0,fffffd807f7b78a0,ffff800022cd9860,ffff800022cd9840) at ktrwriteraw+0x138 sys/kern/kern_ktrace.c:659 ktrstruct(ffff800021282a80,ffffffff823aff87,ffff800022cd9948,8) at ktrstruct+0x169 ktrwrite2 sys/kern/kern_ktrace.c:627 [inline] ktrstruct(ffff800021282a80,ffffffff823aff87,ffff800022cd9948,8) at ktrstruct+0x169 sys/kern/kern_ktrace.c:311 sys_socketpair(ffff800021282a80,ffff800022cd99b8,ffff800022cd9a00) at sys_socketpair+0x3ed sys/kern/uipc_syscalls.c:470 syscall(ffff800022cd9a80) at syscall+0x4a1 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff800022cd9a80) at syscall+0x4a1 sys/arch/amd64/amd64/trap.c:590 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x4d2f85b3fe0, count: -12 ddb{0}> show registers rdi 0xffff800021cc4000 rsi 0xc665 __ALIGN_SIZE+0xb665 rbp 0xffff800022cd9480 rbx 0x3 rdx 0xffff800021cc4000 rcx 0xc664 __ALIGN_SIZE+0xb664 rax 0xffffffff8234ff47 db_enter+0x17 r8 0xffffffff81554461 witness_checkorder+0x1061 r9 0x5 r10 0xe39bae327f3b8cef r11 0x5e9fcf25ac361127 r12 0 r13 0xfffffd8067153d60 r14 0 r15 0xfffffd8002ce9600 rip 0xffffffff8234ff48 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800022cd9470 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor.0) pid=74324 stat=onproc flags process=0 proc=4000001 pri=74, usrpri=74, nice=20 forw=0xffffffffffffffff, list=0xffff800021283260,0xffffffff82924bc0 process=0xffff800021236e78 user=0xffff800022cd4000, vmspace=0xfffffd807effab80 estcpu=36, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 68750 224863 59791 0 7 0 syz-executor.0 *68750 74324 59791 0 7 0x4000001 syz-executor.0 1734 459712 1 0 3 0x100083 ttyin getty 59791 159716 47130 0 3 0x82 nanoslp syz-executor.0 63237 77770 0 0 3 0x14200 bored sosplice 11414 165351 47130 0 3 0x82 nanoslp syz-executor.1 47130 123299 97139 0 3 0x82 thrsleep syz-fuzzer 47130 518544 97139 0 3 0x4000082 nanoslp syz-fuzzer 47130 343323 97139 0 3 0x4000082 thrsleep syz-fuzzer 47130 22729 97139 0 3 0x4000082 thrsleep syz-fuzzer 47130 258642 97139 0 3 0x4000082 thrsleep syz-fuzzer 47130 191965 97139 0 3 0x4000082 thrsleep syz-fuzzer 47130 882 97139 0 3 0x4000082 thrsleep syz-fuzzer 47130 262869 97139 0 3 0x4000082 kqread syz-fuzzer 97139 196216 78254 0 3 0x10008a sigsusp ksh 78254 162316 60208 0 3 0x92 select sshd 60208 343399 1 0 3 0x80 select sshd 44047 344578 23670 74 3 0x100092 bpf pflogd 23670 57057 1 0 3 0x80 netio pflogd 33620 334182 77151 73 3 0x100090 kqread syslogd 77151 227442 1 0 3 0x100082 netio syslogd 22562 103726 1 77 3 0x100090 poll dhclient 52374 273325 1 0 3 0x80 poll dhclient 9783 129992 0 0 3 0x14200 bored smr 25048 267710 0 0 2 0x14200 zerothread 28791 391546 0 0 3 0x14200 aiodoned aiodoned 22800 493977 0 0 3 0x14200 syncer update 45806 322502 0 0 3 0x14200 cleaner cleaner 89760 17805 0 0 3 0x14200 reaper reaper 9203 277767 0 0 3 0x14200 pgdaemon pagedaemon 8173 351764 0 0 3 0x14200 bored crynlk 59941 161270 0 0 3 0x14200 bored crypto 31887 448349 0 0 3 0x14200 bored viomb 20163 86456 0 0 3 0x40014200 acpi0 acpi0 67651 105636 0 0 3 0x40014200 idle1 51643 353690 0 0 3 0x14200 bored softnet 97023 343606 0 0 3 0x14200 bored systqmp 85561 29416 0 0 3 0x14200 bored systq 403 242232 0 0 3 0x40014200 bored softclock 99825 61355 0 0 3 0x40014200 idle0 1 425426 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 68750 (syz-executor.0) thread 0xffff800021282a80 (74324) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff8278ab98) #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+0x4a1 mi_syscall sys/sys/syscall_mi.h:102 [inline] #3 syscall+0x4a1 sys/arch/amd64/amd64/trap.c:590 #4 Xsyscall+0x128 exclusive rwlock fdlock r = 0 (0xfffffd807b049258) #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+0x4a1 mi_syscall sys/sys/syscall_mi.h:102 [inline] #2 syscall+0x4a1 sys/arch/amd64/amd64/trap.c:590 #3 Xsyscall+0x128 ddb{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 9502 6431K 7074K 78643K 12469 0 pcb 13 8K 8K 78643K 118 0 rtable 109 4K 5K 78643K 327 0 ifaddr 54 12K 12K 78643K 107 0 counters 44 34K 34K 78643K 66 0 ioctlops 0 0K 4K 78643K 1519 0 iov 0 0K 16K 78643K 84 0 mount 1 1K 1K 78643K 1 0 vnodes 1217 77K 77K 78643K 2026 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 1K 78643K 2 0 VM map 2 1K 1K 78643K 2 0 sem 12 0K 0K 78643K 125 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1697 195K 286K 78643K 12598 0 file desc 5 13K 25K 78643K 2040 0 sigio 0 0K 0K 78643K 5 0 proc 62 63K 83K 78643K 598 0 subproc 32 2K 2K 78643K 68 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 ip_moptions 0 0K 0K 78643K 95 0 in_multi 33 2K 2K 78643K 94 0 ether_multi 1 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 426 0 pfkey data 0 0K 1K 78643K 5 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 116 23K 23K 78643K 5229 0 UVM aobj 4 2K 2K 78643K 4 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 96 0 NDP 8 0K 0K 78643K 27 0 temp 99 3976K 4040K 78643K 35091 0 kqueue 3 4K 8K 78643K 66 0 SYN cache 2 8K 16K 78643K 3 0 ddb{0}> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle arp 64 10 0 4 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtpcb 120 63 0 61 1 0 1 1 0 8 0 rtentry 112 67 0 23 2 0 2 2 0 8 0 unpcb 120 351 0 339 1 0 1 1 0 8 0 syncache 296 16 0 16 3 2 1 1 0 8 1 tcpqe 32 1 0 1 1 1 0 1 0 8 0 tcpcb 736 485 0 475 18 13 5 11 0 8 4 inpcb 304 1150 0 1143 3 1 2 2 0 8 1 nd6 48 12 0 6 1 0 1 1 0 8 0 pkpcb 40 5 0 5 1 1 0 1 0 8 0 kcovpl 48 4 0 2 1 0 1 1 0 8 0 ppxss 1128 9 0 9 1 1 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 pfrktable 1344 3 0 1 1 0 1 1 0 8 0 pfstitem 24 44 0 8 1 0 1 1 0 8 0 pfstkey 112 44 0 8 2 0 2 2 0 8 0 pfstate 320 44 0 8 4 0 4 4 0 8 0 pfrule 1360 35 0 23 3 1 2 2 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 279 0 88 12 0 12 12 0 8 0 art_table 32 280 0 88 2 0 2 2 0 8 0 art_node 16 66 0 26 1 0 1 1 0 8 0 semupl 112 10 0 10 1 1 0 1 0 8 0 semapl 112 123 0 113 1 0 1 1 0 8 0 shmpl 112 1 0 0 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 4123 0 2711 89 0 89 89 0 8 0 ffsino 272 4123 0 2711 95 0 95 95 0 8 0 nchpl 144 6687 0 5093 60 0 60 60 0 8 0 uvmvnodes 72 4692 0 0 86 0 86 86 0 8 0 vnodes 224 4692 0 0 276 0 276 276 0 8 0 namei 1024 16182 0 16182 1 0 1 1 0 8 1 percpumem 16 44 0 11 1 0 1 1 0 8 0 pfiaddrpl 120 7 0 0 1 0 1 1 0 8 0 scsiplug 72 7 0 7 1 1 0 1 0 8 0 scxspl 216 19305 0 19305 9 8 1 8 0 8 1 plimitpl 152 31 0 23 1 0 1 1 0 8 0 sigapl 424 2251 0 2218 4 0 4 4 0 8 0 futexpl 56 13384 0 13384 1 0 1 1 0 8 1 knotepl 112 153 0 133 1 0 1 1 0 8 0 kqueuepl 168 770 0 768 1 0 1 1 0 8 0 pipepl 336 94 0 83 4 2 2 2 0 8 1 fdescpl 496 2234 0 2218 3 0 3 3 0 8 0 filepl 152 7322 0 7219 5 0 5 5 0 8 1 lockfpl 104 342 0 341 1 0 1 1 0 8 0 lockfspl 48 111 0 110 1 0 1 1 0 8 0 sessionpl 144 21 0 10 1 0 1 1 0 8 0 pgrppl 48 21 0 10 1 0 1 1 0 8 0 ucredpl 96 624 0 615 1 0 1 1 0 8 0 zombiepl 144 2218 0 2217 1 0 1 1 0 8 0 processpl 1080 2251 0 2217 3 0 3 3 0 8 0 procpl 672 4601 0 4559 5 1 4 5 0 8 0 sosppl 168 50 0 50 2 1 1 1 0 8 1 sockpl 432 1569 0 1548 4 1 3 4 0 8 0 mcl64k 65536 5 0 0 1 0 1 1 0 8 0 mcl12k 12288 6 0 0 1 0 1 1 0 8 0 mcl8k 8192 2 0 0 1 0 1 1 0 8 0 mcl4k 4096 5 0 0 1 0 1 1 0 8 0 mcl2k2 2112 4 0 0 1 0 1 1 0 8 0 mcl2k 2048 160 0 0 16 0 16 16 0 8 0 mtagpl 96 120 0 0 3 0 3 3 0 8 0 mbufpl 256 463 0 0 29 1 28 28 0 8 0 bufpl 280 9223 0 2962 448 0 448 448 0 8 0 anonpl 24 161490 0 157036 39 10 29 36 0 186 0 amapchunkpl 152 8105 0 7945 8 1 7 7 0 158 0 amappl16 200 6555 0 6414 15 6 9 13 0 8 1 amappl15 192 1 0 0 1 0 1 1 0 8 0 amappl14 184 1 0 0 1 0 1 1 0 8 0 amappl13 176 693 0 688 1 0 1 1 0 8 0 amappl12 168 34 0 25 1 0 1 1 0 8 0 amappl11 160 51 0 38 1 0 1 1 0 8 0 amappl10 152 361 0 356 1 0 1 1 0 8 0 amappl9 144 1261 0 1259 1 0 1 1 0 8 0 amappl8 136 382 0 336 2 0 2 2 0 8 0 amappl7 128 1067 0 1057 1 0 1 1 0 8 0 amappl6 120 429 0 414 1 0 1 1 0 8 0 amappl5 112 2166 0 2151 1 0 1 1 0 8 0 amappl4 104 561 0 536 1 0 1 1 0 8 0 amappl3 96 1005 0 994 1 0 1 1 0 8 0 amappl2 88 16785 0 16713 3 1 2 3 0 8 0 amappl1 80 68530 0 68055 28 17 11 21 0 8 0 amappl 88 4881 0 4830 2 0 2 2 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 3 0 0 1 0 1 1 0 8 0 uaddrrnd 24 2234 0 2218 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 2234 0 2218 1 0 1 1 0 8 0 vmmpekpl 168 15448 0 15422 2 0 2 2 0 8 0 vmmpepl 168 276864 0 275514 84 19 65 76 0 357 1 vmsppl 368 2233 0 2218 2 0 2 2 0 8 0 rwobjpl 56 58659 0 57820 24 11 13 19 0 8 1 pdppl 4096 4475 0 4436 57 16 41 45 0 8 2 pvpl 32 747309 0 739746 117 49 68 117 0 265 4 pmappl 232 2233 0 2218 2 1 1 2 0 8 0 extentpl 40 58 0 40 1 0 1 1 0 8 0 phpool 112 336 0 35 9 0 9 9 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(fffffd8067153d60,9,0) at witness_checkorder+0x108b rw_enter(fffffd8067153d50,1) at rw_enter+0xd4 rrw_enter(fffffd8067153d50,1) at rrw_enter+0x88 sys/kern/kern_rwlock.c:461 VOP_LOCK(fffffd806848e5e0,2001) at VOP_LOCK+0x4b sys/kern/vfs_vops.c:614 vn_lock(fffffd806848e5e0,2001) at vn_lock+0x6c sys/kern/vfs_vnops.c:575 vget(fffffd806848e5e0,2001) at vget+0x1c6 sys/kern/vfs_subr.c:671 ktrwriteraw(ffff800021282a80,fffffd806848e5e0,fffffd807f7b78a0,ffff800022cd9860,ffff800022cd9840) at ktrwriteraw+0x138 sys/kern/kern_ktrace.c:659 ktrstruct(ffff800021282a80,ffffffff823aff87,ffff800022cd9948,8) at ktrstruct+0x169 ktrwrite2 sys/kern/kern_ktrace.c:627 [inline] ktrstruct(ffff800021282a80,ffffffff823aff87,ffff800022cd9948,8) at ktrstruct+0x169 sys/kern/kern_ktrace.c:311 sys_socketpair(ffff800021282a80,ffff800022cd99b8,ffff800022cd9a00) at sys_socketpair+0x3ed sys/kern/uipc_syscalls.c:470 syscall(ffff800022cd9a80) at syscall+0x4a1 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff800022cd9a80) at syscall+0x4a1 sys/arch/amd64/amd64/trap.c:590 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x4d2f85b3fe0, count: -12 ddb{0}> machine ddbcpu 1 Stopped at x86_ipi_db+0x1a: addq $0x8,%rsp ddb{1}> trace x86_ipi_db(ffff800020d68ff0) 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: 0x7f7ffffe3210, count: -3