witness: lock order reversal: 1st 0xfffffd806f7d4630 fdlock (&newfdp->fd_fd.fd_lock) 2nd 0xfffffd80604830a0 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:440 witness_checkorder(fffffd80604830a0,9,0) at witness_checkorder+0x10f3 witness_debugger sys/kern/subr_witness.c:2502 [inline] witness_checkorder(fffffd80604830a0,9,0) at witness_checkorder+0x10f3 sys/kern/subr_witness.c:1105 rw_enter(fffffd8060483090,81) at rw_enter+0xd1 sys/kern/kern_rwlock.c:250 rrw_enter(fffffd8060483090,81) at rrw_enter+0x8b sys/kern/kern_rwlock.c:461 VOP_LOCK(fffffd805e870478,81) at VOP_LOCK+0x87 sys/kern/vfs_vops.c:534 vn_lock(fffffd805e870478,81) at vn_lock+0x84 sys/kern/vfs_vnops.c:579 uvn_get(fffffd805cfbf720,0,ffff8000256beb78,ffff8000256beb48,0,0,823e66781c1abfec,ffffffff81724400) at uvn_get+0x256 uvm_vnode_lock sys/uvm/uvm_vnode.c:1499 [inline] uvn_get(fffffd805cfbf720,0,ffff8000256beb78,ffff8000256beb48,0,0,823e66781c1abfec,ffffffff81724400) at uvn_get+0x256 sys/uvm/uvm_vnode.c:993 uvm_fault_lower(ffff8000256bece0,ffff8000256bed18,ffff8000256bec60,0) at uvm_fault_lower+0x302 sys/uvm/uvm_fault.c:1251 uvm_fault(fffffd80085965c0,20000000,0,2) at uvm_fault+0x240 sys/uvm/uvm_fault.c:638 kpageflttrap(ffff8000256bee70,20000040) at kpageflttrap+0x1fd sys/arch/amd64/amd64/trap.c:264 kerntrap(ffff8000256bee70) at kerntrap+0xef sys/arch/amd64/amd64/trap.c:318 alltraps_kern_meltdown() at alltraps_kern_meltdown+0x7b copyout() at copyout+0x53 syscall(ffff8000256bf0b0) at syscall+0x5a9 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff8000256bf0b0) at syscall+0x5a9 sys/arch/amd64/amd64/trap.c:587 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xc7cb1db3580, count: -15 ddb{0}> show registers rdi 0xffff800021274000 rsi 0x716f __ALIGN_SIZE+0x616f rbp 0xffff8000256be7f0 rbx 0x3 rdx 0xffff800021274000 rcx 0x716e __ALIGN_SIZE+0x616e rax 0xffffffff822f9b57 db_enter+0x17 r8 0xffffffff819e9edc witness_checkorder+0x10cc r9 0x5 r10 0x8e930f1d842502e0 r11 0x5f544696b2b22c5b r12 0xfffffd8002dc0900 r13 0 r14 0 r15 0 rip 0xffffffff822f9b58 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff8000256be7e0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor.0) pid=412348 stat=onproc flags process=10 proc=4000000 pri=32, usrpri=80, nice=20 forw=0xffffffffffffffff, list=0xffff800021213508,0xffff800021212558 process=0xffff8000ffffa188 user=0xffff8000256ba000, vmspace=0xfffffd80085965c0 estcpu=36, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 74504 171395 70495 32767 2 0x10 syz-executor.1 74504 334940 70495 32767 7 0x4000010 syz-executor.1 31808 347062 79999 32767 2 0x10 syz-executor.0 *31808 412348 79999 32767 7 0x4000010 syz-executor.0 13247 512739 0 0 3 0x14200 bored sosplice 70495 232161 55816 32767 3 0x90 nanoslp syz-executor.1 79999 358102 76791 32767 3 0x90 nanoslp syz-executor.0 55816 1628 76514 0 3 0x82 wait syz-executor.1 76791 268419 76514 0 3 0x82 wait syz-executor.0 76514 4941 49001 0 3 0x82 thrsleep syz-fuzzer 76514 218101 49001 0 3 0x4000082 thrsleep syz-fuzzer 76514 456996 49001 0 3 0x4000082 thrsleep syz-fuzzer 76514 312616 49001 0 3 0x4000082 thrsleep syz-fuzzer 76514 358258 49001 0 3 0x4000082 thrsleep syz-fuzzer 76514 452550 49001 0 3 0x4000082 kqread syz-fuzzer 76514 216787 49001 0 3 0x4000082 thrsleep syz-fuzzer 76514 146066 49001 0 3 0x4000082 thrsleep syz-fuzzer 49001 310111 20851 0 3 0x10008a sigsusp ksh 20851 462338 44652 0 3 0x9a select sshd 81520 459819 1 0 3 0x100083 ttyin getty 44652 469654 1 0 3 0x88 select sshd 71910 136649 93030 73 3 0x100090 kqread syslogd 93030 479770 1 0 3 0x100082 netio syslogd 20376 201988 1 0 3 0x100080 kqread resolvd 49845 312983 14127 77 3 0x100092 kqread dhcpleased 17441 250851 14127 77 3 0x100092 kqread dhcpleased 14127 278413 1 0 3 0x80 kqread dhcpleased 27167 263151 0 0 3 0x14200 bored smr 87670 168990 0 0 2 0x14200 zerothread 20536 280176 0 0 3 0x14200 aiodoned aiodoned 97924 23711 0 0 3 0x14200 syncer update 2236 509561 0 0 3 0x14200 cleaner cleaner 73720 496695 0 0 3 0x14200 reaper reaper 80007 131143 0 0 3 0x14200 pgdaemon pagedaemon 19932 44137 0 0 3 0x14200 bored crynlk 27898 169258 0 0 3 0x14200 bored crypto 3197 150002 0 0 3 0x14200 bored viomb 94150 280036 0 0 3 0x40014200 acpi0 acpi0 36362 415804 0 0 3 0x40014200 idle1 64531 48417 0 0 3 0x14200 bored softnet 52593 317855 0 0 3 0x14200 bored systqmp 20822 295656 0 0 3 0x14200 bored systq 69249 237881 0 0 3 0x40014200 bored softclock 37819 472192 0 0 3 0x40014200 idle0 1 99647 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 31808 (syz-executor.0) thread 0xffff800021212008 (412348) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff8297b608) #0 witness_lock+0x4b0 stacktrace_save sys/sys/stacktrace.h:36 [inline] #0 witness_lock+0x4b0 sys/kern/subr_witness.c:1182 #1 uvm_fault+0x224 sys/uvm/uvm_fault.c:637 #2 kpageflttrap+0x1fd sys/arch/amd64/amd64/trap.c:264 #3 kerntrap+0xef sys/arch/amd64/amd64/trap.c:318 #4 alltraps_kern_meltdown+0x7b #5 copyout+0x53 #6 syscall+0x5a9 mi_syscall sys/sys/syscall_mi.h:102 [inline] #6 syscall+0x5a9 sys/arch/amd64/amd64/trap.c:587 #7 Xsyscall+0x128 exclusive rwlock fdlock r = 0 (0xfffffd806f7d4630) #0 witness_lock+0x4b0 stacktrace_save sys/sys/stacktrace.h:36 [inline] #0 witness_lock+0x4b0 sys/kern/subr_witness.c:1182 #1 dopipe+0xd6 #2 syscall+0x5a9 mi_syscall sys/sys/syscall_mi.h:102 [inline] #2 syscall+0x5a9 sys/arch/amd64/amd64/trap.c:587 #3 Xsyscall+0x128 ddb{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 10118 6407K 6433K 78643K 11208 0 pcb 13 8K 8K 78643K 13 0 rtable 106 3K 3K 78643K 172 0 ifaddr 39 10K 10K 78643K 39 0 counters 44 34K 34K 78643K 44 0 ioctlops 0 0K 2K 78643K 55 0 iov 0 0K 16K 78643K 45 0 mount 1 1K 1K 78643K 1 0 log 0 0K 0K 78643K 5 0 vnodes 1216 76K 76K 78643K 1225 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 5K 78643K 4 0 VM map 2 1K 1K 78643K 2 0 sem 12 0K 0K 78643K 3012 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1697 195K 286K 78643K 12598 0 file desc 8 25K 33K 78643K 27643 0 sigio 0 0K 0K 78643K 2 0 proc 56 74K 99K 78643K 294 0 subproc 34 2K 2K 78643K 34 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 ip_moptions 0 0K 0K 78643K 13 0 in_multi 33 2K 2K 78643K 33 0 ether_multi 1 0K 0K 78643K 1 0 ISOFS mount 1 32K 32K 78643K 1 0 MSDOSFS mount 1 16K 16K 78643K 1 0 ttys 55 254K 254K 78643K 55 0 exec 0 0K 2K 78643K 371 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 392 47K 48K 78643K 333173 0 UVM aobj 7 2K 2K 78643K 39 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 NDP 5 0K 0K 78643K 9 0 temp 101 4209K 4273K 78643K 57409 0 kqueue 10 14K 18K 78643K 36 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 25 0 22 1 0 1 1 0 8 0 rtentry 112 45 0 1 2 0 2 2 0 8 0 unpcb 120 1984 0 1970 1 0 1 1 0 8 0 syncache 296 4 0 4 1 1 0 1 0 8 0 tcpqe 32 1449 0 1449 6 6 0 5 0 8 0 tcpcb 736 32 0 28 1 0 1 1 0 8 0 arp 120 6 0 0 1 0 1 1 0 8 0 inpcb 304 5917 0 5910 3 2 1 2 0 8 0 nd6 48 6 0 0 1 0 1 1 0 8 0 kcovpl 48 2 0 0 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 189 0 0 12 0 12 12 0 8 0 art_table 32 190 0 0 2 0 2 2 0 8 0 art_node 16 44 0 4 1 0 1 1 0 8 0 sysvmsgpl 40 2 0 2 1 1 0 1 0 8 0 semapl 112 3010 0 3000 1 0 1 1 0 8 0 shmpl 112 36 0 32 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 37194 0 35790 88 0 88 88 0 8 0 ffsino 272 37194 0 35790 95 1 94 94 0 8 0 nchpl 144 85288 0 83674 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 158932 0 158932 2 1 1 1 0 8 1 percpumem 16 34 0 0 1 0 1 1 0 8 0 scxspl 216 197801 0 197801 9 8 1 8 0 8 1 plimitpl 152 18 0 8 1 0 1 1 0 8 0 sigapl 424 27867 0 27831 6 1 5 5 0 8 1 futexpl 56 192221 0 192221 1 0 1 1 0 8 1 knotepl 112 58 0 0 2 0 2 2 0 8 0 kqueuepl 216 28414 0 28398 6 4 2 2 0 8 1 pipepl 336 2025 0 2013 13 12 1 2 0 8 0 fdescpl 496 27850 0 27831 3 0 3 3 0 8 0 filepl 152 98472 0 98357 7 2 5 7 0 8 0 lockfpl 104 1282 0 1280 1 0 1 1 0 8 0 lockfspl 48 632 0 630 1 0 1 1 0 8 0 sessionpl 144 17 0 7 1 0 1 1 0 8 0 pgrppl 48 21 0 11 1 0 1 1 0 8 0 ucredpl 96 328 0 316 1 0 1 1 0 8 0 zombiepl 144 27831 0 27831 2 1 1 1 0 8 1 processpl 1072 27867 0 27831 3 0 3 3 0 8 0 procpl 672 57435 0 57390 15 10 5 5 0 8 1 sosppl 168 1 0 1 1 1 0 1 0 8 0 sockpl 480 7953 0 7929 15 11 4 5 0 8 1 mcl64k 65536 9 0 0 2 0 2 2 0 8 0 mcl16k 16384 17 0 0 3 0 3 3 0 8 0 mcl12k 12288 25 0 0 2 0 2 2 0 8 0 mcl9k 9216 6 0 0 1 0 1 1 0 8 0 mcl8k 8192 12 0 0 2 0 2 2 0 8 0 mcl4k 4096 25 0 0 3 0 3 3 0 8 0 mcl2k2 2112 5 0 0 1 0 1 1 0 8 0 mcl2k 2048 865 0 0 106 2 104 106 0 8 2 mtagpl 96 3 0 0 1 0 1 1 0 8 0 mbufpl 256 936 0 0 59 2 57 59 0 8 0 bufpl 280 33533 0 27209 452 0 452 452 0 8 0 anonpl 24 6919088 0 6866493 343 2 341 342 0 186 0 amapchunkpl 152 770046 0 768020 84 3 81 83 0 158 0 amappl16 200 44838 0 43262 85 2 83 84 0 8 0 amappl15 192 68 0 63 1 0 1 1 0 8 0 amappl14 184 1 0 0 1 0 1 1 0 8 0 amappl13 176 35 0 34 1 0 1 1 0 8 0 amappl12 168 12 0 10 1 0 1 1 0 8 0 amappl11 160 13719 0 13700 1 0 1 1 0 8 0 amappl10 152 4 0 2 1 0 1 1 0 8 0 amappl9 144 14309 0 14305 1 0 1 1 0 8 0 amappl8 136 359 0 312 2 0 2 2 0 8 0 amappl7 128 51 0 43 1 0 1 1 0 8 0 amappl6 120 14015 0 14005 1 0 1 1 0 8 0 amappl5 112 27848 0 27827 1 0 1 1 0 8 0 amappl4 104 14573 0 14546 1 0 1 1 0 8 0 amappl3 96 5218 0 5202 1 0 1 1 0 8 0 amappl2 88 401 0 364 3 2 1 2 0 8 0 amappl1 80 460027 0 459581 14 4 10 12 0 8 0 amappl 88 324938 0 324607 8 0 8 8 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 38 0 32 1 0 1 1 0 8 0 uaddrrnd 24 27850 0 27831 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 27850 0 27831 1 0 1 1 0 8 0 vmmpekpl 168 118875 0 118849 2 0 2 2 0 8 0 vmmpepl 168 3178569 0 3175317 197 54 143 191 0 357 1 vmsppl 368 27849 0 27831 2 0 2 2 0 8 0 rwobjpl 56 515663 0 513196 44 8 36 36 0 8 1 pdppl 4096 55708 0 55662 73 27 46 50 0 8 0 pvpl 32 16134230 0 16077971 493 9 484 492 0 265 0 pmappl 224 27849 0 27831 2 0 2 2 0 8 0 extentpl 40 58 0 40 1 0 1 1 0 8 0 phpool 112 468 0 47 13 0 13 13 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:440 witness_checkorder(fffffd80604830a0,9,0) at witness_checkorder+0x10f3 witness_debugger sys/kern/subr_witness.c:2502 [inline] witness_checkorder(fffffd80604830a0,9,0) at witness_checkorder+0x10f3 sys/kern/subr_witness.c:1105 rw_enter(fffffd8060483090,81) at rw_enter+0xd1 sys/kern/kern_rwlock.c:250 rrw_enter(fffffd8060483090,81) at rrw_enter+0x8b sys/kern/kern_rwlock.c:461 VOP_LOCK(fffffd805e870478,81) at VOP_LOCK+0x87 sys/kern/vfs_vops.c:534 vn_lock(fffffd805e870478,81) at vn_lock+0x84 sys/kern/vfs_vnops.c:579 uvn_get(fffffd805cfbf720,0,ffff8000256beb78,ffff8000256beb48,0,0,823e66781c1abfec,ffffffff81724400) at uvn_get+0x256 uvm_vnode_lock sys/uvm/uvm_vnode.c:1499 [inline] uvn_get(fffffd805cfbf720,0,ffff8000256beb78,ffff8000256beb48,0,0,823e66781c1abfec,ffffffff81724400) at uvn_get+0x256 sys/uvm/uvm_vnode.c:993 uvm_fault_lower(ffff8000256bece0,ffff8000256bed18,ffff8000256bec60,0) at uvm_fault_lower+0x302 sys/uvm/uvm_fault.c:1251 uvm_fault(fffffd80085965c0,20000000,0,2) at uvm_fault+0x240 sys/uvm/uvm_fault.c:638 kpageflttrap(ffff8000256bee70,20000040) at kpageflttrap+0x1fd sys/arch/amd64/amd64/trap.c:264 kerntrap(ffff8000256bee70) at kerntrap+0xef sys/arch/amd64/amd64/trap.c:318 alltraps_kern_meltdown() at alltraps_kern_meltdown+0x7b copyout() at copyout+0x53 syscall(ffff8000256bf0b0) at syscall+0x5a9 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff8000256bf0b0) at syscall+0x5a9 sys/arch/amd64/amd64/trap.c:587 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0xc7cb1db3580, count: -15 ddb{0}> machine ddbcpu 1 Stopped at x86_ipi_db+0x1a: addq $0x8,%rsp ddb{1}> trace x86_ipi_db(ffff800020d38ff0) 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 __mp_lock(ffffffff8297b400) at __mp_lock+0x129 __mp_lock_spin sys/kern/kern_lock.c:116 [inline] __mp_lock(ffffffff8297b400) at __mp_lock+0x129 sys/kern/kern_lock.c:147 end trace frame: 0x0, count: -4