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(ffffffff8111c7f4,ffff8000211a5220,ffff8000210a2e28,ffff800000038e80) at __assert+0x24 sys/kern/subr_prf.c:155 _kernel_lock(ffff8000210a2e28,ffff8000211a0000) 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,ffff8000044dd000,ffffffffffffffff,0,9,ffff8000210a2e28) at alltraps_kern+0x7b ptsignal(199b,ffff8000210a2e28,ffff8000210b6340) at ptsignal+0x115 sys/kern/kern_sig.c:932 mi_switch() at mi_switch+0x1fb sys/kern/sched_bsd.c:392 sleep_finish(1,ffff8000211a54b0) at sleep_finish+0xd3 sys/kern/kern_synch.c:312 sleep_finish_all(ffff8000211a54b0,32) at sleep_finish_all+0x22 sleep_finish_timeout sys/kern/kern_synch.c:336 [inline] sleep_finish_all(ffff8000211a54b0,32) at sleep_finish_all+0x22 sys/kern/kern_synch.c:157 tsleep(ffff8000210a2e28,3,0,ffff8000210b6408) at tsleep+0x142 single_thread_set(ffff8000210a2e28,ffff8000210a2e28,0) at single_thread_set+0x26b single_thread_wait sys/kern/kern_sig.c:2039 [inline] single_thread_set(ffff8000210a2e28,ffff8000210a2e28,0) at single_thread_set+0x26b sys/kern/kern_sig.c:2030 exit1(ffff8000210a2e28,9,0) at exit1+0x84 sys/kern/kern_exit.c:137 end trace frame: 0xffff8000211a5680, 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(ffffffff8111c7f4,ffff8000211a5220,ffff8000210a2e28,ffff800000038e80) at __assert+0x24 sys/kern/subr_prf.c:155 _kernel_lock(ffff8000210a2e28,ffff8000211a0000) 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,ffff8000044dd000,ffffffffffffffff,0,9,ffff8000210a2e28) at alltraps_kern+0x7b ptsignal(199b,ffff8000210a2e28,ffff8000210b6340) at ptsignal+0x115 sys/kern/kern_sig.c:932 mi_switch() at mi_switch+0x1fb sys/kern/sched_bsd.c:392 sleep_finish(1,ffff8000211a54b0) at sleep_finish+0xd3 sys/kern/kern_synch.c:312 sleep_finish_all(ffff8000211a54b0,32) at sleep_finish_all+0x22 sleep_finish_timeout sys/kern/kern_synch.c:336 [inline] sleep_finish_all(ffff8000211a54b0,32) at sleep_finish_all+0x22 sys/kern/kern_synch.c:157 tsleep(ffff8000210a2e28,3,0,ffff8000210b6408) at tsleep+0x142 single_thread_set(ffff8000210a2e28,ffff8000210a2e28,0) at single_thread_set+0x26b single_thread_wait sys/kern/kern_sig.c:2039 [inline] single_thread_set(ffff8000210a2e28,ffff8000210a2e28,0) at single_thread_set+0x26b sys/kern/kern_sig.c:2030 exit1(ffff8000210a2e28,9,0) at exit1+0x84 sys/kern/kern_exit.c:137 postsig(100,ffff8000210a2e28) at postsig+0x408 sigexit sys/kern/kern_sig.c:1488 [inline] postsig(100,ffff8000210a2e28) 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,b718b24ae00,53,0,b7188081de0) at Xsyscall+0x128 end of kernel end trace frame: 0xb71690091c0, count: -18 ddb{1}> show registers rdi 0xffffffff81e08fc0 kprintf_mutex rsi 0xffffffff812c1619 db_enter+0x9 rbp 0xffff8000211a5180 rbx 0xffff8000211a5220 rdx 0xffff8000044dd000 rcx 0x3fa2 __ALIGN_SIZE+0x2fa2 rax 0xffff8000044dd000 r8 0xffff8000211a5150 r9 0x8080808080808080 r10 0xd9447a21312aa87f r11 0xffffffff81b2b680 copy_fault r12 0x3000000008 r13 0xffff8000211a5190 r14 0x100 r15 0xffffffff81b7e6a6 cmd0646_9_tim_udma+0x1c34e rip 0xffffffff812c161a db_enter+0xa cs 0x8 rflags 0x202 rsp 0xffff8000211a5180 ss 0x10 db_enter+0xa: popq %rbp ddb{1}> show proc PROC (syz-executor1) pid=213872 stat=sleep flags process=1010 proc=4002000 pri=50, usrpri=82, nice=20 forw=0x0, list=0xffff8000210a39e0,0xffff8000210a2028 process=0xffff8000210b6340 user=0xffff8000211a0000, vmspace=0xffffff00659b6b60 estcpu=32, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND 67749 488583 1605 65534 2 0x10 syz-executor0 67749 160948 1605 65534 3 0x4000090 fsleep syz-executor0 67749 129425 1605 65534 3 0x4000090 fsleep syz-executor0 2722 126945 54840 65534 2 0x4081090 syz-executor1 * 2722 213872 54840 65534 3 0x4003010 suspend syz-executor1 54840 213989 41039 65534 3 0x90 nanosleep syz-executor1 41039 456076 74691 0 3 0x82 wait syz-executor1 1605 10770 24752 65534 3 0x90 nanosleep syz-executor0 24752 7343 74691 0 3 0x82 wait syz-executor0 26583 320381 0 0 3 0x14200 bored sosplice 74691 104843 37930 0 3 0x82 thrsleep syz-fuzzer 74691 520884 37930 0 3 0x4000082 thrsleep syz-fuzzer 74691 200779 37930 0 3 0x4000082 thrsleep syz-fuzzer 74691 521859 37930 0 3 0x4000082 thrsleep syz-fuzzer 74691 33041 37930 0 3 0x4000082 thrsleep syz-fuzzer 74691 431522 37930 0 3 0x4000082 thrsleep syz-fuzzer 74691 141256 37930 0 3 0x4000082 thrsleep syz-fuzzer 74691 39858 37930 0 3 0x4000082 thrsleep syz-fuzzer 74691 242667 37930 0 3 0x4000082 kqread syz-fuzzer 74691 91203 37930 0 3 0x4000082 thrsleep syz-fuzzer 37930 210588 81372 0 3 0x10008a pause ksh 81372 486409 29683 0 3 0x92 select sshd 75126 346847 1 0 3 0x100083 ttyin getty 29683 26040 1 0 3 0x80 select sshd 33470 173913 4481 73 3 0x100090 kqread syslogd 4481 397992 1 0 3 0x100082 netio syslogd 80716 315081 1 77 3 0x100090 poll dhclient 16250 798 1 0 3 0x80 poll dhclient 10590 484008 0 0 2 0x14200 zerothread 88645 356982 0 0 3 0x14200 aiodoned aiodoned 18244 485422 0 0 3 0x14200 syncer update 62122 95078 0 0 3 0x14200 cleaner cleaner 90916 475467 0 0 3 0x14200 reaper reaper 7614 313203 0 0 3 0x14200 pgdaemon pagedaemon 28977 253415 0 0 3 0x14200 bored crynlk 99175 501462 0 0 3 0x14200 bored crypto 43421 406557 0 0 3 0x40014200 acpi0 acpi0 76841 365598 0 0 3 0x40014200 idle1 50281 302759 0 0 3 0x14200 bored softnet 2322 484167 0 0 3 0x14200 bored systqmp 30161 21971 0 0 3 0x14200 bored systq 43361 344907 0 0 3 0x40014200 bored softclock 93006 243874 0 0 3 0x40014200 idle0 1 311694 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper