panic: kernel diagnostic assertion "!ISSET(p->p_flag, P_WSLEEP) || p->p_stat == SSTOP" failed: file "/syzkaller/managers/setuid/kernel/sys/kern/kern_sched.c", line 251 Stopped at db_enter+0x1c: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *313806 12754 32767 0x10 0 0K syz-executor.2 308809 21307 32767 0x10 0 1 syz-executor.1 db_enter() at db_enter+0x1c sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff82795727) at panic+0x17b sys/kern/subr_prf.c:198 __assert(ffffffff828166a3,ffffffff82763803,fb,ffffffff8283f2e0) at __assert+0x29 sys/kern/subr_prf.c:157 setrunqueue(ffff800020d58ff0,ffff800021236020,52) at setrunqueue+0x2e5 sys/kern/kern_sched.c:249 schedcpu(ffffffff82cf61e8) at schedcpu+0x28b sys/kern/sched_bsd.c:235 timeout_run(ffffffff82cf61e8) at timeout_run+0xd0 sys/kern/kern_timeout.c:638 softclock_process_tick_timeout(ffffffff82cf61e8,0) at softclock_process_tick_timeout+0x1b0 sys/kern/kern_timeout.c:685 softclock(0) at softclock+0x130 sys/kern/kern_timeout.c:708 softintr_dispatch(0) at softintr_dispatch+0xfb sys/arch/amd64/amd64/softintr.c:90 Xsoftclock() at Xsoftclock+0x23 end of kernel end trace frame: 0x7477ca179130, count: 5 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}> set $maxwidth = 0 ddb{0}> show panic *cpu0: kernel diagnostic assertion "!ISSET(p->p_flag, P_WSLEEP) || p->p_stat == SSTOP" failed: file "/syzkaller/managers/setuid/kernel/sys/kern/kern_sched.c", line 251 ddb{0}> trace db_enter() at db_enter+0x1c sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff82795727) at panic+0x17b sys/kern/subr_prf.c:198 __assert(ffffffff828166a3,ffffffff82763803,fb,ffffffff8283f2e0) at __assert+0x29 sys/kern/subr_prf.c:157 setrunqueue(ffff800020d58ff0,ffff800021236020,52) at setrunqueue+0x2e5 sys/kern/kern_sched.c:249 schedcpu(ffffffff82cf61e8) at schedcpu+0x28b sys/kern/sched_bsd.c:235 timeout_run(ffffffff82cf61e8) at timeout_run+0xd0 sys/kern/kern_timeout.c:638 softclock_process_tick_timeout(ffffffff82cf61e8,0) at softclock_process_tick_timeout+0x1b0 sys/kern/kern_timeout.c:685 softclock(0) at softclock+0x130 sys/kern/kern_timeout.c:708 softintr_dispatch(0) at softintr_dispatch+0xfb sys/arch/amd64/amd64/softintr.c:90 Xsoftclock() at Xsoftclock+0x23 end of kernel end trace frame: 0x7477ca179130, count: -10 ddb{0}> show registers rdi 0 rsi 0x1 rbp 0xffff8000256fd560 rbx 0xffffffff82b75b8f cpu_info_full_primary+0x2b8f rdx 0 rcx 0 rax 0xffff8000212362d8 r8 0x101010101010101 r9 0x8080808080808080 r10 0x2024e4da34a0970 r11 0x9a80ba514b2f3876 r12 0xffffffff82b75990 cpu_info_full_primary+0x2990 r13 0 r14 0 r15 0x1 rip 0xffffffff8225883c db_enter+0x1c cs 0x8 rflags 0x246 rsp 0xffff8000256fd550 ss 0 db_enter+0x1c: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor.2) pid=313806 stat=onproc flags process=10 proc=0 pri=74, usrpri=82, nice=20 forw=0xffffffffffffffff, list=0xffff800021236020,0xffff800021236858 process=0xffff8000ffff8c98 user=0xffff8000256f8000, vmspace=0xfffffd8069e59cd0 estcpu=32, cpticks=0, pctcpu=0.1 user=1, sys=0, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND *12754 313806 68507 32767 7 0x10 syz-executor.2 12754 333160 68507 32767 2 0x4000010 syz-executor.2 21307 308809 39330 32767 7 0x10 syz-executor.1 21307 458745 39330 32767 2 0x4000010 syz-executor.1 21307 498334 39330 32767 2 0x4000010 syz-executor.1 64191 56337 48156 32767 2 0x10 syz-executor.3 64191 178033 48156 32767 3 0x4000090 fsleep syz-executor.3 57539 125111 43824 32767 3 0x3810 suspend syz-executor.4 57539 353536 43824 32767 2 0x40818b0 syz-executor.4 27618 129565 9585 32767 2 0x10 syz-executor.0 9585 231939 49896 0 3 0x82 wait syz-executor.0 43824 371854 56126 32767 3 0x90 nanoslp syz-executor.4 56126 73554 49896 0 3 0x82 wait syz-executor.4 48156 288302 48637 32767 3 0x90 nanoslp syz-executor.3 48637 35865 49896 0 3 0x82 wait syz-executor.3 68507 483947 83603 32767 2 0x10 syz-executor.2 83603 316144 49896 0 3 0x82 wait syz-executor.2 39330 223566 77974 32767 3 0x90 nanoslp syz-executor.1 77974 41740 49896 0 3 0x82 wait syz-executor.1 40062 364152 17585 32767 2 0x10 syz-executor.6 17585 224274 49896 0 3 0x82 wait syz-executor.6 84146 462381 7127 32767 3 0x90 nanoslp syz-executor.7 7127 229809 49896 0 3 0x82 wait syz-executor.7 52605 83155 13780 32767 2 0x10 syz-executor.5 13780 189043 49896 0 3 0x82 wait syz-executor.5 29662 410431 0 0 3 0x14200 bored sosplice 49896 109825 28907 0 3 0x82 wait syz-fuzzer 49896 129905 28907 0 3 0x4000082 thrsleep syz-fuzzer 49896 98658 28907 0 3 0x4000082 wait syz-fuzzer 49896 380229 28907 0 3 0x4000082 thrsleep syz-fuzzer 49896 520543 28907 0 3 0x4000082 wait syz-fuzzer 49896 374613 28907 0 3 0x4000082 thrsleep syz-fuzzer 49896 1269 28907 0 3 0x4000082 thrsleep syz-fuzzer 49896 384393 28907 0 3 0x4000082 wait syz-fuzzer 49896 396189 28907 0 3 0x4000082 thrsleep syz-fuzzer 49896 4016 28907 0 3 0x4000082 wait syz-fuzzer 49896 291823 28907 0 3 0x4000082 thrsleep syz-fuzzer 49896 220824 28907 0 3 0x4000082 wait syz-fuzzer 49896 378910 28907 0 3 0x4000082 kqread syz-fuzzer 49896 11971 28907 0 3 0x4000082 wait syz-fuzzer 49896 344619 28907 0 3 0x4000082 wait syz-fuzzer 49896 323829 28907 0 3 0x4000082 thrsleep syz-fuzzer 28907 388772 98926 0 3 0x10008a sigsusp ksh 98926 377360 50753 0 3 0x9a kqread sshd 96855 222167 1 0 3 0x100083 ttyin getty 50753 351576 1 0 3 0x88 kqread sshd 70418 46075 38229 73 3 0x1100090 kqread syslogd 38229 495451 1 0 3 0x100082 netio syslogd 25060 493615 1 0 3 0x100080 kqread resolvd 70366 344473 36977 77 3 0x100092 kqread dhcpleased 16760 436570 36977 77 3 0x100092 kqread dhcpleased 36977 461973 1 0 3 0x80 kqread dhcpleased 87257 198463 0 0 3 0x14200 bored smr 43289 67313 0 0 2 0x14200 zerothread 58137 37133 0 0 3 0x14200 aiodoned aiodoned 28589 516935 0 0 3 0x14200 syncer update 44456 229124 0 0 3 0x14200 cleaner cleaner 5786 4493 0 0 3 0x14200 reaper reaper 21924 34667 0 0 3 0x14200 pgdaemon pagedaemon 17942 502241 0 0 3 0x14200 bored viomb 14382 371656 0 0 3 0x40014200 acpi0 acpi0 45372 2081 0 0 3 0x40014200 idle1 64358 201135 0 0 3 0x14200 bored softnet3 83653 444440 0 0 3 0x14200 bored softnet2 15203 223729 0 0 3 0x14200 bored softnet1 71514 483312 0 0 3 0x14200 bored softnet0 13556 57665 0 0 3 0x14200 bored systqmp 94350 342998 0 0 3 0x14200 bored systq 36878 54266 0 0 3 0x40014200 bored softclock 82274 188308 0 0 3 0x40014200 idle0 1 42448 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks CPU 0: exclusive sched_lock &sched_lock r = 0 (0xffffffff82cf61a0) #0 witness_lock+0x447 #1 schedcpu+0x119 sys/kern/sched_bsd.c:218 #2 timeout_run+0xd0 sys/kern/kern_timeout.c:638 #3 softclock_process_tick_timeout+0x1b0 sys/kern/kern_timeout.c:685 #4 softclock+0x130 sys/kern/kern_timeout.c:708 #5 softintr_dispatch+0xfb sys/arch/amd64/amd64/softintr.c:90 #6 Xsoftclock+0x23 shared mutex timeout r = 0 (0xffffffff82c2e168) #0 witness_lock+0x447 #1 timeout_run+0xbb sys/kern/kern_timeout.c:634 #2 softclock_process_tick_timeout+0x1b0 sys/kern/kern_timeout.c:685 #3 softclock+0x130 sys/kern/kern_timeout.c:708 #4 softintr_dispatch+0xfb sys/arch/amd64/amd64/softintr.c:90 #5 Xsoftclock+0x23 Process 12754 (syz-executor.2) thread 0xffff8000212362d8 (313806) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff82cff1d8) #0 witness_lock+0x447 #1 softintr_dispatch+0x52 sys/arch/amd64/amd64/softintr.c:88 #2 Xsoftclock+0x23 exclusive sched_lock &sched_lock r = 0 (0xffffffff82cf61a0) #0 witness_lock+0x447 #1 schedcpu+0x119 sys/kern/sched_bsd.c:218 #2 timeout_run+0xd0 sys/kern/kern_timeout.c:638 #3 softclock_process_tick_timeout+0x1b0 sys/kern/kern_timeout.c:685 #4 softclock+0x130 sys/kern/kern_timeout.c:708 #5 softintr_dispatch+0xfb sys/arch/amd64/amd64/softintr.c:90 #6 Xsoftclock+0x23 shared mutex timeout r = 0 (0xffffffff82c2e168) #0 witness_lock+0x447 #1 timeout_run+0xbb sys/kern/kern_timeout.c:634 #2 softclock_process_tick_timeout+0x1b0 sys/kern/kern_timeout.c:685 #3 softclock+0x130 sys/kern/kern_timeout.c:708 #4 softintr_dispatch+0xfb sys/arch/amd64/amd64/softintr.c:90 #5 Xsoftclock+0x23 ddb{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 10221 6413K 6419K 78643K 11604 0 pcb 13 16K 18K 78643K 19 0 rtable 244 6K 7K 78643K 3937 0 pf 29 8K 8K 78643K 231 0 ifaddr 44 16K 16K 78643K 456 0 ifgroup 50 2K 2K 78643K 454 0 sysctl 3 1K 5K 78643K 146 0 counters 60 35K 35K 78643K 262 0 ioctlops 0 0K 2K 78643K 918 0 iov 0 0K 32K 78643K 5142 0 mount 1 1K 1K 78643K 1 0 log 0 0K 0K 78643K 4 0 vnodes 1279 80K 80K 78643K 12314 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 9K 78643K 932 0 VM map 2 1K 1K 78643K 2 0 sem 12 0K 0K 78643K 4468 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1697 195K 286K 78643K 12548 0 file desc 22 81K 117K 78643K 54897 0 sigio 0 0K 0K 78643K 1384 0 proc 56 78K 115K 78643K 6230 0 subproc 104 6K 6K 78643K 1417 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 ip_moptions 0 0K 0K 78643K 2647 0 in_multi 99 7K 7K 78643K 1515 0 ether_multi 1 0K 0K 78643K 26 0 mrt 1 0K 0K 78643K 2 0 ISOFS mount 1 32K 32K 78643K 1 0 MSDOSFS mount 1 16K 16K 78643K 1 0 ttys 319 1420K 1420K 78643K 319 0 exec 0 0K 1K 78643K 11466 0 tdb 3 0K 0K 78643K 3 0 pagedep 1 8K 8K 78643K 1 0 inodedep 1 32K 32K 78643K 1 0 newblk 1 0K 0K 78643K 1 0 VM swap 8 62K 64K 78643K 10 0 UVM amap 479 89K 115K 78643K 536862 0 UVM aobj 131 4K 6K 78643K 138 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 1327 0 NDP 11 0K 2K 78643K 330 0 temp 74 5872K 6000K 78643K 136161 0 kqueue 12 18K 28K 78643K 5313 0 SYN cache 2 16K 16K 78643K 2 0 ddb{0}> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle plcache 128 22 0 0 1 0 1 1 0 8 0 rtpcb 120 1171 0 1168 9 8 1 3 0 8 0 rtentry 112 1296 0 1181 4 0 4 4 0 8 0 unpcb 144 39878 0 39865 354 353 1 10 0 8 0 syncache 296 370 0 370 78 78 0 1 0 8 0 sackhl 24 1 0 1 1 1 0 1 0 8 0 tcpqe 32 272 0 272 52 52 0 1 0 8 0 tcpcb 808 15206 0 15202 493 489 4 14 0 8 3 arp 120 220 0 202 1 0 1 1 0 8 0 ipq 40 139 0 138 34 33 1 1 0 8 0 ipqe 40 797 0 796 34 33 1 1 0 8 0 inpcb 368 57905 0 57898 900 893 7 23 0 8 6 nd6 136 401 0 372 4 2 2 2 0 8 0 kcovpl 48 109 0 101 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 5125 0 4654 38 7 31 32 0 8 0 art_table 32 5126 0 4654 5 0 5 5 0 8 0 art_node 16 1295 0 1190 1 0 1 1 0 8 0 semapl 112 4466 0 4456 1 0 1 1 0 8 0 shmpl 112 135 0 7 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 72406 0 70857 98 0 98 98 0 8 0 ffsino 272 72406 0 70857 104 0 104 104 0 8 0 nchpl 144 143911 0 142269 63 0 63 63 0 8 0 uvmvnodes 80 5926 0 0 121 0 121 121 0 8 0 vnodes 216 5926 0 0 330 0 330 330 0 8 0 namei 1024 486962 0 486962 8 7 1 2 0 8 1 percpumem 16 144 0 101 1 0 1 1 0 8 0 kstatmem 264 224 0 202 2 0 2 2 0 8 0 scxspl 216 422304 0 422304 207 206 1 8 0 8 1 plimitpl 152 7595 0 7571 73 71 2 2 0 8 1 sigapl 424 54977 0 54924 8 1 7 7 0 8 0 futexpl 64 416618 0 416616 6 5 1 1 0 8 0 knotepl 120 2257 0 0 22 11 11 18 0 8 0 kqueuepl 216 59434 0 59426 519 514 5 14 0 8 4 pipepl 320 14057 0 14029 339 333 6 13 0 8 3 fdescpl 496 54959 0 54926 7 2 5 6 0 8 0 filepl 152 393761 0 393527 617 603 14 23 0 8 4 lockfpl 104 10948 0 10946 7 6 1 2 0 8 0 lockfspl 48 3259 0 3257 1 0 1 1 0 8 0 sessionpl 144 124 0 108 1 0 1 1 0 8 0 pgrppl 48 7035 0 7019 1 0 1 1 0 8 0 ucredpl 104 53406 0 53388 1 0 1 1 0 8 0 zombiepl 144 54927 0 54924 5 4 1 1 0 8 0 processpl 1072 54977 0 54924 4 0 4 4 0 8 0 procpl 696 151508 0 151435 54 46 8 9 0 8 0 sosppl 168 6052 0 6052 41 40 1 1 0 8 1 sockpl 488 101156 0 101133 2191 2179 12 37 0 8 9 mcl64k 65536 82 0 0 5 2 3 3 0 8 0 mcl16k 16384 85 0 0 3 0 3 3 0 8 0 mcl12k 12288 55 0 0 2 0 2 2 0 8 0 mcl9k 9216 99 0 0 6 2 4 6 0 8 0 mcl8k 8192 105 0 0 9 6 3 5 0 8 0 mcl4k 4096 49 0 0 5 2 3 3 0 8 0 mcl2k2 2112 15 0 0 1 0 1 1 0 8 0 mcl2k 2048 883 0 0 40 30 10 34 0 8 0 mtagpl 96 9 0 0 1 0 1 1 0 8 0 mbufpl 256 3457 0 0 136 1 135 135 0 8 0 bufpl 288 94220 0 87905 452 0 452 452 0 8 0 anonpl 24 5352722 0 5342481 286 192 94 114 0 186 0 amapchunkpl 152 1716689 0 1715895 384 349 35 51 0 158 0 amappl16 200 123319 0 123088 706 683 23 40 0 8 6 amappl15 192 14 0 14 2 2 0 1 0 8 0 amappl14 184 569 0 555 2 1 1 2 0 8 0 amappl13 176 56 0 55 18 17 1 1 0 8 0 amappl12 168 57186 0 57147 3 0 3 3 0 8 0 amappl11 160 58 0 47 1 0 1 1 0 8 0 amappl10 152 337 0 318 1 0 1 1 0 8 0 amappl9 144 640 0 640 90 90 0 2 0 8 0 amappl8 136 3676 0 3347 12 0 12 12 0 8 0 amappl7 128 290 0 269 1 0 1 1 0 8 0 amappl6 120 1298 0 1268 2 1 1 2 0 8 0 amappl5 112 1638 0 1631 1 0 1 1 0 8 0 amappl4 104 2868 0 2820 2 0 2 2 0 8 0 amappl3 96 330700 0 330610 29 26 3 4 0 8 0 amappl2 88 56952 0 56861 5 2 3 3 0 8 0 amappl1 80 203630 0 203108 22 10 12 22 0 8 0 amappl 88 533351 0 533118 10 3 7 7 0 92 0 dma4096 4096 1 0 1 1 1 0 1 0 8 0 dma1024 1024 1 0 0 1 0 1 1 0 8 0 dma256 256 6 0 6 1 1 0 1 0 8 0 dma128 128 253 0 253 1 1 0 1 0 8 0 dma64 64 6 0 6 1 1 0 1 0 8 0 dma32 32 7 0 7 1 1 0 1 0 8 0 dma16 16 18 0 17 1 0 1 1 0 8 0 aobjpl 72 137 0 7 3 0 3 3 0 8 0 uaddrrnd 24 54959 0 54926 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 54959 0 54926 1 0 1 1 0 8 0 vmmpekpl 168 419840 0 419780 4 0 4 4 0 8 0 vmmpepl 168 3175542 0 3173031 381 244 137 147 0 357 1 vmsppl 464 54958 0 54926 7 2 5 6 0 8 0 rwobjpl 56 774598 0 767004 120 8 112 113 0 8 0 pdppl 4096 109926 0 109852 1672 1590 82 92 0 8 8 pvpl 32 14664003 0 14647789 912 739 173 336 0 265 3 pmappl 248 54958 0 54926 4 1 3 3 0 8 0 extentpl 40 56 0 38 1 0 1 1 0 8 0 phpool 112 3970 0 3029 28 0 28 28 0 8 0 ddb{0}> machine ddbcpu 0 Invalid cpu 0 ddb{0}> trace db_enter() at db_enter+0x1c sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff82795727) at panic+0x17b sys/kern/subr_prf.c:198 __assert(ffffffff828166a3,ffffffff82763803,fb,ffffffff8283f2e0) at __assert+0x29 sys/kern/subr_prf.c:157 setrunqueue(ffff800020d58ff0,ffff800021236020,52) at setrunqueue+0x2e5 sys/kern/kern_sched.c:249 schedcpu(ffffffff82cf61e8) at schedcpu+0x28b sys/kern/sched_bsd.c:235 timeout_run(ffffffff82cf61e8) at timeout_run+0xd0 sys/kern/kern_timeout.c:638 softclock_process_tick_timeout(ffffffff82cf61e8,0) at softclock_process_tick_timeout+0x1b0 sys/kern/kern_timeout.c:685 softclock(0) at softclock+0x130 sys/kern/kern_timeout.c:708 softintr_dispatch(0) at softintr_dispatch+0xfb sys/arch/amd64/amd64/softintr.c:90 Xsoftclock() at Xsoftclock+0x23 end of kernel end trace frame: 0x7477ca179130, count: -10 ddb{0}> machine ddbcpu 1 Stopped at x86_ipi_db+0x1e: addq $0x8,%rsp x86_ipi_db(ffff800020d58ff0) at x86_ipi_db+0x1e sys/arch/amd64/amd64/db_interface.c:393 x86_ipi_handler() at x86_ipi_handler+0xb7 sys/arch/amd64/amd64/ipi.c:106 Xresume_lapic_ipi() at Xresume_lapic_ipi+0x23 end of kernel end trace frame: 0x7c705df07660, count: 12 ddb{1}> trace x86_ipi_db(ffff800020d58ff0) at x86_ipi_db+0x1e sys/arch/amd64/amd64/db_interface.c:393 x86_ipi_handler() at x86_ipi_handler+0xb7 sys/arch/amd64/amd64/ipi.c:106 Xresume_lapic_ipi() at Xresume_lapic_ipi+0x23 end of kernel end trace frame: 0x7c705df07660, count: -3