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 265 Stopped at db_enter+0x1c: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND 417178 10712 32767 0x10 0 1 syz-executor.4 * 94183 16285 32767 0x10 0 0K syz-executor.5 db_enter() at db_enter+0x1c sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff82795f60) at panic+0x17b sys/kern/subr_prf.c:198 __assert(ffffffff82818072,ffffffff827667dc,109,ffffffff82842042) at __assert+0x29 sys/kern/subr_prf.c:157 setrunqueue(ffffffff82babff0,ffff8000212a62e8,51) at setrunqueue+0x2e5 sys/kern/kern_sched.c:263 schedcpu(ffffffff82c681d8) at schedcpu+0x28b sys/kern/sched_bsd.c:236 timeout_run(ffffffff82c681d8) at timeout_run+0xd0 sys/kern/kern_timeout.c:640 softclock_process_tick_timeout(ffffffff82c681d8,0) at softclock_process_tick_timeout+0x1b0 sys/kern/kern_timeout.c:687 softclock(0) at softclock+0x130 sys/kern/kern_timeout.c:710 softintr_dispatch(0) at softintr_dispatch+0xfb sys/arch/amd64/amd64/softintr.c:90 Xsoftclock() at Xsoftclock+0x27 end of kernel end trace frame: 0x7a72406ce3e0, 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 265 ddb{0}> trace db_enter() at db_enter+0x1c sys/arch/amd64/amd64/db_interface.c:437 panic(ffffffff82795f60) at panic+0x17b sys/kern/subr_prf.c:198 __assert(ffffffff82818072,ffffffff827667dc,109,ffffffff82842042) at __assert+0x29 sys/kern/subr_prf.c:157 setrunqueue(ffffffff82babff0,ffff8000212a62e8,51) at setrunqueue+0x2e5 sys/kern/kern_sched.c:263 schedcpu(ffffffff82c681d8) at schedcpu+0x28b sys/kern/sched_bsd.c:236 timeout_run(ffffffff82c681d8) at timeout_run+0xd0 sys/kern/kern_timeout.c:640 softclock_process_tick_timeout(ffffffff82c681d8,0) at softclock_process_tick_timeout+0x1b0 sys/kern/kern_timeout.c:687 softclock(0) at softclock+0x130 sys/kern/kern_timeout.c:710 softintr_dispatch(0) at softintr_dispatch+0xfb sys/arch/amd64/amd64/softintr.c:90 Xsoftclock() at Xsoftclock+0x27 end of kernel end trace frame: 0x7a72406ce3e0, count: -10 ddb{0}> show registers rdi 0 rsi 0x1 rbp 0xffff8000295c91e0 rbx 0xffffffff82bacb8f cpu_info_full_primary+0x2b8f rdx 0 rcx 0xffff8000212c58b0 rax 0xffffffff82babff0 cpu_info_full_primary+0x1ff0 r8 0x101010101010101 r9 0x8080808080808080 r10 0x1827ddf62ffd377d r11 0x944a88c3cf17c887 r12 0xffffffff82bac990 cpu_info_full_primary+0x2990 r13 0 r14 0 r15 0x1 rip 0xffffffff82441aec db_enter+0x1c cs 0x8 rflags 0x246 rsp 0xffff8000295c91d0 ss 0 db_enter+0x1c: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor.5) pid=94183 stat=onproc flags process=10 proc=0 pri=79, usrpri=86, nice=20 forw=0xffffffffffffffff, list=0xffff800021271078,0xffff8000212c5b78 process=0xffff80002957c018 user=0xffff8000295c4000, vmspace=0xfffffd8008a063a0 estcpu=36, cpticks=2, pctcpu=0.0 user=1, sys=0, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND 10712 417178 9360 32767 7 0x10 syz-executor.4 10712 2078 9360 32767 3 0x4000090 netcon2 syz-executor.4 48296 225610 91515 32767 2 0x10 syz-executor.2 48296 355240 91515 32767 3 0x4000090 fsleep syz-executor.2 18811 68462 64525 32767 3 0x3810 suspend syz-executor.7 18811 287004 64525 32767 2 0x40818b0 syz-executor.7 *16285 94183 36248 32767 7 0x10 syz-executor.5 16285 519728 36248 32767 3 0x4000090 fsleep syz-executor.5 16285 477655 36248 32767 2 0x4000010 syz-executor.5 4736 136737 88969 32767 2 0x10 syz-executor.1 4736 122684 88969 32767 3 0x4000090 fsleep syz-executor.1 83394 189689 26928 32767 2 0x10 syz-executor.0 83394 234425 26928 32767 3 0x4000090 fsleep syz-executor.0 2156 387255 62942 32767 2 0x10 syz-executor.3 2156 18746 62942 32767 3 0x4000090 fsleep syz-executor.3 26928 273617 6188 32767 3 0x90 nanoslp syz-executor.0 6188 341780 83382 0 3 0x82 wait syz-executor.0 36248 326760 83783 32767 3 0x90 nanoslp syz-executor.5 83783 473089 83382 0 3 0x82 wait syz-executor.5 45704 517128 50982 32767 3 0x90 nanoslp syz-executor.6 50982 244438 83382 0 3 0x82 wait syz-executor.6 91515 225847 90396 32767 3 0x90 nanoslp syz-executor.2 90396 189516 83382 0 3 0x82 wait syz-executor.2 85454 190648 0 0 3 0x14200 bored sosplice 64525 155624 29411 32767 3 0x90 nanoslp syz-executor.7 29411 461950 83382 0 3 0x82 wait syz-executor.7 9360 399636 55630 32767 3 0x90 nanoslp syz-executor.4 55630 188093 83382 0 3 0x82 wait syz-executor.4 62942 139694 40208 32767 3 0x90 nanoslp syz-executor.3 40208 291669 83382 0 3 0x82 wait syz-executor.3 88969 246857 29952 32767 3 0x90 nanoslp syz-executor.1 29952 433625 83382 0 3 0x82 wait syz-executor.1 83382 155361 84947 0 3 0x82 wait syz-fuzzer 83382 256102 84947 0 3 0x4000082 thrsleep syz-fuzzer 83382 391416 84947 0 3 0x4000082 wait syz-fuzzer 83382 513932 84947 0 3 0x4000082 thrsleep syz-fuzzer 83382 482029 84947 0 3 0x4000082 wait syz-fuzzer 83382 451210 84947 0 3 0x4000082 kqread syz-fuzzer 83382 517745 84947 0 3 0x4000082 thrsleep syz-fuzzer 83382 481533 84947 0 3 0x4000082 thrsleep syz-fuzzer 83382 67058 84947 0 3 0x4000082 wait syz-fuzzer 83382 429198 84947 0 3 0x4000082 wait syz-fuzzer 83382 300998 84947 0 3 0x4000082 wait syz-fuzzer 83382 177410 84947 0 3 0x4000082 thrsleep syz-fuzzer 83382 363909 84947 0 3 0x4000082 thrsleep syz-fuzzer 83382 226431 84947 0 3 0x4000082 wait syz-fuzzer 83382 116097 84947 0 3 0x4000082 wait syz-fuzzer 84947 462370 99998 0 3 0x10008a sigsusp ksh 99998 242315 90615 0 3 0x9a kqread sshd 54940 43727 1 0 3 0x100083 ttyin getty 90615 152216 1 0 3 0x88 kqread sshd 91754 260703 13639 73 3 0x1100090 kqread syslogd 13639 116709 1 0 3 0x100082 netio syslogd 68335 133696 1 0 3 0x100080 kqread resolvd 43048 137807 94863 77 3 0x100092 kqread dhcpleased 37983 296682 94863 77 3 0x100092 kqread dhcpleased 94863 438413 1 0 3 0x80 kqread dhcpleased 39747 126611 0 0 3 0x14200 bored smr 58566 520290 0 0 2 0x14200 zerothread 93668 190161 0 0 3 0x14200 aiodoned aiodoned 28552 324666 0 0 3 0x14200 syncer update 50277 85825 0 0 3 0x14200 cleaner cleaner 55417 38508 0 0 3 0x14200 reaper reaper 1785 53870 0 0 3 0x14200 pgdaemon pagedaemon 28284 484262 0 0 3 0x14200 bored viomb 87119 481341 0 0 3 0x40014200 acpi0 acpi0 95620 515868 0 0 3 0x40014200 idle1 28443 199696 0 0 3 0x14200 bored softnet3 67437 113374 0 0 3 0x14200 bored softnet2 65390 444632 0 0 3 0x14200 bored softnet1 90917 358448 0 0 3 0x14200 bored softnet0 97729 47357 0 0 3 0x14200 bored systqmp 83899 362272 0 0 3 0x14200 bored systq 1108 158539 0 0 3 0x40014200 bored softclock 31331 131242 0 0 3 0x40014200 idle0 1 119993 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 (0xffffffff82c68190) #0 witness_lock+0x447 #1 schedcpu+0x119 sys/kern/sched_bsd.c:219 #2 timeout_run+0xd0 sys/kern/kern_timeout.c:640 #3 softclock_process_tick_timeout+0x1b0 sys/kern/kern_timeout.c:687 #4 softclock+0x130 sys/kern/kern_timeout.c:710 #5 softintr_dispatch+0xfb sys/arch/amd64/amd64/softintr.c:90 #6 Xsoftclock+0x27 shared mutex timeout r = 0 (0xffffffff82b9e3a0) #0 witness_lock+0x447 #1 timeout_run+0xbb sys/kern/kern_timeout.c:636 #2 softclock_process_tick_timeout+0x1b0 sys/kern/kern_timeout.c:687 #3 softclock+0x130 sys/kern/kern_timeout.c:710 #4 softintr_dispatch+0xfb sys/arch/amd64/amd64/softintr.c:90 #5 Xsoftclock+0x27 Process 16285 (syz-executor.5) thread 0xffff8000212c58b0 (94183) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff82c4aae8) #0 witness_lock+0x447 #1 softintr_dispatch+0x52 sys/arch/amd64/amd64/softintr.c:88 #2 Xsoftclock+0x27 exclusive sched_lock &sched_lock r = 0 (0xffffffff82c68190) #0 witness_lock+0x447 #1 schedcpu+0x119 sys/kern/sched_bsd.c:219 #2 timeout_run+0xd0 sys/kern/kern_timeout.c:640 #3 softclock_process_tick_timeout+0x1b0 sys/kern/kern_timeout.c:687 #4 softclock+0x130 sys/kern/kern_timeout.c:710 #5 softintr_dispatch+0xfb sys/arch/amd64/amd64/softintr.c:90 #6 Xsoftclock+0x27 shared mutex timeout r = 0 (0xffffffff82b9e3a0) #0 witness_lock+0x447 #1 timeout_run+0xbb sys/kern/kern_timeout.c:636 #2 softclock_process_tick_timeout+0x1b0 sys/kern/kern_timeout.c:687 #3 softclock+0x130 sys/kern/kern_timeout.c:710 #4 softintr_dispatch+0xfb sys/arch/amd64/amd64/softintr.c:90 #5 Xsoftclock+0x27 ddb{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 10178 6407K 6419K 78643K 11286 0 pcb 13 10K 12K 78643K 15 0 rtable 234 6K 6K 78643K 668 0 pf 29 8K 8K 78643K 49 0 ifaddr 44 15K 15K 78643K 88 0 ifgroup 50 2K 2K 78643K 90 0 counters 60 35K 35K 78643K 80 0 ioctlops 0 0K 2K 78643K 112 0 iov 0 0K 32K 78643K 403 0 mount 1 1K 1K 78643K 1 0 log 0 0K 0K 78643K 4 0 vnodes 1278 80K 80K 78643K 1452 0 UFS quota 1 32K 32K 78643K 1 0 UFS mount 5 36K 36K 78643K 5 0 shm 2 1K 9K 78643K 29 0 VM map 2 1K 1K 78643K 2 0 sem 12 0K 0K 78643K 61 0 dirhash 12 2K 2K 78643K 12 0 ACPI 1697 195K 286K 78643K 12548 0 file desc 25 93K 121K 78643K 1876 0 sigio 0 0K 0K 78643K 219 0 proc 56 78K 103K 78643K 866 0 subproc 104 6K 6K 78643K 234 0 NFS srvsock 1 0K 0K 78643K 1 0 NFS daemon 1 16K 16K 78643K 1 0 ip_moptions 0 0K 1K 78643K 2291 0 in_multi 99 7K 7K 78643K 417 0 ether_multi 1 0K 0K 78643K 2 0 mrt 1 0K 0K 78643K 1 0 ISOFS mount 1 32K 32K 78643K 1 0 MSDOSFS mount 1 16K 16K 78643K 1 0 ttys 49 228K 228K 78643K 49 0 exec 0 0K 1K 78643K 747 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 374 88K 89K 78643K 20033 0 UVM aobj 131 6K 6K 78643K 137 0 memdesc 1 4K 4K 78643K 1 0 crypto data 1 1K 1K 78643K 1 0 ip6_options 0 0K 0K 78643K 51 0 NDP 11 0K 2K 78643K 57 0 temp 74 5872K 5999K 78643K 8940 0 kqueue 12 18K 24K 78643K 163 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 66 0 63 1 0 1 1 0 8 0 rtentry 112 227 0 117 4 0 4 4 0 8 0 unpcb 144 1208 0 1195 14 13 1 7 0 8 0 syncache 296 18 0 18 6 6 0 1 0 8 0 sackhl 24 1 0 1 1 1 0 1 0 8 0 tcpqe 32 289 0 289 8 8 0 2 0 8 0 tcpcb 808 413 0 404 17 15 2 8 0 8 0 arp 120 38 0 20 1 0 1 1 0 8 0 ipq 40 1 0 1 1 1 0 1 0 8 0 ipqe 40 67 0 67 1 1 0 1 0 8 0 inpcb 368 2378 0 2367 47 39 8 18 0 8 6 nd6 136 60 0 36 1 0 1 1 0 8 0 kcovpl 48 18 0 10 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 940 0 485 30 1 29 30 0 8 0 art_table 32 941 0 485 4 0 4 4 0 8 0 art_node 16 226 0 126 1 0 1 1 0 8 0 semapl 112 59 0 49 1 0 1 1 0 8 0 shmpl 112 134 0 6 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino2pl 256 3344 0 1897 91 0 91 91 0 8 0 ffsino 272 3344 0 1897 97 0 97 97 0 8 0 nchpl 144 5872 0 4227 63 0 63 63 0 8 0 uvmvnodes 80 3587 0 0 74 0 74 74 0 8 0 vnodes 216 3587 0 0 200 0 200 200 0 8 0 namei 1024 20154 0 20154 2 1 1 2 0 8 1 percpumem 16 53 0 10 1 0 1 1 0 8 0 kstatmem 264 42 0 20 2 0 2 2 0 8 0 scxspl 216 18267 0 18267 12 11 1 8 1 8 1 plimitpl 152 194 0 170 2 1 1 2 0 8 0 sigapl 424 2152 0 2097 7 0 7 7 0 8 0 futexpl 64 12507 0 12501 1 0 1 1 0 8 0 knotepl 120 427 0 0 13 0 13 13 0 8 0 kqueuepl 216 670 0 662 22 17 5 6 0 8 4 pipepl 320 864 0 835 22 17 5 8 0 8 2 fdescpl 496 2134 0 2098 7 2 5 6 0 8 0 filepl 152 12750 0 12513 48 33 15 19 0 8 5 lockfpl 104 489 0 486 2 1 1 2 0 8 0 lockfspl 48 89 0 86 1 0 1 1 0 8 0 sessionpl 144 33 0 17 1 0 1 1 0 8 0 pgrppl 48 40 0 24 1 0 1 1 0 8 0 ucredpl 104 720 0 702 1 0 1 1 0 8 0 zombiepl 144 2098 0 2097 1 0 1 1 0 8 0 processpl 1072 2152 0 2097 5 1 4 5 0 8 0 procpl 696 5165 0 5088 13 4 9 9 0 8 1 sosppl 168 24 0 24 3 3 0 1 0 8 0 sockpl 488 3746 0 3719 111 99 12 33 0 8 8 mcl64k 65536 12 0 0 2 0 2 2 0 8 0 mcl16k 16384 10 0 0 2 0 2 2 0 8 0 mcl12k 12288 6 0 0 1 0 1 1 0 8 0 mcl9k 9216 6 0 0 1 0 1 1 0 8 0 mcl8k 8192 12 0 0 2 0 2 2 0 8 0 mcl4k 4096 19 0 0 3 0 3 3 0 8 0 mcl2k2 2112 2 0 0 1 0 1 1 0 8 0 mcl2k 2048 280 0 0 34 0 34 34 0 8 0 mtagpl 96 3 0 0 1 0 1 1 0 8 0 mbufpl 256 400 0 0 20 0 20 20 0 8 0 bufpl 288 6397 0 138 448 0 448 448 0 8 0 anonpl 24 582318 0 571589 178 63 115 132 0 186 24 amapchunkpl 152 64025 0 63128 56 17 39 43 0 158 3 amappl16 200 21854 0 21576 175 147 28 53 0 8 13 amappl15 192 11 0 11 2 2 0 1 0 8 0 amappl14 184 181 0 168 2 1 1 2 0 8 0 amappl13 176 9 0 9 1 1 0 1 0 8 0 amappl12 168 2920 0 2882 2 0 2 2 0 8 0 amappl11 160 57 0 46 1 0 1 1 0 8 0 amappl10 152 51 0 41 1 0 1 1 0 8 0 amappl9 144 214 0 212 3 2 1 2 0 8 0 amappl8 136 267 0 189 3 0 3 3 0 8 0 amappl7 128 90 0 73 1 0 1 1 0 8 0 amappl6 120 302 0 287 2 1 1 2 0 8 0 amappl5 112 200 0 193 1 0 1 1 0 8 0 amappl4 104 723 0 683 3 0 3 3 0 8 0 amappl3 96 12591 0 12489 3 0 3 3 0 8 0 amappl2 88 2372 0 2301 5 3 2 3 0 8 0 amappl1 80 16495 0 15967 22 9 13 22 0 8 0 amappl 88 19369 0 19118 7 0 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 136 0 6 3 0 3 3 0 8 0 uaddrrnd 24 2134 0 2098 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 2134 0 2098 1 0 1 1 0 8 0 vmmpekpl 168 22769 0 22697 4 0 4 4 0 8 0 vmmpepl 168 161621 0 159236 187 59 128 136 0 357 19 vmsppl 464 2133 0 2098 7 2 5 6 0 8 0 rwobjpl 56 59794 0 54784 82 6 76 76 0 8 2 pdppl 4096 4276 0 4196 204 122 82 94 0 8 2 pvpl 32 1093469 0 1076554 352 146 206 352 0 265 38 pmappl 248 2133 0 2098 4 1 3 3 0 8 0 extentpl 40 56 0 38 1 0 1 1 0 8 0 phpool 112 1006 0 180 24 0 24 24 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(ffffffff82795f60) at panic+0x17b sys/kern/subr_prf.c:198 __assert(ffffffff82818072,ffffffff827667dc,109,ffffffff82842042) at __assert+0x29 sys/kern/subr_prf.c:157 setrunqueue(ffffffff82babff0,ffff8000212a62e8,51) at setrunqueue+0x2e5 sys/kern/kern_sched.c:263 schedcpu(ffffffff82c681d8) at schedcpu+0x28b sys/kern/sched_bsd.c:236 timeout_run(ffffffff82c681d8) at timeout_run+0xd0 sys/kern/kern_timeout.c:640 softclock_process_tick_timeout(ffffffff82c681d8,0) at softclock_process_tick_timeout+0x1b0 sys/kern/kern_timeout.c:687 softclock(0) at softclock+0x130 sys/kern/kern_timeout.c:710 softintr_dispatch(0) at softintr_dispatch+0xfb sys/arch/amd64/amd64/softintr.c:90 Xsoftclock() at Xsoftclock+0x27 end of kernel end trace frame: 0x7a72406ce3e0, 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+0x27 end of kernel end trace frame: 0x797f6347e510, 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+0x27 end of kernel end trace frame: 0x797f6347e510, count: -3