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 345072 2377 32767 0x10 0 1 syz-executor.5 * 75046 2377 32767 0x10 0x4000000 0K syz-executor.5 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(fffffd80747015e8,9,0) at witness_checkorder+0x11bd witness_debugger sys/kern/subr_witness.c:2505 [inline] witness_checkorder(fffffd80747015e8,9,0) at witness_checkorder+0x11bd sys/kern/subr_witness.c:772 rw_enter(fffffd80747015d8,21) at rw_enter+0xd1 sys/kern/kern_rwlock.c:250 vm_map_lock_ln(fffffd80747015d0,467,ffff800027b11000) at vm_map_lock_ln+0xda sys/uvm/uvm_map.c:5466 uvm_map_extract(fffffd80747015d0,7f7ffffe7000,1000,ffff800027ab3c60,0) at uvm_map_extract+0x173 sys/uvm/uvm_map.c:4530 uvm_io(fffffd80747015d0,ffff800027ab3cf8,0) at uvm_io+0x127 sys/uvm/uvm_io.c:100 sysctl_proc_args(ffff800027ab4148,2,20000080,ffff800027ab4178,ffff8000fffec010) at sysctl_proc_args+0x24b sys/kern/kern_sysctl.c:1790 kern_sysctl(ffff800027ab4144,3,20000080,ffff800027ab4178,0,0,62e182e23cfd6dc0) at kern_sysctl+0xfd sys/kern/kern_sysctl.c:449 sys_sysctl(ffff8000fffec010,ffff800027ab41e8,ffff800027ab4240) at sys_sysctl+0x209 sys/kern/kern_sysctl.c:249 syscall(ffff800027ab42b0) at syscall+0x489 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff800027ab42b0) at syscall+0x489 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x59bb79b7480, 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(fffffd80747015e8,9,0) at witness_checkorder+0x11bd witness_debugger sys/kern/subr_witness.c:2505 [inline] witness_checkorder(fffffd80747015e8,9,0) at witness_checkorder+0x11bd sys/kern/subr_witness.c:772 rw_enter(fffffd80747015d8,21) at rw_enter+0xd1 sys/kern/kern_rwlock.c:250 vm_map_lock_ln(fffffd80747015d0,467,ffff800027b11000) at vm_map_lock_ln+0xda sys/uvm/uvm_map.c:5466 uvm_map_extract(fffffd80747015d0,7f7ffffe7000,1000,ffff800027ab3c60,0) at uvm_map_extract+0x173 sys/uvm/uvm_map.c:4530 uvm_io(fffffd80747015d0,ffff800027ab3cf8,0) at uvm_io+0x127 sys/uvm/uvm_io.c:100 sysctl_proc_args(ffff800027ab4148,2,20000080,ffff800027ab4178,ffff8000fffec010) at sysctl_proc_args+0x24b sys/kern/kern_sysctl.c:1790 kern_sysctl(ffff800027ab4144,3,20000080,ffff800027ab4178,0,0,62e182e23cfd6dc0) at kern_sysctl+0xfd sys/kern/kern_sysctl.c:449 sys_sysctl(ffff8000fffec010,ffff800027ab41e8,ffff800027ab4240) at sys_sysctl+0x209 sys/kern/kern_sysctl.c:249 syscall(ffff800027ab42b0) at syscall+0x489 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff800027ab42b0) at syscall+0x489 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x59bb79b7480, count: -12 ddb{0}> show registers rdi 0 rsi 0x1 rbp 0xffff800027ab38c0 rbx 0xffffffff829bbbff cpu_info_full_primary+0x2bff rdx 0xffff800000bd3f40 rcx 0 rax 0xffff8000fffec010 r8 0x101010101010101 r9 0x8080808080808080 r10 0x93f78cf979653e7b r11 0x9544790cfe1eca30 r12 0xffffffff829bba00 cpu_info_full_primary+0x2a00 r13 0 r14 0 r15 0x1 rip 0xffffffff8138d658 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800027ab38b0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor.5) pid=75046 stat=onproc flags process=10 proc=4000000 pri=32, usrpri=51, nice=20 forw=0xffffffffffffffff, list=0xffff8000fffed7b0,0xffffffff82b3d400 process=0xffff8000fffeb628 user=0xffff800027aaf000, vmspace=0xfffffd80747015d0 estcpu=36, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 2377 345072 47290 32767 7 0x10 syz-executor.5 * 2377 75046 47290 32767 7 0x4000010 syz-executor.5 17397 347005 55433 32767 2 0x10 syz-executor.2 63796 178910 35598 32767 2 0x10 syz-executor.0 63796 142165 35598 32767 3 0x4000090 netio syz-executor.0 24430 244102 49984 0 2 0x2 ifconfig 49984 181052 12172 0 3 0x10008a sigsusp sh 83111 422854 40154 32767 3 0x90 nanoslp syz-executor.4 83111 438782 40154 32767 3 0x4000090 netio syz-executor.4 83111 51530 40154 32767 3 0x4000090 fsleep syz-executor.4 12172 515101 42468 0 3 0x80 wait syz-executor.7 42468 493734 33266 0 3 0x82 wait syz-executor.7 48150 135895 71781 32767 3 0x90 piperd syz-executor.6 40154 319 22687 32767 3 0x90 nanoslp syz-executor.4 47290 206316 78470 32767 3 0x90 nanoslp syz-executor.5 71781 328201 33266 0 3 0x82 wait syz-executor.6 78470 319797 33266 0 3 0x82 wait syz-executor.5 22687 364607 33266 0 3 0x82 wait syz-executor.4 27427 423976 41384 32767 3 0x90 nanoslp syz-executor.3 35598 381368 14346 32767 3 0x90 nanoslp syz-executor.0 36985 101356 19908 32767 3 0x90 piperd syz-executor.1 41384 406900 33266 0 3 0x82 wait syz-executor.3 55433 307401 75505 32767 3 0x90 nanoslp syz-executor.2 75505 386997 33266 0 3 0x82 wait syz-executor.2 19908 86020 33266 0 3 0x82 wait syz-executor.1 14346 312089 33266 0 3 0x82 wait syz-executor.0 33266 61201 70371 0 3 0x82 thrsleep syz-fuzzer 33266 136745 70371 0 3 0x4000082 nanoslp syz-fuzzer 33266 455301 70371 0 3 0x4000082 thrsleep syz-fuzzer 33266 507125 70371 0 3 0x4000082 thrsleep syz-fuzzer 33266 438686 70371 0 3 0x4000082 thrsleep syz-fuzzer 33266 134324 70371 0 3 0x4000082 kqread syz-fuzzer 33266 143457 70371 0 3 0x4000082 thrsleep syz-fuzzer 33266 470269 70371 0 3 0x4000082 thrsleep syz-fuzzer 33266 228060 70371 0 3 0x4000082 thrsleep syz-fuzzer 70371 291816 24615 0 3 0x10008a sigsusp ksh 24615 71120 62826 0 3 0x9a kqread sshd 44697 121718 1 0 3 0x100083 ttyin getty 62826 276857 1 0 3 0x88 kqread sshd 35503 276366 4684 73 3 0x1100090 kqread syslogd 4684 96976 1 0 3 0x100082 netio syslogd 20634 424570 1 0 3 0x100080 kqread resolvd 12814 403860 51469 77 3 0x100092 kqread dhcpleased 18074 233045 51469 77 3 0x100092 kqread dhcpleased 51469 194099 1 0 3 0x80 kqread dhcpleased 11029 461971 0 0 3 0x14200 bored smr 20048 501721 0 0 2 0x14200 zerothread 87112 389860 0 0 3 0x14200 aiodoned aiodoned 30843 362431 0 0 3 0x14200 syncer update 73696 489387 0 0 3 0x14200 cleaner cleaner 28513 171120 0 0 3 0x14200 reaper reaper 61065 333895 0 0 3 0x14200 pgdaemon pagedaemon 35556 293249 0 0 3 0x14200 bored viomb 76766 311265 0 0 3 0x40014200 acpi0 acpi0 42177 162542 0 0 3 0x40014200 idle1 46935 222387 0 0 3 0x14200 bored softnet 19281 63931 0 0 3 0x14200 bored systqmp 11870 414936 0 0 3 0x14200 bored systq 64136 40441 0 0 3 0x40014200 bored softclock 51963 412021 0 0 3 0x40014200 idle0 1 258777 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 2377 (syz-executor.5) thread 0xffff8000fffec010 (75046) shared rwlock vmmaplk r = 0 (0xfffffd80747015e8) #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 10170 6407K 6419K 78643K 11260 0 pcb 13 8K 8K 78643K 13 0 rtable 232 6K 6K 78643K 342 0 ifaddr 80 16K 16K 78643K 81 0 counters 56 35K 35K 78643K 56 0 ioctlops 0 0K 2K 78643K 32 0 iov 0 0K 12K 78643K 2 0 mount 1 1K 1K 78643K 1 0 log 0 0K 0K 78643K 5 0 vnodes 1270 79K 79K 78643K 1283 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 2 0K 0K 78643K 2 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1697 195K 286K 78643K 12548 0 file desc 25 93K 117K 78643K 156 0 proc 63 87K 123K 78643K 451 0 subproc 104 6K 6K 78643K 104 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 ip_moptions 0 0K 0K 78643K 4 0 in_multi 95 6K 6K 78643K 96 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 43 201K 201K 78643K 43 0 exec 0 0K 2K 78643K 601 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 302 78K 78K 78643K 3219 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 26 2K 2K 78643K 26 0 temp 85 4697K 4757K 78643K 4246 0 kqueue 12 18K 20K 78643K 23 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 36 0 33 1 0 1 1 0 8 0 rtentry 112 108 0 1 4 0 4 4 0 8 0 unpcb 136 36 0 17 1 0 1 1 0 8 0 syncache 296 4 0 4 1 1 0 1 0 8 0 tcpcb 736 11 0 4 1 0 1 1 0 8 0 arp 120 18 0 0 1 0 1 1 0 8 0 inpcb 304 67 0 59 1 0 1 1 0 8 0 nd6 48 22 0 0 1 0 1 1 0 8 0 kcovpl 48 8 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 437 0 0 28 0 28 28 0 8 0 art_table 32 438 0 0 4 0 4 4 0 8 0 art_node 16 107 0 9 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 1492 0 65 90 0 90 90 0 8 0 ffsino 272 1492 0 65 96 0 96 96 0 8 0 nchpl 144 1756 0 96 62 0 62 62 0 8 0 uvmvnodes 80 1605 0 0 33 0 33 33 0 8 0 vnodes 224 1605 0 0 95 0 95 95 0 8 0 namei 1024 5819 0 5819 2 0 2 2 0 8 2 percpumem 16 40 0 0 1 0 1 1 0 8 0 scxspl 216 5411 0 5411 2 1 1 2 0 8 1 plimitpl 152 32 0 9 1 0 1 1 0 8 0 sigapl 424 432 0 382 7 0 7 7 0 8 0 futexpl 64 101 0 100 1 0 1 1 0 8 0 knotepl 120 106 0 0 4 0 4 4 0 8 0 kqueuepl 216 19 0 11 1 0 1 1 0 8 0 pipepl 336 122 0 94 3 0 3 3 0 8 0 fdescpl 496 418 0 382 7 1 6 6 0 8 0 filepl 152 1518 0 1276 10 0 10 10 0 8 0 lockfpl 104 8 0 6 1 0 1 1 0 8 0 lockfspl 48 5 0 3 1 0 1 1 0 8 0 sessionpl 144 23 0 7 1 0 1 1 0 8 0 pgrppl 48 23 0 7 1 0 1 1 0 8 0 ucredpl 96 94 0 77 1 0 1 1 0 8 0 zombiepl 144 383 0 382 1 0 1 1 0 8 0 processpl 1064 432 0 382 5 1 4 4 0 8 0 procpl 672 461 0 399 6 0 6 6 0 8 0 sockpl 480 139 0 109 4 0 4 4 0 8 0 mcl8k 8192 3 0 0 1 0 1 1 0 8 0 mcl4k 4096 2 0 0 1 0 1 1 0 8 0 mcl2k 2048 147 0 0 18 0 18 18 0 8 0 mtagpl 96 2 0 0 1 0 1 1 0 8 0 mbufpl 256 330 0 0 21 0 21 21 0 8 0 bufpl 288 3597 0 135 248 0 248 248 0 8 0 anonpl 24 67091 0 55287 74 1 73 73 0 186 0 amapchunkpl 152 6822 0 6102 30 1 29 29 0 158 1 amappl16 200 510 0 213 17 0 17 17 0 8 0 amappl15 192 100 0 94 1 0 1 1 0 8 0 amappl14 184 15 0 13 1 0 1 1 0 8 0 amappl13 176 101 0 91 1 0 1 1 0 8 0 amappl12 168 13 0 10 1 0 1 1 0 8 0 amappl11 160 52 0 40 1 0 1 1 0 8 0 amappl10 152 39 0 36 1 0 1 1 0 8 0 amappl9 144 474 0 469 1 0 1 1 0 8 0 amappl8 136 539 0 493 2 0 2 2 0 8 0 amappl7 128 135 0 119 1 0 1 1 0 8 0 amappl6 120 214 0 193 2 0 2 2 0 8 1 amappl5 112 192 0 176 1 0 1 1 0 8 0 amappl4 104 783 0 750 2 0 2 2 0 8 0 amappl3 96 172 0 155 1 0 1 1 0 8 0 amappl2 88 499 0 447 3 0 3 3 0 8 1 amappl1 80 10626 0 9996 18 0 18 18 0 8 4 amappl 88 2815 0 2568 6 0 6 6 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 418 0 382 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 418 0 382 1 0 1 1 0 8 0 vmmpekpl 168 7842 0 7805 2 0 2 2 0 8 0 vmmpepl 168 41263 0 38785 121 0 121 121 0 357 11 vmsppl 368 417 0 382 4 0 4 4 0 8 0 rwobjpl 56 12498 0 9655 43 1 42 42 0 8 0 pdppl 4096 843 0 764 109 16 93 93 0 8 14 pvpl 32 248923 0 232113 243 0 243 243 0 265 106 pmappl 248 417 0 382 4 1 3 3 0 8 0 extentpl 40 58 0 38 1 0 1 1 0 8 0 phpool 112 629 0 18 18 0 18 18 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(fffffd80747015e8,9,0) at witness_checkorder+0x11bd witness_debugger sys/kern/subr_witness.c:2505 [inline] witness_checkorder(fffffd80747015e8,9,0) at witness_checkorder+0x11bd sys/kern/subr_witness.c:772 rw_enter(fffffd80747015d8,21) at rw_enter+0xd1 sys/kern/kern_rwlock.c:250 vm_map_lock_ln(fffffd80747015d0,467,ffff800027b11000) at vm_map_lock_ln+0xda sys/uvm/uvm_map.c:5466 uvm_map_extract(fffffd80747015d0,7f7ffffe7000,1000,ffff800027ab3c60,0) at uvm_map_extract+0x173 sys/uvm/uvm_map.c:4530 uvm_io(fffffd80747015d0,ffff800027ab3cf8,0) at uvm_io+0x127 sys/uvm/uvm_io.c:100 sysctl_proc_args(ffff800027ab4148,2,20000080,ffff800027ab4178,ffff8000fffec010) at sysctl_proc_args+0x24b sys/kern/kern_sysctl.c:1790 kern_sysctl(ffff800027ab4144,3,20000080,ffff800027ab4178,0,0,62e182e23cfd6dc0) at kern_sysctl+0xfd sys/kern/kern_sysctl.c:449 sys_sysctl(ffff8000fffec010,ffff800027ab41e8,ffff800027ab4240) at sys_sysctl+0x209 sys/kern/kern_sysctl.c:249 syscall(ffff800027ab42b0) at syscall+0x489 mi_syscall sys/sys/syscall_mi.h:102 [inline] syscall(ffff800027ab42b0) at syscall+0x489 sys/arch/amd64/amd64/trap.c:585 Xsyscall() at Xsyscall+0x128 end of kernel end trace frame: 0x59bb79b7480, 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: 0x7f7ffffe73e0, 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: 0x7f7ffffe73e0, count: -3