login: witness: exclusive lock of (rwlock) vmmaplk while share locked panic: share->excl Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND * 2641 72623 32767 0x10 0x4000000 0K syz-executor.4 63987 68136 0 0x2 0x4000000 1 syz-fuzzer db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:440 panic(ffffffff8257690f) at panic+0x177 sys/kern/subr_prf.c:202 witness_checkorder(fffffd806b7f3e90,9,0) at witness_checkorder+0x11bd witness_debugger sys/kern/subr_witness.c:2505 [inline] witness_checkorder(fffffd806b7f3e90,9,0) at witness_checkorder+0x11bd sys/kern/subr_witness.c:772 rw_enter(fffffd806b7f3e80,21) at rw_enter+0xd1 sys/kern/kern_rwlock.c:250 vm_map_lock_ln(fffffd806b7f3e78,48b,ffff800027ace000) at vm_map_lock_ln+0xda sys/uvm/uvm_map.c:5466 uvm_map_extract(fffffd806b7f3e78,7f7ffffc0000,1000,ffff800023065300,0) at uvm_map_extract+0x173 sys/uvm/uvm_map.c:4530 uvm_io(fffffd806b7f3e78,ffff800023065398,0) at uvm_io+0x127 sys/uvm/uvm_io.c:100 sysctl_proc_args(ffff8000230657e8,2,20000080,ffff800023065818,ffff8000256a3a50) at sysctl_proc_args+0x24b sys/kern/kern_sysctl.c:1790 kern_sysctl(ffff8000230657e4,3,20000080,ffff800023065818,0,0,e1a50077131676f) at kern_sysctl+0xfd sys/kern/kern_sysctl.c:449 sys_sysctl(ffff8000256a3a50,ffff800023065888,ffff8000230658e0) at sys_sysctl+0x209 sys/kern/kern_sysctl.c:249 syscall(ffff800023065950) at syscall+0x489 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff800023065950) at syscall+0x489 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x496f1dfcc40, count: 3 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: share->excl ddb{0}> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:440 panic(ffffffff8257690f) at panic+0x177 sys/kern/subr_prf.c:202 witness_checkorder(fffffd806b7f3e90,9,0) at witness_checkorder+0x11bd witness_debugger sys/kern/subr_witness.c:2505 [inline] witness_checkorder(fffffd806b7f3e90,9,0) at witness_checkorder+0x11bd sys/kern/subr_witness.c:772 rw_enter(fffffd806b7f3e80,21) at rw_enter+0xd1 sys/kern/kern_rwlock.c:250 vm_map_lock_ln(fffffd806b7f3e78,48b,ffff800027ace000) at vm_map_lock_ln+0xda sys/uvm/uvm_map.c:5466 uvm_map_extract(fffffd806b7f3e78,7f7ffffc0000,1000,ffff800023065300,0) at uvm_map_extract+0x173 sys/uvm/uvm_map.c:4530 uvm_io(fffffd806b7f3e78,ffff800023065398,0) at uvm_io+0x127 sys/uvm/uvm_io.c:100 sysctl_proc_args(ffff8000230657e8,2,20000080,ffff800023065818,ffff8000256a3a50) at sysctl_proc_args+0x24b sys/kern/kern_sysctl.c:1790 kern_sysctl(ffff8000230657e4,3,20000080,ffff800023065818,0,0,e1a50077131676f) at kern_sysctl+0xfd sys/kern/kern_sysctl.c:449 sys_sysctl(ffff8000256a3a50,ffff800023065888,ffff8000230658e0) at sys_sysctl+0x209 sys/kern/kern_sysctl.c:249 syscall(ffff800023065950) at syscall+0x489 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff800023065950) at syscall+0x489 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x496f1dfcc40, count: -12 ddb{0}> show registers rdi 0 rsi 0x1 rbp 0xffff800023064f60 rbx 0xffffffff829bbbff cpu_info_full_primary+0x2bff rdx 0xffff800000bcb840 rcx 0 rax 0xffff8000256a3a50 r8 0x101010101010101 r9 0x8080808080808080 r10 0x97b5c8df8ea514ef r11 0x958961041fa72834 r12 0xffffffff829bba00 cpu_info_full_primary+0x2a00 r13 0 r14 0 r15 0x1 rip 0xffffffff8138d658 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800023064f50 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor.4) pid=2641 stat=onproc flags process=10 proc=4000000 pri=32, usrpri=66, nice=20 forw=0xffffffffffffffff, list=0xffff8000256a3510,0xffffffff82b3d400 process=0xffff80002952b628 user=0xffff800023060000, vmspace=0xfffffd806b7f3e78 estcpu=32, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 72623 148125 36536 32767 2 0x10 syz-executor.4 *72623 2641 36536 32767 7 0x4000010 syz-executor.4 70186 25504 42799 32767 2 0x10 syz-executor.7 70186 498378 42799 32767 3 0x4000090 fsleep syz-executor.7 42799 168682 5244 32767 3 0x90 nanoslp syz-executor.7 85213 397002 41607 32767 3 0x90 piperd syz-executor.5 5244 457322 68136 0 3 0x82 wait syz-executor.7 41607 59473 68136 0 3 0x82 wait syz-executor.5 36536 167905 70676 32767 3 0x90 nanoslp syz-executor.4 43299 317086 97691 32767 3 0x90 piperd syz-executor.1 70676 383064 68136 0 3 0x82 wait syz-executor.4 30977 192902 94299 32767 3 0x90 piperd syz-executor.0 97691 120476 68136 0 3 0x82 wait syz-executor.1 94299 59720 68136 0 3 0x82 wait syz-executor.0 68136 87102 95697 0 3 0x82 thrsleep syz-fuzzer 68136 56070 95697 0 3 0x4000082 nanoslp syz-fuzzer 68136 256843 95697 0 3 0x4000082 thrsleep syz-fuzzer 68136 64129 95697 0 3 0x4000082 thrsleep syz-fuzzer 68136 205479 95697 0 2 0x4000002 syz-fuzzer 68136 421343 95697 0 3 0x4000082 kqread syz-fuzzer 68136 461555 95697 0 3 0x4000082 thrsleep syz-fuzzer 68136 63987 95697 0 7 0x4000002 syz-fuzzer 68136 5807 95697 0 3 0x4000082 thrsleep syz-fuzzer 95697 19480 69250 0 3 0x10008a sigsusp ksh 69250 276380 97175 0 3 0x9a kqread sshd 37590 105386 1 0 3 0x100083 ttyin getty 97175 327615 1 0 3 0x88 kqread sshd 88614 487633 29237 73 3 0x1100090 kqread syslogd 29237 295420 1 0 3 0x100082 netio syslogd 85338 130212 1 0 3 0x100080 kqread resolvd 14815 58756 51615 77 3 0x100092 kqread dhcpleased 72874 210148 51615 77 3 0x100092 kqread dhcpleased 51615 451624 1 0 3 0x80 kqread dhcpleased 9728 391954 0 0 3 0x14200 bored smr 96927 353239 0 0 2 0x14200 zerothread 49752 137881 0 0 3 0x14200 aiodoned aiodoned 96656 323909 0 0 3 0x14200 syncer update 40514 13077 0 0 3 0x14200 cleaner cleaner 61307 193409 0 0 3 0x14200 reaper reaper 1746 268804 0 0 3 0x14200 pgdaemon pagedaemon 76028 428015 0 0 3 0x14200 bored viomb 8698 314825 0 0 3 0x40014200 acpi0 acpi0 48604 318459 0 0 3 0x40014200 idle1 3249 129607 0 0 3 0x14200 bored softnet 94 461606 0 0 3 0x14200 bored systqmp 38241 30531 0 0 3 0x14200 bored systq 34418 478869 0 0 3 0x40014200 bored softclock 12507 55603 0 0 3 0x40014200 idle0 1 491598 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 72623 (syz-executor.4) thread 0xffff8000256a3a50 (2641) shared rwlock vmmaplk r = 0 (0xfffffd806b7f3e90) #0 witness_lock+0x44d #1 uvm_vslock+0xc8 sys/uvm/uvm_glue.c:129 #2 sys_sysctl+0x2d8 sys/kern/kern_sysctl.c:240 #3 syscall+0x489 mi_syscall sys/sys/syscall_mi.h:102 [inline] #3 syscall+0x489 sys/arch/amd64/amd64/trap.c:585 #4 Xsyscall+0x128 exclusive rwlock sysctllk r = 0 (0xffffffff82941f10) #0 witness_lock+0x44d #1 rw_enter+0x3e1 sys/kern/kern_rwlock.c:310 #2 sys_sysctl+0x1b3 sys/kern/kern_sysctl.c:233 #3 syscall+0x489 mi_syscall sys/sys/syscall_mi.h:102 [inline] #3 syscall+0x489 sys/arch/amd64/amd64/trap.c:585 #4 Xsyscall+0x128 exclusive kernel_lock &kernel_lock r = 0 (0xffffffff829de988) #0 witness_lock+0x44d #1 syscall+0x3ef mi_syscall sys/sys/syscall_mi.h:93 [inline] #1 syscall+0x3ef sys/arch/amd64/amd64/trap.c:585 #2 Xsyscall+0x128 ddb{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 10163 6400K 6419K 78643K 11265 0 pcb 13 8K 8K 78643K 13 0 rtable 172 5K 7K 78643K 378 0 ifaddr 60 13K 16K 78643K 89 0 sysctl 2 0K 0K 78643K 2 0 counters 50 34K 35K 78643K 58 0 ioctlops 0 0K 2K 78643K 34 0 iov 0 0K 16K 78643K 25 0 mount 1 1K 1K 78643K 1 0 log 0 0K 0K 78643K 5 0 vnodes 1270 79K 79K 78643K 1300 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 35 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1697 195K 286K 78643K 12548 0 file desc 14 49K 117K 78643K 587 0 sigio 0 0K 0K 78643K 3 0 proc 56 74K 111K 78643K 520 0 subproc 65 4K 6K 78643K 117 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 ip_moptions 0 0K 0K 78643K 68 0 in_multi 66 4K 6K 78643K 134 0 ether_multi 1 0K 0K 78643K 5 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 670 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 231 54K 80K 78643K 8175 0 UVM aobj 3 2K 2K 78643K 3 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 4 0 NDP 8 0K 2K 78643K 30 0 temp 69 4701K 4762K 78643K 5269 0 kqueue 12 18K 22K 78643K 61 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 39 0 36 1 0 1 1 0 8 0 rtentry 112 122 0 45 4 0 4 4 0 8 0 unpcb 136 119 0 104 1 0 1 1 0 8 0 syncache 296 15 0 15 2 1 1 1 0 8 1 tcpqe 32 4 0 4 1 0 1 1 0 8 1 tcpcb 736 137 0 124 4 0 4 4 0 8 2 arp 120 20 0 8 1 0 1 1 0 8 0 inpcb 304 253 0 242 2 0 2 2 0 8 0 ip6q 72 4 0 4 1 0 1 1 0 8 1 ip6af 40 12 0 12 1 0 1 1 0 8 1 nd6 48 27 0 12 1 0 1 1 0 8 0 kcovpl 48 9 0 4 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 497 0 176 29 0 29 29 0 8 5 art_table 32 498 0 176 4 0 4 4 0 8 0 art_node 16 121 0 51 1 0 1 1 0 8 0 semupl 112 5 0 5 1 0 1 1 0 8 1 semapl 112 33 0 23 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 1977 0 558 90 0 90 90 0 8 0 ffsino 272 1977 0 558 96 0 96 96 0 8 0 nchpl 144 2770 0 1163 62 0 62 62 0 8 0 uvmvnodes 80 2103 0 0 43 0 43 43 0 8 0 vnodes 224 2103 0 0 124 0 124 124 0 8 0 namei 1024 8521 0 8521 2 1 1 2 0 8 1 percpumem 16 41 0 4 1 0 1 1 0 8 0 scxspl 216 8468 0 8468 4 1 3 3 0 8 3 plimitpl 152 87 0 71 2 0 2 2 0 8 1 sigapl 424 858 0 819 7 1 6 7 0 8 0 futexpl 64 2361 0 2360 1 0 1 1 0 8 0 knotepl 120 326 0 0 10 0 10 10 0 8 0 kqueuepl 216 60 0 52 1 0 1 1 0 8 0 pipepl 336 134 0 115 3 0 3 3 0 8 0 fdescpl 496 844 0 819 7 2 5 6 0 8 0 filepl 152 2725 0 2550 10 0 10 10 0 8 1 lockfpl 104 42 0 40 1 0 1 1 0 8 0 lockfspl 48 20 0 18 1 0 1 1 0 8 0 sessionpl 144 24 0 11 1 0 1 1 0 8 0 pgrppl 48 24 0 11 1 0 1 1 0 8 0 ucredpl 96 424 0 409 1 0 1 1 0 8 0 zombiepl 144 819 0 819 1 0 1 1 0 8 1 processpl 1064 858 0 819 5 1 4 4 0 8 0 procpl 672 1354 0 1305 6 0 6 6 0 8 0 sockpl 480 411 0 382 5 0 5 5 0 8 1 mcl64k 65536 9 0 0 2 0 2 2 0 8 0 mcl16k 16384 2 0 0 1 0 1 1 0 8 0 mcl9k 9216 2 0 0 1 0 1 1 0 8 0 mcl8k 8192 3 0 0 1 0 1 1 0 8 0 mcl4k 4096 8 0 0 1 0 1 1 0 8 0 mcl2k2 2112 1 0 0 1 0 1 1 0 8 0 mcl2k 2048 140 0 0 17 0 17 17 0 8 0 mtagpl 96 2 0 0 1 0 1 1 0 8 0 mbufpl 256 361 0 0 23 0 23 23 0 8 0 bufpl 288 4322 0 139 299 0 299 299 0 8 0 anonpl 24 186616 0 178140 94 2 92 93 0 186 24 amapchunkpl 152 18490 0 17942 34 2 32 32 0 158 5 amappl16 200 2260 0 2062 25 4 21 24 0 8 8 amappl15 192 100 0 94 1 0 1 1 0 8 0 amappl14 184 7 0 3 1 0 1 1 0 8 0 amappl13 176 251 0 249 1 0 1 1 0 8 0 amappl12 168 145 0 137 1 0 1 1 0 8 0 amappl11 160 41 0 30 1 0 1 1 0 8 0 amappl10 152 160 0 151 1 0 1 1 0 8 0 amappl9 144 522 0 517 1 0 1 1 0 8 0 amappl8 136 572 0 525 2 0 2 2 0 8 0 amappl7 128 120 0 110 1 0 1 1 0 8 0 amappl6 120 252 0 230 2 1 1 2 0 8 0 amappl5 112 631 0 614 1 0 1 1 0 8 0 amappl4 104 804 0 778 2 0 2 2 0 8 0 amappl3 96 365 0 349 1 0 1 1 0 8 0 amappl2 88 758 0 712 3 0 3 3 0 8 0 amappl1 80 17401 0 16893 18 4 14 18 0 8 0 amappl 88 7736 0 7557 7 0 7 7 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 2 0 0 1 0 1 1 0 8 0 uaddrrnd 24 844 0 819 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 844 0 819 1 0 1 1 0 8 0 vmmpekpl 168 9921 0 9875 3 0 3 3 0 8 0 vmmpepl 168 78115 0 76289 125 0 125 125 0 357 25 vmsppl 368 843 0 819 4 0 4 4 0 8 0 rwobjpl 56 21515 0 18408 51 2 49 49 0 8 0 pdppl 4096 1695 0 1638 104 37 67 91 0 8 10 pvpl 32 474371 0 461838 250 6 244 249 0 265 109 pmappl 248 843 0 819 4 1 3 3 0 8 0 extentpl 40 58 0 38 1 0 1 1 0 8 0 phpool 112 683 0 40 19 0 19 19 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 panic(ffffffff8257690f) at panic+0x177 sys/kern/subr_prf.c:202 witness_checkorder(fffffd806b7f3e90,9,0) at witness_checkorder+0x11bd witness_debugger sys/kern/subr_witness.c:2505 [inline] witness_checkorder(fffffd806b7f3e90,9,0) at witness_checkorder+0x11bd sys/kern/subr_witness.c:772 rw_enter(fffffd806b7f3e80,21) at rw_enter+0xd1 sys/kern/kern_rwlock.c:250 vm_map_lock_ln(fffffd806b7f3e78,48b,ffff800027ace000) at vm_map_lock_ln+0xda sys/uvm/uvm_map.c:5466 uvm_map_extract(fffffd806b7f3e78,7f7ffffc0000,1000,ffff800023065300,0) at uvm_map_extract+0x173 sys/uvm/uvm_map.c:4530 uvm_io(fffffd806b7f3e78,ffff800023065398,0) at uvm_io+0x127 sys/uvm/uvm_io.c:100 sysctl_proc_args(ffff8000230657e8,2,20000080,ffff800023065818,ffff8000256a3a50) at sysctl_proc_args+0x24b sys/kern/kern_sysctl.c:1790 kern_sysctl(ffff8000230657e4,3,20000080,ffff800023065818,0,0,e1a50077131676f) at kern_sysctl+0xfd sys/kern/kern_sysctl.c:449 sys_sysctl(ffff8000256a3a50,ffff800023065888,ffff8000230658e0) at sys_sysctl+0x209 sys/kern/kern_sysctl.c:249 syscall(ffff800023065950) at syscall+0x489 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff800023065950) at syscall+0x489 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x496f1dfcc40, count: -12 ddb{0}> machine ddbcpu 1 Stopped at x86_ipi_db+0x1a: addq $0x8,%rsp x86_ipi_db(ffff800020ce8ff0) 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 end of kernel end trace frame: 0x24eab4170, count: 12 ddb{1}> trace x86_ipi_db(ffff800020ce8ff0) 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 end of kernel end trace frame: 0x24eab4170, count: -3