login: load: 0.89 cmd: load: 0.89 cmd: witness: acquiring duplicate lock of same type: "&sc->sc_lock" 1st wsmuxlk @ /syzkaller/managers/multicore/kernel/sys/dev/wscons/wsmux.c:626 2nd wsmuxlk @ /syzkaller/managers/multicore/kernel/sys/dev/wscons/wsmux.c:242 Starting stack trace... witness_checkorder(ffff800000026dd0,1,ffffffff81f354ca,f2,0) at witness_checkorder+0xe14 witness_debugger sys/kern/subr_witness.c:2650 [inline] witness_checkorder(ffff800000026dd0,1,ffffffff81f354ca,f2,0) at witness_checkorder+0xe14 sys/kern/subr_witness.c:926 _rw_enter_read(ffff800000026dc0,ffffffff81f354ca,f2) at _rw_enter_read+0x80 sys/kern/kern_rwlock.c:102 wsmux_mux_open(ffff800000026d00,ffff800001991150) at wsmux_mux_open+0x82 wsmux_do_open sys/dev/wscons/wsmux.c:243 [inline] wsmux_mux_open(ffff800000026d00,ffff800001991150) at wsmux_mux_open+0x82 sys/dev/wscons/wsmux.c:225 wsmux_attach_sc(ffff800001991100,ffff800000026d00) at wsmux_attach_sc+0x180 sys/dev/wscons/wsmux.c:667 VOP_IOCTL(fffffd8066272678,80085761,ffff800020c66e70,82,fffffd807f7c7780,ffff800020b424c8) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd8064fe1008,80085761,ffff800020c66e70,ffff800020b424c8) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800020b424c8,ffff800020c66fb8,ffff800020c66fa0) at sys_ioctl+0x646 syscall(ffff800020c67050) at syscall+0x5ac mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c67050) at syscall+0x5ac sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,0,ffffffffffffff86,0,3,d54a61390d8) at Xsyscall+0x128 end of kernel end trace frame: 0xd57612b8670, count: 248 End of stack trace. 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:399 witness_checkorder(ffff800000026dd0,1,ffffffff81f354ca,f2,0) at witness_checkorder+0xe19 witness_debugger sys/kern/subr_witness.c:2650 [inline] witness_checkorder(ffff800000026dd0,1,ffffffff81f354ca,f2,0) at witness_checkorder+0xe19 sys/kern/subr_witness.c:926 _rw_enter_read(ffff800000026dc0,ffffffff81f354ca,f2) at _rw_enter_read+0x80 sys/kern/kern_rwlock.c:102 wsmux_mux_open(ffff800000026d00,ffff800001991150) at wsmux_mux_open+0x82 wsmux_do_open sys/dev/wscons/wsmux.c:243 [inline] wsmux_mux_open(ffff800000026d00,ffff800001991150) at wsmux_mux_open+0x82 sys/dev/wscons/wsmux.c:225 wsmux_attach_sc(ffff800001991100,ffff800000026d00) at wsmux_attach_sc+0x180 sys/dev/wscons/wsmux.c:667 VOP_IOCTL(fffffd8066272678,80085761,ffff800020c66e70,82,fffffd807f7c7780,ffff800020b424c8) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd8064fe1008,80085761,ffff800020c66e70,ffff800020b424c8) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800020b424c8,ffff800020c66fb8,ffff800020c66fa0) at sys_ioctl+0x646 syscall(ffff800020c67050) at syscall+0x5ac mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c67050) at syscall+0x5ac sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,0,ffffffffffffff86,0,3,d54a61390d8) at Xsyscall+0x128 end of kernel end trace frame: 0xd57612b8670, count: -10 ddb{0}> show registers rdi 0 rsi 0x3ffff acpi_pdirpa+0x2be67 rbp 0xffff800020c66aa0 rbx 0x3 rdx 0x40000 acpi_pdirpa+0x2be68 rcx 0xffff800000b47000 rax 0xffff800000941840 r8 0xffffffff81316553 kprintf+0x183 r9 0x1 r10 0x25 r11 0xfc8b0943090071a9 r12 0xffffffff81f354ca substchar+0x955e r13 0xf2 r14 0xffffffff81f25297 apollo_udma33_tim+0x16e4 r15 0xffffffff81f354ca substchar+0x955e rip 0xffffffff81264218 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020c66a90 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor.0) pid=39268 stat=onproc flags process=0 proc=4000000 pri=86, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff800020b43c38,0xffffffff82334d38 process=0xffff800020b45078 user=0xffff800020c62000, vmspace=0xfffffd807f00d5a0 estcpu=36, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 28350 233246 11366 0 2 0 syz-executor.0 28350 150115 11366 0 3 0x4000080 nanosleep syz-executor.0 *28350 39268 11366 0 7 0x4000000 syz-executor.0 36546 429893 30397 0 2 0 syz-executor.1 36546 486185 30397 0 3 0x4000080 ttyin syz-executor.1 36546 125353 30397 0 3 0x4000080 fsleep syz-executor.1 36546 251286 30397 0 3 0x4000080 fsleep syz-executor.1 8762 495250 1 0 3 0x100083 ttyin getty 19165 161251 0 0 3 0x14200 bored sosplice 30397 346191 39379 0 3 0x82 nanosleep syz-executor.1 11366 115676 39379 0 3 0x82 nanosleep syz-executor.0 39379 430097 40248 0 3 0x82 thrsleep syz-fuzzer 39379 456326 40248 0 3 0x4000082 thrsleep syz-fuzzer 39379 46472 40248 0 3 0x4000082 thrsleep syz-fuzzer 39379 237185 40248 0 3 0x4000082 kqread syz-fuzzer 39379 95960 40248 0 3 0x4000082 thrsleep syz-fuzzer 39379 73432 40248 0 3 0x4000082 thrsleep syz-fuzzer 39379 128464 40248 0 3 0x4000082 thrsleep syz-fuzzer 39379 251508 40248 0 3 0x4000082 thrsleep syz-fuzzer 39379 405032 40248 0 3 0x4000082 thrsleep syz-fuzzer 39379 138800 40248 0 3 0x4000082 thrsleep syz-fuzzer 40248 431048 91925 0 3 0x10008a pause ksh 91925 31984 57293 0 3 0x92 select sshd 57293 322150 1 0 3 0x80 select sshd 79220 5601 17803 73 7 0x100090 syslogd 17803 523881 1 0 3 0x100082 netio syslogd 80808 369444 1 77 3 0x100090 poll dhclient 62860 316043 1 0 3 0x80 poll dhclient 61782 240551 0 0 2 0x14200 zerothread 34361 241150 0 0 3 0x14200 aiodoned aiodoned 35260 217685 0 0 3 0x14200 syncer update 53211 508124 0 0 3 0x14200 cleaner cleaner 92758 310230 0 0 3 0x14200 reaper reaper 35963 457586 0 0 3 0x14200 pgdaemon pagedaemon 7131 55338 0 0 3 0x14200 bored crynlk 54469 332019 0 0 3 0x14200 bored crypto 27723 423895 0 0 3 0x40014200 acpi0 acpi0 809 25642 0 0 3 0x40014200 idle1 721 359609 0 0 3 0x14200 bored softnet 94217 3065 0 0 3 0x14200 bored systqmp 10927 182091 0 0 3 0x14200 bored systq 58302 189054 0 0 3 0x40014200 bored softclock 863 453418 0 0 3 0x40014200 idle0 1 13933 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 28350 (syz-executor.0) thread 0xffff800020b424c8 (39268) exclusive rwlock wsmuxlk r = 0 (0xffff8000019911d0) locked @ /syzkaller/managers/multicore/kernel/sys/dev/wscons/wsmux.c:626 #0 witness_lock+0x58a sys/kern/subr_witness.c:1205 #1 wsmux_attach_sc+0x48 sys/dev/wscons/wsmux.c:632 #2 VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 #3 vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 #4 sys_ioctl+0x646 #5 syscall+0x5ac mi_syscall sys/sys/syscall_mi.h:99 [inline] #5 syscall+0x5ac sys/arch/amd64/amd64/trap.c:574 #6 Xsyscall+0x128 exclusive kernel_lock &kernel_lock r = 0 (0xffffffff8235c720) locked @ /syzkaller/managers/multicore/kernel/sys/sys/syscall_mi.h:90 #0 witness_lock+0x58a sys/kern/subr_witness.c:1205 #1 syscall+0x47f mi_syscall sys/sys/syscall_mi.h:91 [inline] #1 syscall+0x47f sys/arch/amd64/amd64/trap.c:574 #2 Xsyscall+0x128 ddb{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim devbuf 9497 6357K 6357K 78643K 10718 0 0 pcb 23 9K 11K 78643K 278 0 0 rtable 100 3K 4K 78643K 233 0 0 ifaddr 49 12K 12K 78643K 84 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 2K 78643K 23 0 0 iov 0 0K 16K 78643K 62 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1213 76K 76K 78643K 1531 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 8 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 0K 1K 78643K 62 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1792 194K 288K 78643K 12592 0 0 file desc 6 17K 25K 78643K 471 0 0 sigio 0 0K 0K 78643K 2 0 0 proc 42 38K 58K 78643K 316 0 0 subproc 64 65538K 67586K 78643K 92 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 49 0 0 in_multi 33 2K 2K 78643K 55 0 0 ether_multi 1 0K 0K 78643K 5 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 66 291K 291K 78643K 66 0 0 exec 0 0K 1K 78643K 205 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 84 20K 29K 78643K 2336 0 0 UVM aobj 18 2K 3K 78643K 20 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 19 0 0 NDP 9 0K 0K 78643K 22 0 0 temp 132 2362K 2426K 78643K 4033 0 0 kqueue 0 0K 0K 78643K 7 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 4 0 0 1 0 1 1 0 8 0 inpcbpl 280 221 0 214 1 0 1 1 0 8 0 plimitpl 152 21 0 14 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtentry 112 41 0 1 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpcb 544 92 0 88 1 0 1 1 0 8 0 nd6 48 4 0 0 1 0 1 1 0 8 0 ppxss 1128 6 0 6 4 3 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 185 0 0 12 0 12 12 0 8 0 art_table 32 186 0 0 2 0 2 2 0 8 0 art_node 16 40 0 6 1 0 1 1 0 8 0 sysvmsgpl 40 8 0 5 1 0 1 1 0 8 0 semupl 112 3 0 3 1 1 0 1 0 8 0 semapl 112 58 0 48 1 0 1 1 0 8 0 shmpl 112 18 0 2 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 2311 0 900 46 0 46 46 0 8 0 ffsino 272 2311 0 900 95 0 95 95 0 8 0 nchpl 144 3161 0 1539 61 0 61 61 0 8 0 uvmvnodes 72 2420 0 0 44 0 44 44 0 8 0 vnodes 200 2420 0 0 128 0 128 128 0 8 0 namei 1024 9235 0 9235 2 1 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scsiplug 64 1 0 1 1 1 0 1 0 8 0 scxspl 192 8126 0 8126 7 6 1 6 0 8 1 sigapl 432 641 0 627 2 0 2 2 0 8 0 futexpl 56 5189 0 5187 1 0 1 1 0 8 0 knotepl 112 148 0 121 2 1 1 2 0 8 0 kqueuepl 104 109 0 106 1 0 1 1 0 8 0 pipepl 112 474 0 453 3 2 1 2 0 8 0 fdescpl 488 642 0 627 3 1 2 3 0 8 0 filepl 152 4057 0 3952 7 2 5 5 0 8 0 lockfpl 104 150 0 149 3 2 1 1 0 8 0 lockfspl 32 203 0 202 3 2 1 1 0 8 0 sessionpl 112 19 0 9 1 0 1 1 0 8 0 pgrppl 48 23 0 13 1 0 1 1 0 8 0 ucredpl 96 1288 0 1281 1 0 1 1 0 8 0 zombiepl 144 627 0 627 2 1 1 1 0 8 1 processpl 840 657 0 627 4 0 4 4 0 8 0 procpl 600 1742 0 1698 4 0 4 4 0 8 0 sosppl 128 2 0 2 1 1 0 1 0 8 0 sockpl 384 458 0 441 5 1 4 4 0 8 2 mcl64k 65536 258 0 0 31 1 30 30 0 8 1 mcl12k 12288 5 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 5 0 0 1 0 1 1 0 8 0 mcl2k2 2112 3 0 0 1 0 1 1 0 8 0 mcl2k 2048 121 0 0 14 0 14 14 0 8 0 mtagpl 80 1 0 0 1 0 1 1 0 8 0 mbufpl 256 355 0 0 20 0 20 20 0 8 0 bufpl 256 6101 0 1015 318 0 318 318 0 8 0 anonpl 16 68579 0 60672 53 17 36 41 0 125 3 amapchunkpl 152 3502 0 3398 9 4 5 9 0 158 0 amappl16 192 2967 0 2559 36 13 23 28 0 8 2 amappl15 184 1 0 0 1 0 1 1 0 8 0 amappl14 176 9 0 6 2 1 1 1 0 8 0 amappl13 168 480 0 473 1 0 1 1 0 8 0 amappl12 160 5 0 3 1 0 1 1 0 8 0 amappl11 152 178 0 169 1 0 1 1 0 8 0 amappl10 144 58 0 55 2 1 1 1 0 8 0 amappl9 136 354 0 351 1 0 1 1 0 8 0 amappl8 128 135 0 116 1 0 1 1 0 8 0 amappl7 120 491 0 482 1 0 1 1 0 8 0 amappl6 112 56 0 49 1 0 1 1 0 8 0 amappl5 104 122 0 110 1 0 1 1 0 8 0 amappl4 96 278 0 257 1 0 1 1 0 8 0 amappl3 88 151 0 146 1 0 1 1 0 8 0 amappl2 80 5198 0 5136 2 0 2 2 0 8 0 amappl1 72 22307 0 21860 24 14 10 19 0 8 0 amappl 72 1953 0 1913 1 0 1 1 0 75 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 19 0 2 1 0 1 1 0 8 0 uaddrrnd 24 642 0 627 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 642 0 627 1 0 1 1 0 8 0 vmmpekpl 168 9093 0 9073 2 0 2 2 0 8 0 vmmpepl 168 73849 0 72399 86 21 65 70 0 357 1 vmsppl 360 641 0 627 2 0 2 2 0 8 0 pdppl 4096 1291 0 1254 6 1 5 6 0 8 0 pvpl 32 230325 0 219295 127 27 100 111 0 265 9 pmappl 224 641 0 627 1 0 1 1 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 507 0 5 15 0 15 15 0 8 0