dOjPg/D{uCF(vIb;V_[HaD\TIčvp2;'>ޫo1^`WpM%OۥUFv>/ ̣ږ!B-wR(>,&EڎӠS3^'`PAPɲ|},t8"!8wwitness: lock order reversal: 1st 0xffff800020b8d5a8 &pr->ps_mtx (&pr->ps_mtx) 2nd 0xffffffff82384c80 &sched_lock (&sched_lock) lock order "&sched_lock"(sched_lock) -> "&pr->ps_mtx"(mutex) first seen at: #0 witness_checkorder+0x6a7 sys/kern/subr_witness.c:877 #1 mtx_enter+0x3a sys/kern/kern_lock.c:265 #2 tuagg+0x32 sys/kern/kern_resource.c:360 #3 mi_switch+0x1c7 x86_atomic_clearbits_u32 sys/arch/amd64/compile/SYZKALLER/obj/machine/atomic.h:298 [inline] #3 mi_switch+0x1c7 sys/kern/sched_bsd.c:392 #4 sleep_finish+0x110 sys/kern/kern_synch.c:303 #5 msleep+0x1af sleep_finish_timeout sys/kern/kern_synch.c:327 [inline] #5 msleep+0x1af sleep_finish_all sys/kern/kern_synch.c:157 [inline] #5 msleep+0x1af sys/kern/kern_synch.c:220 #6 scsi_xs_sync+0x14f sys/scsi/scsi_base.c:1339 #7 scsi_start+0x86 sys/scsi/scsi_base.c:938 #8 sdopen+0x22b sys/scsi/sd.c:400 #9 spec_open+0x41c sys/kern/spec_vnops.c:158 #10 VOP_OPEN+0x6a sys/kern/vfs_vops.c:153 #11 sr_meta_native_bootprobe+0xd3 sys/dev/softraid.c:1038 #12 sr_boot_assembly+0x1aa sys/dev/softraid.c:1202 #13 sr_attach+0x183 sys/dev/softraid.c:1822 #14 config_attach+0x347 sys/kern/subr_autoconf.c:404 #15 main+0x6de sys/kern/init_main.c:483 #16 longmode_hi+0x95 lock order "&pr->ps_mtx"(mutex) -> "&sched_lock"(sched_lock) first seen at: #0 witness_checkorder+0x6a7 sys/kern/subr_witness.c:877 #1 __mp_lock+0xa1 #2 schedclock+0x99 sys/kern/sched_bsd.c:547 #3 hardclock+0x1d8 sys/kern/kern_clock.c:174 #4 lapic_clockintr+0x44 sys/arch/amd64/amd64/lapic.c:425 #5 Xresume_lapic_ltimer+0x26 #6 __sanitizer_cov_trace_pc #7 exit1+0x6e5 sys/kern/kern_exit.c:292 #8 single_thread_check+0x144 sys/kern/kern_sig.c:1938 #9 userret+0x347 sys/kern/kern_sig.c:1907 #10 syscall+0x614 mi_syscall_return sys/sys/syscall_mi.h:122 [inline] #10 syscall+0x614 sys/arch/amd64/amd64/trap.c:596 #11 Xsyscall+0x128 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(ffffffff82384c80,9,0) at witness_checkorder+0xffc witness_debugger sys/kern/subr_witness.c:2504 [inline] witness_checkorder(ffffffff82384c80,9,0) at witness_checkorder+0xffc sys/kern/subr_witness.c:1084 __mp_lock(ffffffff82384a78) at __mp_lock+0xa1 schedclock(ffff800020b39788) at schedclock+0x99 sys/kern/sched_bsd.c:547 hardclock(ffff800020c0ac00) at hardclock+0x1d8 sys/kern/kern_clock.c:174 lapic_clockintr(0,0) at lapic_clockintr+0x44 sys/arch/amd64/amd64/lapic.c:425 Xresume_lapic_ltimer(9,0,ffff800020b8d4e8,0,0,ffff800020b39788) at Xresume_lapic_ltimer+0x26 __sanitizer_cov_trace_pc() at __sanitizer_cov_trace_pc exit1(ffff800020b39788,0,3) at exit1+0x6e5 sys/kern/kern_exit.c:292 single_thread_check(ffff800020b39788,0) at single_thread_check+0x144 sys/kern/kern_sig.c:1938 userret(ffff800020b39788) at userret+0x347 sys/kern/kern_sig.c:1907 syscall(ffff800020c0af50) at syscall+0x614 mi_syscall_return sys/sys/syscall_mi.h:122 [inline] syscall(ffff800020c0af50) at syscall+0x614 sys/arch/amd64/amd64/trap.c:596 Xsyscall(6,0,c5,57,21581d48018,21581d48010) at Xsyscall+0x128 end of kernel end trace frame: 0x21806da9de0, count: -13 ddb{0}> show registers rdi 0x3 rsi 0xffffffff821fc9e0 __sancov_gen_cov_switch_values.122 rbp 0xffff800020c0aa00 rbx 0x3 rdx 0xffffffff821baff0 cpu_info_full_primary+0x1ff0 rcx 0x3 rax 0xffffffff821baff0 cpu_info_full_primary+0x1ff0 r8 0xffffffff818c8c95 witness_checkorder+0xfd5 r9 0x5 r10 0x3 r11 0x6334f4819af285b3 r12 0xfffffd8002661340 r13 0xc r14 0xffffffff823389e0 w_lodata+0x4d790 r15 0xffffffff823425f0 w_lodata+0x573a0 rip 0xffffffff81a42468 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020c0a9f0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor.0) pid=464987 stat=dead flags process=1000 proc=4082000 pri=52, usrpri=52, nice=20 forw=0xffffffffffffffff, list=0xffffffffffffffff,0xffffffffffffffff process=0xffff800020b8d4e8 user=0xffff800020c06000, vmspace=0xfffffd807effd708 estcpu=36, cpticks=1, pctcpu=0.0 user=0, sys=1, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 83338 360154 25014 0 3 0x3000 suspend syz-executor.0 83338 490779 25014 0 7 0x4081080 syz-executor.0 87546 467464 5756 0 3 0x2 biowait syz-executor.1 25014 186746 5756 0 3 0x82 nanosleep syz-executor.0 5756 198250 42545 0 3 0x82 thrsleep syz-fuzzer 5756 446455 42545 0 3 0x4000082 nanosleep syz-fuzzer 5756 264159 42545 0 3 0x4000082 thrsleep syz-fuzzer 5756 209166 42545 0 3 0x4000082 thrsleep syz-fuzzer 5756 439966 42545 0 3 0x4000082 thrsleep syz-fuzzer 5756 41362 42545 0 3 0x4000082 kqread syz-fuzzer 5756 206485 42545 0 3 0x4000082 thrsleep syz-fuzzer 5756 61775 42545 0 3 0x4000082 thrsleep syz-fuzzer 5756 341141 42545 0 3 0x4000082 thrsleep syz-fuzzer 5756 483363 42545 0 3 0x4000082 nanosleep syz-fuzzer 42545 318423 40092 0 3 0x10008a pause ksh 40092 299195 52550 0 3 0x92 select sshd 67983 325084 1 0 3 0x100083 ttyin getty 52550 143419 1 0 3 0x80 select sshd 96898 139490 94051 74 3 0x100092 bpf pflogd 94051 115224 1 0 3 0x80 netio pflogd 44367 374164 93898 73 2 0x100090 syslogd 93898 317870 1 0 3 0x100082 netio syslogd 19973 406103 1 77 3 0x100090 poll dhclient 35675 138065 1 0 3 0x80 poll dhclient 25725 8438 0 0 3 0x14200 pgzero zerothread 76279 173783 0 0 3 0x14200 aiodoned aiodoned 93043 478390 0 0 3 0x14200 syncer update 50042 496940 0 0 3 0x14200 cleaner cleaner 56388 182706 0 0 3 0x14200 reaper reaper 31542 88140 0 0 3 0x14200 pgdaemon pagedaemon 46595 416370 0 0 3 0x14200 bored crynlk 65719 55892 0 0 3 0x14200 bored crypto 45927 431959 0 0 3 0x40014200 acpi0 acpi0 24837 93301 0 0 3 0x40014200 idle1 38135 442030 0 0 3 0x14200 bored softnet 55434 449056 0 0 3 0x14200 bored systqmp 18309 70945 0 0 3 0x14200 bored systq 68625 284607 0 0 3 0x40014200 bored softclock 86534 244539 0 0 3 0x40014200 idle0 24765 371048 0 0 3 0x14200 bored smr 1 23325 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks CPU 0: exclusive mutex &pr->ps_mtx r = 0 (0xffff800020b8d5a8) #0 witness_lock+0x52e sys/kern/subr_witness.c:1161 #1 mtx_enter_try+0x102 #2 mtx_enter+0x4b sys/kern/kern_lock.c:266 #3 tuagg+0x32 sys/kern/kern_resource.c:360 #4 exit1+0x6e5 sys/kern/kern_exit.c:292 #5 single_thread_check+0x144 sys/kern/kern_sig.c:1938 #6 userret+0x347 sys/kern/kern_sig.c:1907 #7 syscall+0x614 mi_syscall_return sys/sys/syscall_mi.h:122 [inline] #7 syscall+0x614 sys/arch/amd64/amd64/trap.c:596 #8 Xsyscall+0x128 Process 87546 (syz-executor.1) thread 0xffff800020b39530 (467464) exclusive rrwlock inode r = 0 (0xfffffd80671b05f8) #0 witness_lock+0x52e sys/kern/subr_witness.c:1161 #1 rw_enter+0x46d sys/kern/kern_rwlock.c:306 #2 rrw_enter+0x4f sys/kern/kern_rwlock.c:435 #3 ufs_ihashins+0x45 sys/ufs/ufs/ufs_ihash.c:140 #4 ffs_vget+0x133 sys/ufs/ffs/ffs_vfsops.c:1352 #5 ffs_inode_alloc+0x1cf sys/ufs/ffs/ffs_alloc.c:392 #6 ufs_mkdir+0xf4 sys/ufs/ufs/ufs_vnops.c:1164 #7 VOP_MKDIR+0x6a sys/kern/vfs_vops.c:449 #8 domkdirat+0x121 sys/kern/vfs_syscalls.c:2974 #9 syscall+0x552 mi_syscall sys/sys/syscall_mi.h:99 [inline] #9 syscall+0x552 sys/arch/amd64/amd64/trap.c:574 #10 Xsyscall+0x128 exclusive rrwlock inode r = 0 (0xfffffd8069a104e0) #0 witness_lock+0x52e sys/kern/subr_witness.c:1161 #1 rw_enter+0x46d sys/kern/kern_rwlock.c:306 #2 rrw_enter+0x4f sys/kern/kern_rwlock.c:435 #3 VOP_LOCK+0x4b sys/kern/vfs_vops.c:602 #4 vn_lock+0x6e sys/kern/vfs_vnops.c:549 #5 vfs_lookup+0xe9 sys/kern/vfs_lookup.c:422 #6 namei+0x61c sys/kern/vfs_lookup.c:252 #7 domkdirat+0x75 sys/kern/vfs_syscalls.c:2959 #8 syscall+0x552 mi_syscall sys/sys/syscall_mi.h:99 [inline] #8 syscall+0x552 sys/arch/amd64/amd64/trap.c:574 #9 Xsyscall+0x128 ddb{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim devbuf 9473 6391K 6650K 78643K 10700 0 0 pcb 25 9K 10K 78643K 85 0 0 rtable 108 4K 4K 78643K 219 0 0 ifaddr 43 11K 11K 78643K 53 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 4K 78643K 1472 0 0 iov 0 0K 12K 78643K 10 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1214 76K 76K 78643K 1263 0 0 UFS quota 1 32K 32K 78643K 1 0 0 UFS mount 5 36K 36K 78643K 5 0 0 shm 2 1K 5K 78643K 4 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 6 0K 0K 78643K 6 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12628 0 0 file desc 5 13K 25K 78643K 97 0 0 proc 53 50K 71K 78643K 363 0 0 subproc 32 2K 2K 78643K 34 0 0 NFS srvsock 1 0K 0K 78643K 1 0 0 NFS daemon 1 16K 16K 78643K 1 0 0 ip_moptions 0 0K 0K 78643K 12 0 0 in_multi 33 2K 2K 78643K 37 0 0 ether_multi 1 0K 0K 78643K 1 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 48 212K 212K 78643K 48 0 0 exec 0 0K 1K 78643K 215 0 0 pagedep 1 8K 8K 78643K 1 0 0 inodedep 1 32K 32K 78643K 1 0 0 newblk 1 0K 0K 78643K 1 0 0 VM swap 7 26K 26K 78643K 7 0 0 UVM amap 85 20K 21K 78643K 1217 0 0 UVM aobj 4 2K 2K 78643K 4 0 0 memdesc 1 4K 4K 78643K 1 0 0 crypto data 1 1K 1K 78643K 1 0 0 ip6_options 0 0K 0K 78643K 8 0 0 NDP 7 0K 0K 78643K 13 0 0 temp 98 2721K 2785K 78643K 3508 0 0 SYN cache 2 16K 16K 78643K 2 0 0 ddb{0}> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle arp 64 6 0 0 1 0 1 1 0 8 0 inpcbpl 280 83 0 76 1 0 1 1 0 8 0 plimitpl 152 17 0 9 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtentry 112 45 0 1 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpcb 544 30 0 26 1 0 1 1 0 8 0 nd6 48 6 0 0 1 0 1 1 0 8 0 ppxss 1128 2 0 2 1 0 1 1 0 8 1 pfosfp 40 846 0 423 5 0 5 5 0 8 0 pfosfpen 112 1428 0 714 21 0 21 21 0 8 0 pfstitem 24 14 0 2 1 0 1 1 0 8 0 pfstkey 112 14 0 2 1 0 1 1 0 8 0 pfstate 328 14 0 2 1 0 1 1 0 8 0 pfrule 1360 21 0 16 2 1 1 2 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 188 0 0 12 0 12 12 0 8 0 art_table 32 189 0 0 2 0 2 2 0 8 0 art_node 16 44 0 4 1 0 1 1 0 8 0 semapl 112 4 0 0 1 0 1 1 0 8 0 shmpl 112 2 0 0 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 1532 0 106 47 0 47 47 0 8 0 ffsino 272 1532 0 106 96 0 96 96 0 8 0 nchpl 144 1853 0 213 61 0 61 61 0 8 0 uvmvnodes 72 1612 0 0 30 0 30 30 0 8 0 vnodes 200 1612 0 0 85 0 85 85 0 8 0 namei 1024 4810 0 4809 2 1 1 1 0 8 0 percpumem 16 30 0 0 1 0 1 1 0 8 0 scxspl 192 4850 0 4849 9 7 2 6 0 8 1 sigapl 432 297 0 282 3 0 3 3 0 8 1 futexpl 56 774 0 773 1 0 1 1 0 8 0 knotepl 112 60 0 41 1 0 1 1 0 8 0 kqueuepl 104 14 0 12 1 0 1 1 0 8 0 pipepl 112 174 0 155 2 1 1 1 0 8 0 fdescpl 488 298 0 282 3 0 3 3 0 8 0 filepl 152 1452 0 1352 5 0 5 5 0 8 1 lockfpl 104 33 0 33 2 1 1 1 0 8 1 lockfspl 48 10 0 10 2 1 1 1 0 8 1 sessionpl 112 18 0 7 1 0 1 1 0 8 0 pgrppl 48 18 0 7 1 0 1 1 0 8 0 ucredpl 96 110 0 101 1 0 1 1 0 8 0 zombiepl 144 283 0 282 2 1 1 1 0 8 0 processpl 888 313 0 282 4 0 4 4 0 8 0 procpl 600 471 0 429 4 0 4 4 0 8 0 sockpl 384 149 0 130 3 0 3 3 0 8 1 mcl12k 12288 1 0 0 1 0 1 1 0 8 0 mcl9k 9216 1 0 0 1 0 1 1 0 8 0 mcl8k 8192 2 0 0 1 0 1 1 0 8 0 mcl4k 4096 3 0 0 1 0 1 1 0 8 0 mcl2k 2048 112 0 0 14 0 14 14 0 8 0 mtagpl 80 2 0 0 1 0 1 1 0 8 0 mbufpl 256 168 0 0 9 0 9 9 0 8 0 bufpl 256 5899 0 1188 295 0 295 295 0 8 0 anonpl 16 35795 0 26390 41 2 39 39 0 125 0 amapchunkpl 152 1418 0 1329 6 0 6 6 0 158 2 amappl16 192 879 0 379 26 0 26 26 0 8 1 amappl14 176 45 0 41 2 1 1 1 0 8 0 amappl13 168 1 0 1 1 1 0 1 0 8 0 amappl12 160 7 0 6 1 0 1 1 0 8 0 amappl11 152 103 0 82 2 0 2 2 0 8 1 amappl10 144 70 0 67 1 0 1 1 0 8 0 amappl9 136 621 0 616 1 0 1 1 0 8 0 amappl8 128 162 0 146 1 0 1 1 0 8 0 amappl7 120 35 0 31 1 0 1 1 0 8 0 amappl6 112 91 0 84 1 0 1 1 0 8 0 amappl5 104 120 0 107 1 0 1 1 0 8 0 amappl4 96 470 0 446 1 0 1 1 0 8 0 amappl3 88 189 0 177 1 0 1 1 0 8 0 amappl2 80 1476 0 1404 3 1 2 3 0 8 0 amappl1 72 16124 0 15679 25 15 10 20 0 8 0 amappl 80 722 0 686 1 0 1 1 0 84 0 dma4096 4096 1 0 1 1 1 0 1 0 8 0 dma256 256 6 0 6 1 1 0 1 0 8 0 dma64 64 259 0 259 1 1 0 1 0 8 0 dma32 32 7 0 7 1 1 0 1 0 8 0 dma16 16 17 0 17 1 1 0 1 0 8 0 aobjpl 64 3 0 0 1 0 1 1 0 8 0 uaddrrnd 24 298 0 282 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 298 0 282 1 0 1 1 0 8 0 vmmpekpl 168 6459 0 6430 2 0 2 2 0 8 0 vmmpepl 168 40622 0 39073 100 14 86 86 0 357 18 vmsppl 360 297 0 282 2 0 2 2 0 8 0 pdppl 4096 604 0 564 6 0 6 6 0 8 0 pvpl 32 135325 0 122760 113 5 108 108 0 265 5 pmappl 232 297 0 282 2 0 2 2 0 8 1 extentpl 40 41 0 26 1 0 1 1 0 8 0 phpool 112 445 0 4 13 0 13 13 0 8 0