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(ffffffff81a5c5c4,ffff8000211d6a90,ffff80002109d530,ffff80000002f180) at __assert+0x24 sys/kern/subr_prf.c:155 _kernel_lock(ffff80002109d530,ffff8000211d2000) 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,ffff8000010d7000,ffffffffffffffff,0,9,ffff80002109d530) at alltraps_kern+0x7b ptsignal(1b5b,ffff80002109d530,ffff8000210ca658) at ptsignal+0x115 sys/kern/kern_sig.c:932 mi_switch() at mi_switch+0x1fb sys/kern/sched_bsd.c:392 sleep_finish(1,ffff8000211d6d20) at sleep_finish+0xd3 sys/kern/kern_synch.c:312 sleep_finish_all(ffff8000211d6d20,32) at sleep_finish_all+0x22 sleep_finish_timeout sys/kern/kern_synch.c:336 [inline] sleep_finish_all(ffff8000211d6d20,32) at sleep_finish_all+0x22 sys/kern/kern_synch.c:157 tsleep(ffff80002109d530,3,0,ffff8000210ca720) at tsleep+0x142 single_thread_set(ffff80002109d530,ffff80002109d530,0) at single_thread_set+0x26b single_thread_wait sys/kern/kern_sig.c:2039 [inline] single_thread_set(ffff80002109d530,ffff80002109d530,0) at single_thread_set+0x26b sys/kern/kern_sig.c:2030 exit1(ffff80002109d530,9,0) at exit1+0x84 sys/kern/kern_exit.c:137 end trace frame: 0xffff8000211d6ef0, 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{0}> ddb{0}> set $lines = 0 ddb{0}> 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{0}> 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(ffffffff81a5c5c4,ffff8000211d6a90,ffff80002109d530,ffff80000002f180) at __assert+0x24 sys/kern/subr_prf.c:155 _kernel_lock(ffff80002109d530,ffff8000211d2000) 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,ffff8000010d7000,ffffffffffffffff,0,9,ffff80002109d530) at alltraps_kern+0x7b ptsignal(1b5b,ffff80002109d530,ffff8000210ca658) at ptsignal+0x115 sys/kern/kern_sig.c:932 mi_switch() at mi_switch+0x1fb sys/kern/sched_bsd.c:392 sleep_finish(1,ffff8000211d6d20) at sleep_finish+0xd3 sys/kern/kern_synch.c:312 sleep_finish_all(ffff8000211d6d20,32) at sleep_finish_all+0x22 sleep_finish_timeout sys/kern/kern_synch.c:336 [inline] sleep_finish_all(ffff8000211d6d20,32) at sleep_finish_all+0x22 sys/kern/kern_synch.c:157 tsleep(ffff80002109d530,3,0,ffff8000210ca720) at tsleep+0x142 single_thread_set(ffff80002109d530,ffff80002109d530,0) at single_thread_set+0x26b single_thread_wait sys/kern/kern_sig.c:2039 [inline] single_thread_set(ffff80002109d530,ffff80002109d530,0) at single_thread_set+0x26b sys/kern/kern_sig.c:2030 exit1(ffff80002109d530,9,0) at exit1+0x84 sys/kern/kern_exit.c:137 postsig(100,ffff80002109d530) at postsig+0x408 sigexit sys/kern/kern_sig.c:1488 [inline] postsig(100,ffff80002109d530) 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,7caae5b3c00,53,0,7ca63533ee0) at Xsyscall+0x128 end of kernel end trace frame: 0x7ca9f5a5bf0, count: -18 ddb{0}> show registers rdi 0xffffffff81e3ea20 kprintf_mutex rsi 0xffffffff8134fa99 db_enter+0x9 rbp 0xffff8000211d69f0 rbx 0xffff8000211d6a90 rdx 0xffff8000010d7000 rcx 0x40d9 __ALIGN_SIZE+0x30d9 rax 0xffff8000010d7000 r8 0xffff8000211d69c0 r9 0x8080808080808080 r10 0xdbb3eff5b6367e4d r11 0xffffffff813f3500 copy_fault r12 0x3000000008 r13 0xffff8000211d6a00 r14 0x100 r15 0xffffffff81b817b1 cmd0646_9_tim_udma+0x21307 rip 0xffffffff8134fa9a db_enter+0xa cs 0x8 rflags 0x202 rsp 0xffff8000211d69f0 ss 0x10 db_enter+0xa: popq %rbp ddb{0}> show proc PROC (syz-executor0) pid=364746 stat=sleep flags process=1010 proc=4002000 pri=50, usrpri=86, nice=20 forw=0x0, list=0xffff80002109ce28,0xffffffff81ea84e8 process=0xffff8000210ca658 user=0xffff8000211d2000, vmspace=0xffffff00659cdc68 estcpu=36, cpticks=0, pctcpu=0.0 user=0, sys=0, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 51991 354 41739 65534 3 0x4081010 biowait syz-executor0 *51991 364746 41739 65534 3 0x4003010 suspend syz-executor0 91011 317536 55683 65534 2 0x10 syz-executor1 91011 262159 55683 65534 3 0x4000090 fsleep syz-executor1 91011 6678 55683 65534 3 0x4000090 nanosleep syz-executor1 41739 155674 51027 65534 3 0x90 nanosleep syz-executor0 51027 287175 63175 0 3 0x82 wait syz-executor0 55683 101236 61153 65534 3 0x90 nanosleep syz-executor1 61153 5371 63175 0 3 0x82 wait syz-executor1 62962 248743 0 0 3 0x14200 bored sosplice 63175 239424 81420 0 3 0x82 thrsleep syz-fuzzer 63175 22611 81420 0 3 0x4000082 thrsleep syz-fuzzer 63175 67470 81420 0 3 0x4000082 thrsleep syz-fuzzer 63175 442295 81420 0 3 0x4000082 thrsleep syz-fuzzer 63175 76509 81420 0 3 0x4000082 thrsleep syz-fuzzer 63175 424484 81420 0 3 0x4000082 thrsleep syz-fuzzer 63175 346439 81420 0 3 0x4000082 kqread syz-fuzzer 63175 57887 81420 0 3 0x4000082 thrsleep syz-fuzzer 63175 487665 81420 0 3 0x4000082 thrsleep syz-fuzzer 63175 212596 81420 0 3 0x4000082 thrsleep syz-fuzzer 63175 412744 81420 0 3 0x4000082 thrsleep syz-fuzzer 81420 345747 29036 0 3 0x10008a pause ksh 29036 461645 91559 0 3 0x92 select sshd 88986 372175 1 0 3 0x100083 ttyin getty 91559 456647 1 0 3 0x80 select sshd 30643 357164 43070 73 3 0x100090 kqread syslogd 43070 150560 1 0 3 0x100082 netio syslogd 61124 173683 1 77 3 0x100090 poll dhclient 58057 313226 1 0 3 0x80 poll dhclient 79395 474614 0 0 2 0x14200 zerothread 97323 172391 0 0 3 0x14200 aiodoned aiodoned 3663 276886 0 0 3 0x14200 syncer update 31569 253471 0 0 3 0x14200 cleaner cleaner 26215 486574 0 0 3 0x14200 reaper reaper 24539 443367 0 0 3 0x14200 pgdaemon pagedaemon 50703 439982 0 0 3 0x14200 bored crynlk 54835 371807 0 0 3 0x14200 bored crypto 54988 133596 0 0 3 0x40014200 acpi0 acpi0 3646 87246 0 0 3 0x40014200 idle1 82055 507703 0 0 3 0x14200 bored softnet 44133 355473 0 0 3 0x14200 bored systqmp 42058 467207 0 0 3 0x14200 bored systq 49427 187 0 0 3 0x40014200 bored softclock 4828 409720 0 0 3 0x40014200 idle0 1 228659 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper