login: NNwitness: acquiring duplicate lock of same type: "&sc->sc_lock" 1st wsmuxlk @ /syzkaller/managers/multicore/kernel/sys/dev/wscons/wsmux.c:629 2nd wsmuxlk @ /syzkaller/managers/multicore/kernel/sys/dev/wscons/wsmux.c:245 Starting stack trace... witness_checkorder(ffff80000069edd0,1,ffffffff81f33463,f5,0) at witness_checkorder+0xe14 witness_debugger sys/kern/subr_witness.c:2650 [inline] witness_checkorder(ffff80000069edd0,1,ffffffff81f33463,f5,0) at witness_checkorder+0xe14 sys/kern/subr_witness.c:926 _rw_enter_read(ffff80000069edc0,ffffffff81f33463,f5) at _rw_enter_read+0x80 sys/kern/kern_rwlock.c:102 wsmux_mux_open(ffff80000069ed00,ffff800001983e50) at wsmux_mux_open+0x82 wsmux_do_open sys/dev/wscons/wsmux.c:246 [inline] wsmux_mux_open(ffff80000069ed00,ffff800001983e50) at wsmux_mux_open+0x82 sys/dev/wscons/wsmux.c:228 wsmux_attach_sc(ffff800001983e00,ffff80000069ed00) at wsmux_attach_sc+0x180 sys/dev/wscons/wsmux.c:670 VOP_IOCTL(fffffd8065181950,80085761,ffff800020c59ca0,f,fffffd807f7c7900,ffff800020b439e0) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd80672e1b68,80085761,ffff800020c59ca0,ffff800020b439e0) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800020b439e0,ffff800020c59de8,ffff800020c59dd0) at sys_ioctl+0x646 syscall(ffff800020c59e80) at syscall+0x5ac mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c59e80) at syscall+0x5ac sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,0,ffffffffffffff86,0,3,3bf986e1010) at Xsyscall+0x128 end of kernel end trace frame: 0x3c1f1c862e0, 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(ffff80000069edd0,1,ffffffff81f33463,f5,0) at witness_checkorder+0xe19 witness_debugger sys/kern/subr_witness.c:2650 [inline] witness_checkorder(ffff80000069edd0,1,ffffffff81f33463,f5,0) at witness_checkorder+0xe19 sys/kern/subr_witness.c:926 _rw_enter_read(ffff80000069edc0,ffffffff81f33463,f5) at _rw_enter_read+0x80 sys/kern/kern_rwlock.c:102 wsmux_mux_open(ffff80000069ed00,ffff800001983e50) at wsmux_mux_open+0x82 wsmux_do_open sys/dev/wscons/wsmux.c:246 [inline] wsmux_mux_open(ffff80000069ed00,ffff800001983e50) at wsmux_mux_open+0x82 sys/dev/wscons/wsmux.c:228 wsmux_attach_sc(ffff800001983e00,ffff80000069ed00) at wsmux_attach_sc+0x180 sys/dev/wscons/wsmux.c:670 VOP_IOCTL(fffffd8065181950,80085761,ffff800020c59ca0,f,fffffd807f7c7900,ffff800020b439e0) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd80672e1b68,80085761,ffff800020c59ca0,ffff800020b439e0) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800020b439e0,ffff800020c59de8,ffff800020c59dd0) at sys_ioctl+0x646 syscall(ffff800020c59e80) at syscall+0x5ac mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c59e80) at syscall+0x5ac sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,0,ffffffffffffff86,0,3,3bf986e1010) at Xsyscall+0x128 end of kernel end trace frame: 0x3c1f1c862e0, count: -10 ddb{0}> show registers rdi 0 rsi 0x3ffff acpi_pdirpa+0x2be67 rbp 0xffff800020c598d0 rbx 0x3 rdx 0x40000 acpi_pdirpa+0x2be68 rcx 0xffff800003b49000 rax 0xffff80000092fa00 r8 0xffffffff818cb2f3 kprintf+0x183 r9 0x1 r10 0x25 r11 0xf84ee05f91266e5f r12 0xffffffff81f33463 substchar+0x92c4 r13 0xf5 r14 0xffffffff81f22d40 cmd680_setup_channel.udma_tbl+0x3c0b r15 0xffffffff81f33463 substchar+0x92c4 rip 0xffffffff811a46a8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020c598c0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor.0) pid=21838 stat=onproc flags process=0 proc=4000000 pri=69, usrpri=69, nice=20 forw=0xffffffffffffffff, list=0xffff800020b43788,0xffffffff8234a810 process=0xffff800020b7b3c8 user=0xffff800020c54000, vmspace=0xfffffd807effe9d8 estcpu=36, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 5724 286679 69972 0 2 0 syz-executor.0 * 5724 21838 69972 0 7 0x4000000 syz-executor.0 77170 493080 51203 0 2 0 syz-executor.1 77170 280155 51203 0 3 0x4000080 piperd syz-executor.1 93265 161876 1 0 3 0x100083 ttyin getty 69972 236875 77174 0 3 0x82 nanosleep syz-executor.0 47213 256577 0 0 3 0x14200 bored sosplice 51203 219990 77174 0 3 0x82 nanosleep syz-executor.1 77174 409725 7365 0 3 0x82 thrsleep syz-fuzzer 77174 366110 7365 0 3 0x4000082 thrsleep syz-fuzzer 77174 447089 7365 0 3 0x4000082 thrsleep syz-fuzzer 77174 452007 7365 0 3 0x4000082 thrsleep syz-fuzzer 77174 501358 7365 0 3 0x4000082 thrsleep syz-fuzzer 77174 449609 7365 0 3 0x4000082 kqread syz-fuzzer 77174 140938 7365 0 3 0x4000082 thrsleep syz-fuzzer 77174 497212 7365 0 3 0x4000082 thrsleep syz-fuzzer 77174 248090 7365 0 3 0x4000082 thrsleep syz-fuzzer 77174 356458 7365 0 3 0x4000082 thrsleep syz-fuzzer 7365 19254 33935 0 3 0x10008a pause ksh 33935 2664 40362 0 3 0x92 select sshd 40362 32338 1 0 3 0x80 select sshd 88350 443349 4397 73 7 0x100090 syslogd 4397 321225 1 0 3 0x100082 netio syslogd 30558 181917 1 77 3 0x100090 poll dhclient 80033 416728 1 0 3 0x80 poll dhclient 13473 247786 0 0 2 0x14200 zerothread 57355 480952 0 0 3 0x14200 aiodoned aiodoned 85820 187349 0 0 3 0x14200 syncer update 35871 459819 0 0 3 0x14200 cleaner cleaner 46470 450940 0 0 3 0x14200 reaper reaper 223 252124 0 0 3 0x14200 pgdaemon pagedaemon 25302 103178 0 0 3 0x14200 bored crynlk 75036 276704 0 0 3 0x14200 bored crypto 32680 36782 0 0 3 0x40014200 acpi0 acpi0 32320 437265 0 0 3 0x40014200 idle1 30850 223801 0 0 3 0x14200 bored softnet 92893 293168 0 0 3 0x14200 bored systqmp 6875 15769 0 0 3 0x14200 bored systq 54553 404607 0 0 3 0x40014200 bored softclock 28865 491302 0 0 3 0x40014200 idle0 1 404366 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 5724 (syz-executor.0) thread 0xffff800020b439e0 (21838) exclusive rwlock wsmuxlk r = 0 (0xffff800001983ed0) locked @ /syzkaller/managers/multicore/kernel/sys/dev/wscons/wsmux.c:629 #0 witness_lock+0x58a sys/kern/subr_witness.c:1205 #1 wsmux_attach_sc+0x48 sys/dev/wscons/wsmux.c:635 #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 (0xffffffff82360c40) 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 9517 6363K 6364K 78643K 13598 0 0 pcb 23 9K 11K 78643K 1829 0 0 rtable 100 3K 4K 78643K 4416 0 0 ifaddr 56 24K 31K 78643K 2866 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 2K 78643K 26 0 0 iov 0 0K 16K 78643K 96 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1195 75K 75K 78643K 2594 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 11 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 1K 1K 78643K 94 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1792 194K 288K 78643K 12592 0 0 file desc 6 17K 21K 78643K 2813 0 0 sigio 0 0K 0K 78643K 4 0 0 proc 42 38K 58K 78643K 372 0 0 subproc 64 65538K 67586K 78643K 102 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 87 0 0 in_multi 33 2K 2K 78643K 79 0 0 ether_multi 1 0K 0K 78643K 4 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 84 371K 371K 78643K 84 0 0 exec 0 0K 1K 78643K 229 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 92 21K 30K 78643K 9508 0 0 UVM aobj 55 3K 3K 78643K 60 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 11 0K 0K 78643K 718 0 0 temp 163 2367K 2433K 78643K 15354 0 0 kqueue 0 0K 0K 78643K 9 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 5 0 1 1 0 1 1 0 8 0 inpcbpl 280 1237 0 1230 1 0 1 1 0 8 0 plimitpl 152 31 0 24 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtentry 112 50 0 10 2 0 2 2 0 8 0 syncache 264 4 0 4 2 2 0 1 0 8 0 tcpcb 544 113 0 109 1 0 1 1 0 8 0 nd6 48 6 0 2 1 0 1 1 0 8 0 ppxss 1128 698 0 698 7 7 0 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 232 0 41 12 0 12 12 0 8 0 art_table 32 233 0 41 2 0 2 2 0 8 0 art_node 16 49 0 15 1 0 1 1 0 8 0 sysvmsgpl 40 10 0 7 1 0 1 1 0 8 0 semupl 112 4 0 4 1 1 0 1 0 8 0 semapl 112 86 0 76 1 0 1 1 0 8 0 shmpl 112 58 0 5 2 0 2 2 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 7058 0 5659 46 0 46 46 0 8 0 ffsino 272 7058 0 5659 95 1 94 95 0 8 0 nchpl 144 11665 0 10056 61 0 61 61 0 8 0 uvmvnodes 72 5926 0 0 108 0 108 108 0 8 0 vnodes 200 5926 0 0 312 0 312 312 0 8 0 namei 1024 29842 0 29842 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 28413 0 28413 7 6 1 6 0 8 1 sigapl 432 2980 0 2966 2 0 2 2 0 8 0 futexpl 56 39736 0 39736 1 0 1 1 0 8 1 knotepl 112 424 0 397 5 4 1 2 0 8 0 kqueuepl 104 524 0 522 1 0 1 1 0 8 0 pipepl 112 4310 0 4287 4 3 1 2 0 8 0 fdescpl 488 2981 0 2966 4 2 2 3 0 8 0 filepl 152 16107 0 16008 9 4 5 5 0 8 1 lockfpl 104 235 0 235 15 15 0 1 0 8 0 lockfspl 32 235 0 235 15 15 0 1 0 8 0 sessionpl 112 20 0 10 1 0 1 1 0 8 0 pgrppl 48 26 0 16 1 0 1 1 0 8 0 ucredpl 96 1828 0 1821 1 0 1 1 0 8 0 zombiepl 144 2966 0 2966 2 1 1 1 0 8 1 processpl 840 2996 0 2966 4 0 4 4 0 8 0 procpl 600 8861 0 8820 5 1 4 5 0 8 0 srpgc 64 6 0 6 1 1 0 1 0 8 0 sosppl 128 9 0 9 4 4 0 1 0 8 0 sockpl 384 3881 0 3864 7 4 3 4 0 8 1 mcl64k 65536 229 0 0 29 5 24 29 0 8 1 mcl16k 16384 2 0 0 1 0 1 1 0 8 0 mcl12k 12288 18 0 0 2 0 2 2 0 8 0 mcl9k 9216 17 0 0 2 0 2 2 0 8 0 mcl8k 8192 3 0 0 1 0 1 1 0 8 0 mcl4k 4096 17 0 0 3 0 3 3 0 8 0 mcl2k2 2112 5 0 0 1 0 1 1 0 8 0 mcl2k 2048 131 0 0 13 1 12 13 0 8 0 mtagpl 80 1 0 0 1 0 1 1 0 8 0 mbufpl 256 392 0 0 19 0 19 19 0 8 0 bufpl 256 8766 0 1794 436 0 436 436 0 8 0 anonpl 16 234269 0 226481 86 51 35 49 0 125 0 amapchunkpl 152 16244 0 16146 25 20 5 10 0 158 0 amappl16 192 12772 0 12363 58 37 21 33 0 8 0 amappl15 184 295 0 292 1 0 1 1 0 8 0 amappl14 176 12 0 9 2 1 1 1 0 8 0 amappl13 168 27 0 24 1 0 1 1 0 8 0 amappl12 160 2516 0 2514 2 1 1 1 0 8 0 amappl11 152 188 0 179 1 0 1 1 0 8 0 amappl10 144 59 0 57 2 1 1 1 0 8 0 amappl9 136 315 0 311 1 0 1 1 0 8 0 amappl8 128 2596 0 2568 1 0 1 1 0 8 0 amappl7 120 41 0 34 1 0 1 1 0 8 0 amappl6 112 63 0 51 1 0 1 1 0 8 0 amappl5 104 516 0 504 1 0 1 1 0 8 0 amappl4 96 287 0 263 2 1 1 2 0 8 0 amappl3 88 215 0 210 1 0 1 1 0 8 0 amappl2 80 27899 0 27838 2 0 2 2 0 8 0 amappl1 72 70164 0 69741 24 14 10 19 0 8 0 amappl 72 9097 0 9060 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 59 0 5 1 0 1 1 0 8 0 uaddrrnd 24 2981 0 2966 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 2981 0 2966 1 0 1 1 0 8 0 vmmpekpl 168 32993 0 32972 2 0 2 2 0 8 0 vmmpepl 168 312928 0 311493 123 58 65 77 0 357 0 vmsppl 360 2980 0 2966 2 0 2 2 0 8 0 pdppl 4096 5970 0 5932 7 2 5 6 0 8 0 pvpl 32 676463 0 665589 235 143 92 126 0 265 2 pmappl 224 2980 0 2966 1 0 1 1 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 625 0 12 18 0 18 18 0 8 0