panic: kernel diagnostic assertion "__mp_lock_held(&sched_lock, curcpu()) == 0" failed: file "/syzkaller/managers/setuid/kernel/sys/kern/kern_lock.c", line 63 Stopped at db_enter+0xa: popq %rbp TID PID UID PRFLAGS PFLAGS CPU COMMAND db_enter() at db_enter+0xa sys/arch/amd64/amd64/db_interface.c:399 panic() at panic+0x147 sys/kern/subr_prf.c:208 __assert(ffffffff81855074,ffff8000211e0d40,ffff8000210a2270,ffff800000038e80) at __assert+0x24 sys/kern/subr_prf.c:155 _kernel_lock(ffff8000210a2270,ffff8000211dc000) at _kernel_lock+0x125 sys/kern/kern_lock.c:63 pageflttrap() at pageflttrap+0x6c sys/arch/amd64/amd64/trap.c:163 kerntrap(9) at kerntrap+0x8d sys/arch/amd64/amd64/trap.c:294 alltraps_kern(6,ffff800000cd7000,ffffffffffffffff,0,9,ffff8000210a2270) at alltraps_kern+0x7b ptsignal(1e11,ffff8000210a2270,ffff8000210b7630) at ptsignal+0x115 sys/kern/kern_sig.c:932 mi_switch() at mi_switch+0x1fb sys/kern/sched_bsd.c:392 sleep_finish(1,ffff8000211e0fd0) at sleep_finish+0xd3 sys/kern/kern_synch.c:312 sleep_finish_all(ffff8000211e0fd0,32) at sleep_finish_all+0x22 sleep_finish_timeout sys/kern/kern_synch.c:336 [inline] sleep_finish_all(ffff8000211e0fd0,32) at sleep_finish_all+0x22 sys/kern/kern_synch.c:157 tsleep(ffff8000210a2270,3,0,ffff8000210b76f8) at tsleep+0x142 single_thread_set(ffff8000210a2270,ffff8000210a2270,0) at single_thread_set+0x26b single_thread_wait sys/kern/kern_sig.c:2039 [inline] single_thread_set(ffff8000210a2270,ffff8000210a2270,0) at single_thread_set+0x26b sys/kern/kern_sig.c:2030 exit1(ffff8000210a2270,9,0) at exit1+0x84 sys/kern/kern_exit.c:137 end trace frame: 0xffff8000211e11a0, count: 0 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{1}> ddb{1}> set $lines = 0 ddb{1}> show panic kernel diagnostic assertion "__mp_lock_held(&sched_lock, curcpu()) == 0" failed: file "/syzkaller/managers/setuid/kernel/sys/kern/kern_lock.c", line 63 ddb{1}> trace db_enter() at db_enter+0xa sys/arch/amd64/amd64/db_interface.c:399 panic() at panic+0x147 sys/kern/subr_prf.c:208 __assert(ffffffff81855074,ffff8000211e0d40,ffff8000210a2270,ffff800000038e80) at __assert+0x24 sys/kern/subr_prf.c:155 _kernel_lock(ffff8000210a2270,ffff8000211dc000) at _kernel_lock+0x125 sys/kern/kern_lock.c:63 pageflttrap() at pageflttrap+0x6c sys/arch/amd64/amd64/trap.c:163 kerntrap(9) at kerntrap+0x8d sys/arch/amd64/amd64/trap.c:294 alltraps_kern(6,ffff800000cd7000,ffffffffffffffff,0,9,ffff8000210a2270) at alltraps_kern+0x7b ptsignal(1e11,ffff8000210a2270,ffff8000210b7630) at ptsignal+0x115 sys/kern/kern_sig.c:932 mi_switch() at mi_switch+0x1fb sys/kern/sched_bsd.c:392 sleep_finish(1,ffff8000211e0fd0) at sleep_finish+0xd3 sys/kern/kern_synch.c:312 sleep_finish_all(ffff8000211e0fd0,32) at sleep_finish_all+0x22 sleep_finish_timeout sys/kern/kern_synch.c:336 [inline] sleep_finish_all(ffff8000211e0fd0,32) at sleep_finish_all+0x22 sys/kern/kern_synch.c:157 tsleep(ffff8000210a2270,3,0,ffff8000210b76f8) at tsleep+0x142 single_thread_set(ffff8000210a2270,ffff8000210a2270,0) at single_thread_set+0x26b single_thread_wait sys/kern/kern_sig.c:2039 [inline] single_thread_set(ffff8000210a2270,ffff8000210a2270,0) at single_thread_set+0x26b sys/kern/kern_sig.c:2030 exit1(ffff8000210a2270,9,0) at exit1+0x84 sys/kern/kern_exit.c:137 postsig(100,ffff8000210a2270) at postsig+0x408 sigexit sys/kern/kern_sig.c:1488 [inline] postsig(100,ffff8000210a2270) at postsig+0x408 sys/kern/kern_sig.c:1420 userret(530) at userret+0x11b sys/kern/kern_sig.c:1870 syscall(0) at syscall+0x52f mi_syscall_return sys/sys/syscall_mi.h:122 [inline] syscall(0) at syscall+0x52f sys/arch/amd64/amd64/trap.c:605 Xsyscall(6,58,b2b02bee000,53,0,b2b408cdfa0) at Xsyscall+0x128 end of kernel end trace frame: 0xb2b42c38cf0, count: -18 ddb{1}> show registers rdi 0xffffffff81e3b668 kprintf_mutex rsi 0xffffffff81a60ce9 db_enter+0x9 rbp 0xffff8000211e0ca0 rbx 0xffff8000211e0d40 rdx 0xffff800000cd7000 rcx 0x3f9e __ALIGN_SIZE+0x2f9e rax 0xffff800000cd7000 r8 0xffff8000211e0c70 r9 0x8080808080808080 r10 0xb71f7d1f54f59824 r11 0xffffffff8164ec90 copy_fault r12 0x3000000008 r13 0xffff8000211e0cb0 r14 0x100 r15 0xffffffff81b81c87 cmd0646_9_tim_udma+0x21d76 rip 0xffffffff81a60cea db_enter+0xa cs 0x8 rflags 0x202 rsp 0xffff8000211e0ca0 ss 0x10 db_enter+0xa: popq %rbp ddb{1}> show proc PROC (syz-executor0) pid=125611 stat=sleep flags process=1010 proc=4002000 pri=50, usrpri=86, nice=20 forw=0x0, list=0xffff800021085520,0xffffffff81e9ce40 process=0xffff8000210b7630 user=0xffff8000211dc000, vmspace=0xffffff007f124c60 estcpu=36, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 31018 278244 25580 65534 2 0x10 syz-executor1 31018 68443 25580 65534 3 0x4000090 fsleep syz-executor1 31018 384742 25580 65534 2 0x4000010 syz-executor1 57361 443892 64031 65534 2 0x4081090 syz-executor0 *57361 125611 64031 65534 3 0x4003010 suspend syz-executor0 25580 318832 57476 65534 3 0x90 nanosleep syz-executor1 57476 485405 95054 0 3 0x82 wait syz-executor1 64031 464938 63379 65534 3 0x90 nanosleep syz-executor0 63379 11340 95054 0 3 0x82 wait syz-executor0 55206 17234 0 0 3 0x14200 bored sosplice 95054 352473 94212 0 3 0x82 thrsleep syz-fuzzer 95054 351808 94212 0 3 0x4000082 nanosleep syz-fuzzer 95054 273212 94212 0 3 0x4000082 thrsleep syz-fuzzer 95054 497808 94212 0 3 0x4000082 thrsleep syz-fuzzer 95054 16552 94212 0 3 0x4000082 thrsleep syz-fuzzer 95054 414098 94212 0 3 0x4000082 thrsleep syz-fuzzer 95054 153115 94212 0 3 0x4000082 thrsleep syz-fuzzer 95054 28442 94212 0 3 0x4000082 kqread syz-fuzzer 95054 19648 94212 0 3 0x4000082 thrsleep syz-fuzzer 95054 229334 94212 0 3 0x4000082 thrsleep syz-fuzzer 95054 325585 94212 0 3 0x4000082 thrsleep syz-fuzzer 95054 223203 94212 0 3 0x4000082 thrsleep syz-fuzzer 94212 135480 1811 0 3 0x10008a pause ksh 1811 432466 5631 0 3 0x92 select sshd 62992 105111 1 0 3 0x100083 ttyin getty 5631 86790 1 0 3 0x80 select sshd 15094 10535 14007 73 3 0x100090 kqread syslogd 14007 264835 1 0 3 0x100082 netio syslogd 38881 372602 1 77 3 0x100090 poll dhclient 67473 133201 1 0 3 0x80 poll dhclient 82272 258767 0 0 2 0x14200 zerothread 43533 491950 0 0 3 0x14200 aiodoned aiodoned 74322 402270 0 0 3 0x14200 syncer update 82995 220547 0 0 3 0x14200 cleaner cleaner 79019 491562 0 0 3 0x14200 reaper reaper 99070 29113 0 0 3 0x14200 pgdaemon pagedaemon 57135 195059 0 0 3 0x14200 bored crynlk 92225 416353 0 0 3 0x14200 bored crypto 50185 130639 0 0 3 0x40014200 acpi0 acpi0 85608 115659 0 0 3 0x40014200 idle1 41908 59598 0 0 3 0x14200 bored softnet 6144 277825 0 0 3 0x14200 bored systqmp 9993 73977 0 0 3 0x14200 bored systq 499 304408 0 0 3 0x40014200 bored softclock 57241 373106 0 0 3 0x40014200 idle0 1 292407 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper