panic: kernel diagnostic assertion "pr->ps_threadcnt == 0" failed: file "/syzkaller/managers/main/kernel/sys/kern/kern_exit.c", line 886 Stopped at db_enter+0x25: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *309518 9774 0 0x14000 0x200 0 reaper db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff8337bfbc) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff833bb25c,ffffffff833e2be3,376,ffffffff833e2c18) at __assert+0x29 sys/kern/subr_prf.c:-1 process_zap(ffff800038119b18) at process_zap+0x31d sys/kern/kern_exit.c:887 reaper(ffff80002a72ca60) at reaper+0x290 sys/kern/kern_exit.c:521 end trace frame: 0x0, count: 10 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> ddb> set $lines = 0 ddb> set $maxwidth = 0 ddb> show panic *cpu0: kernel diagnostic assertion "pr->ps_threadcnt == 0" failed: file "/syzkaller/managers/main/kernel/sys/kern/kern_exit.c", line 886 ddb> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff8337bfbc) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff833bb25c,ffffffff833e2be3,376,ffffffff833e2c18) at __assert+0x29 sys/kern/subr_prf.c:-1 process_zap(ffff800038119b18) at process_zap+0x31d sys/kern/kern_exit.c:887 reaper(ffff80002a72ca60) at reaper+0x290 sys/kern/kern_exit.c:521 end trace frame: 0x0, count: -5 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff80002a7634a0 rbx 0x40000 acpi_pdirpa+0x2be71 rdx 0 rcx 0 rax 0xffff80002a72ca60 r8 0x101010101010101 r9 0x8080808080808080 r10 0x3c79c30cc809d36d r11 0xcee8cdf667a310e1 r12 0 r13 0 r14 0 r15 0x1 rip 0xffffffff82bf0b15 db_enter+0x25 cs 0x8 rflags 0x246 rsp 0xffff80002a763490 ss 0x10 db_enter+0x25: addq $0x8,%rsp ddb> show proc PROC (reaper) tid=309518 pid=9774 tcnt=1 stat=onproc flags process=14000 proc=200 runpri=32, usrpri=50, slppri=32, nice=20 wchan=0x0, wmesg=, ps_single=0x0 scnt=0 ecnt=0 forw=0xffffffffffffffff, list=0xffff80002a72c298,0xffff80002a72cd08 process=0xffff8000ffffd680 user=0xffff80002a75e000, vmspace=0xffffffff838b9010 estcpu=0, cpticks=5, pctcpu=0.0, user=0, sys=0, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND 13604 153603 93391 0 2 0 syz-executor 13604 91796 93391 0 2 0x4000000 syz-executor 99132 245054 83291 0 2 0 syz-executor 99132 275431 83291 0 2 0x4000000 syz-executor 99132 12172 83291 0 3 0x4000080 fsleep syz-executor 18272 148302 37594 0 2 0 syz-executor 18272 478436 37594 0 3 0x4000080 fsleep syz-executor 48053 493551 86796 0 2 0 syz-executor 48053 167546 86796 0 2 0x4000000 syz-executor 24659 402641 0 0 3 0x14280 nfsidl nfsio 13433 277302 0 0 3 0x14280 nfsidl nfsio 65400 404053 53062 0 3 0 vmmaplk syz-executor 65400 422711 53062 0 3 0x4000080 sbwait syz-executor 65400 506462 53062 0 3 0x4000080 fsleep syz-executor 65400 175878 53062 0 2 0x4000000 syz-executor 98139 55190 9265 0 2 0 syz-executor 98139 60396 9265 0 2 0x4000000 syz-executor 98139 297823 9265 0 3 0x4000080 sysctllk syz-executor 36572 287779 0 0 3 0x14200 acct acct 37448 75245 1 0 3 0x80 nanoslp init 83291 124405 54209 0 3 0x2 kqpsl syz-executor 53062 144793 54209 0 2 0xc82 syz-executor 93391 304379 54209 0 3 0x2 kqpsl syz-executor 37594 347276 54209 0 3 0x2 kqpsl syz-executor 86796 317015 54209 0 2 0x2 syz-executor 9265 52361 54209 0 3 0x82 nanoslp syz-executor 3012 366534 54209 0 3 0x82 nanoslp syz-executor 7582 140600 54209 0 3 0x82 wait syz-executor 54209 301560 34108 0 3 0x82 kqread syz-executor 34108 317863 9098 0 3 0x10008a sigsusp ksh 9098 134710 87158 0 3 0x98 kqread sshd-session 87158 103485 93594 0 3 0x92 kqread sshd-session 93594 346124 1 0 3 0x88 kqread sshd 78788 484551 54438 73 3 0x1100090 kqread syslogd 54438 73637 1 0 3 0x100082 sbwait syslogd 88514 469365 1 0 3 0x100080 kqread resolvd 45347 263371 39812 77 3 0x100092 kqread dhcpleased 72621 41867 39812 77 3 0x100092 kqread dhcpleased 39812 222706 1 0 3 0x80 kqread dhcpleased 49288 265187 0 0 3 0x14200 bored smr 15509 370880 0 0 2 0x14200 zerothread 62933 454076 0 0 3 0x14200 aiodoned aiodoned 9160 507850 0 0 3 0x14200 syncer update 38861 378152 0 0 3 0x14200 cleaner cleaner * 9774 309518 0 0 7 0x14200 reaper 55738 64048 0 0 3 0x14200 pgdaemon pagedaemon 99070 75029 0 0 3 0x14200 bored viomb 2082 396551 0 0 3 0x40014200 acpi0 acpi0 528 37343 0 0 3 0x14200 bored softnet0 30116 472883 0 0 3 0x14200 bored systqmp 65726 209525 0 0 3 0x14200 bored systq 96441 500201 0 0 3 0x40014200 tmoslp softclock 36891 404892 0 0 3 0x40014200 idle0 1 179576 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb> show all locks No such command ddb> show malloc Type InUse MemUse HighUse Limit Requests Type Lim devbuf 11031 12100K 13296K 166960K 13068 0 pcb 17 16K 18K 166960K 240 0 rtable 196 7K 8K 166960K 513 0 pf 27 12K 18K 166960K 81 0 ifaddr 36 6K 8K 166960K 73 0 ifgroup 42 1K 2K 166960K 99 0 sysctl 3 1K 9K 166960K 10 0 counters 31 17K 18K 166960K 55 0 ioctlops 0 0K 4K 166960K 94 0 iov 1 0K 16K 166960K 61 0 mount 1 1K 1K 166960K 1 0 log 0 0K 0K 166960K 4 0 vnodes 1425 90K 90K 166960K 1880 0 UFS quota 1 32K 32K 166960K 1 0 UFS mount 5 36K 36K 166960K 5 0 shm 3 5K 9K 166960K 12 0 VM map 2 1K 1K 166960K 2 0 sem 12 0K 0K 166960K 163 0 dirhash 12 2K 2K 166960K 18 0 ACPI 1692 195K 286K 166960K 12470 0 file desc 18 65K 97K 166960K 616 0 sigio 0 0K 0K 166960K 11 0 proc 51 50K 91K 166960K 559 0 subproc 72 4K 4K 166960K 81 0 NFS srvsock 1 0K 0K 166960K 1 0 NFS daemon 1 16K 16K 166960K 1 0 ip_moptions 0 0K 0K 166960K 54 0 in_multi 76 5K 7K 166960K 139 0 ether_multi 1 0K 0K 166960K 10 0 mrt 1 0K 0K 166960K 8 0 ISOFS mount 1 32K 32K 166960K 1 0 MSDOSFS mount 1 16K 16K 166960K 1 0 ttys 73 334K 334K 166960K 73 0 exec 0 0K 1K 166960K 405 0 fusefs mount 1 32K 32K 166960K 1 0 pfkey data 0 0K 0K 166960K 1 0 tdb 3 0K 0K 166960K 3 0 VM swap 8 62K 64K 166960K 10 0 UVM amap 218 138K 157K 166960K 7338 0 UVM aobj 15 4K 4K 166960K 16 0 pinsyscall 38 76K 96K 166960K 1735 0 memdesc 1 4K 4K 166960K 1 0 crypto data 1 1K 1K 166960K 1 0 ip6_options 0 0K 0K 166960K 26 0 NDP 9 0K 2K 166960K 46 0 temp 42 8663K 8743K 166960K 30057 0 kqueue 16 22K 29K 166960K 113 0 SYN cache 2 16K 16K 166960K 2 0 ddb> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle rtpcb 120 149 0 145 3 0 3 3 0 8 2 rtentry 136 141 0 63 4 0 4 4 0 8 0 unpcb 144 324 0 306 1 0 1 1 0 8 0 syncache 336 9 0 9 2 1 1 1 0 8 1 tcpqe 32 1 0 1 1 0 1 1 0 8 1 tcpcb 736 201 0 196 7 6 1 7 0 8 0 arp 96 23 0 7 1 0 1 1 0 8 0 ipq 40 2 0 0 1 0 1 1 0 8 0 ipqe 40 3 0 1 1 0 1 1 0 8 0 inpcb 328 760 0 749 13 6 7 7 0 8 5 ip6q 72 35 0 33 2 1 1 1 0 8 0 ip6af 40 70 0 66 2 1 1 1 0 8 0 nd6 112 28 0 12 1 0 1 1 0 8 0 pkpcb 40 3 0 3 2 1 1 1 0 8 1 kcovpl 48 9 0 1 1 0 1 1 0 8 0 mppekey 1024 1 0 1 1 1 0 1 0 8 0 ppxss 1072 16 0 16 2 1 1 1 0 8 1 pppxif 1384 2 0 2 2 1 1 1 0 8 1 pfrktable 1344 4 0 4 1 1 0 1 0 8 0 pfanchor 1288 1 0 1 1 1 0 1 0 8 0 pftag 88 2 0 1 2 1 1 1 0 8 0 pfstitem 24 2 0 0 1 0 1 1 0 8 0 pfstkey 128 10 0 8 1 0 1 1 0 8 0 pfstate 384 5 0 4 1 0 1 1 0 8 0 pfrule 1344 3 0 3 2 1 1 1 0 8 1 rttmr 136 1 0 1 1 0 1 1 0 8 1 art_heap8 4096 2 0 0 2 0 2 2 0 8 0 art_heap4 256 605 0 260 31 2 29 31 0 8 2 art_table 40 607 0 260 5 0 5 5 0 8 0 art_node 32 141 0 73 1 0 1 1 0 8 0 sysvmsgpl 40 4 0 2 1 0 1 1 0 8 0 semupl 112 2 0 2 1 0 1 1 0 8 1 semapl 112 157 0 147 1 0 1 1 0 8 0 shmpl 112 12 0 1 1 0 1 1 0 8 0 dirhash 1024 21 0 4 3 0 3 3 0 8 0 dino2pl 256 2485 0 987 95 0 95 95 0 8 0 ffsino 256 2485 0 987 95 0 95 95 0 8 0 nchpl 144 3329 0 1637 64 0 64 64 0 8 0 rtmask 32 3 0 3 2 1 1 1 0 8 1 vnodes 216 2903 0 0 162 0 162 162 0 8 0 namei 1024 10812 0 10812 4 2 2 2 0 8 2 vcpupl 3904 1 0 0 1 0 1 1 0 8 0 vmpool 808 1 0 0 1 0 1 1 0 8 0 pfiaddrpl 120 1 0 1 1 1 0 1 0 8 0 kstatmem 264 54 0 36 2 0 2 2 0 8 0 scsiplug 72 8 0 8 2 1 1 1 0 8 1 scxspl 216 11233 0 11233 10 2 8 8 1 8 8 plimitpl 152 142 0 127 1 0 1 1 0 8 0 sigapl 424 909 0 863 7 1 6 6 0 8 0 knotepl 120 20548 0 20497 17 8 9 10 0 8 6 kqueuepl 184 192 0 181 3 0 3 3 0 8 2 pipepl 304 150 0 123 3 0 3 3 0 8 0 fdescpl 448 893 0 863 5 1 4 5 0 8 0 filepl 120 5072 0 4853 13 2 11 11 0 8 3 lockfpl 104 148 0 145 1 0 1 1 0 8 0 lockfspl 48 64 0 61 1 0 1 1 0 8 0 sessionpl 144 27 0 20 1 0 1 1 0 8 0 pgrppl 48 42 0 27 1 0 1 1 0 8 0 ucredpl 104 582 0 570 1 0 1 1 0 8 0 zombiepl 144 1126 0 1124 1 0 1 1 0 8 0 processpl 1152 909 0 863 4 0 4 4 0 8 0 procpl 664 1723 0 1666 7 1 6 6 0 8 1 sosppl 176 2 0 1 1 0 1 1 0 8 0 sockpl 552 1242 0 1209 17 6 11 12 0 8 8 mcl64k 65536 21 0 21 2 1 1 1 0 8 1 mcl16k 16384 5 0 5 2 1 1 1 0 8 1 mcl12k 12288 1 0 1 1 0 1 1 0 8 1 mcl9k 9216 1 0 1 1 1 0 1 0 8 0 mcl8k 8192 11 0 11 2 1 1 1 0 8 1 mcl4k 4096 3127 0 3073 16 7 9 15 0 8 2 mcl2k 2048 1032 0 1015 6 3 3 4 0 8 0 mtagpl 96 86 0 6 2 0 2 2 0 8 0 mbufpl 256 9853 0 9576 26 0 26 26 0 8 4 bufpl 280 3823 0 156 262 0 262 262 0 8 0 anonpl 24 157915 0 154304 54 10 44 44 0 187 17 amapchunkpl 152 24678 0 24218 42 8 34 34 0 158 14 amappl16 200 2379 0 2319 18 6 12 15 0 8 7 amappl15 192 1 0 1 1 1 0 1 0 8 0 amappl14 184 5 0 5 1 1 0 1 0 8 0 amappl13 176 417 0 416 1 0 1 1 0 8 0 amappl12 168 1249 0 1212 2 0 2 2 0 8 0 amappl11 160 6 0 6 1 1 0 1 0 8 0 amappl10 152 70 0 60 1 0 1 1 0 8 0 amappl9 144 321 0 320 2 1 1 1 0 8 0 amappl8 136 30 0 28 1 0 1 1 0 8 0 amappl7 128 80 0 78 1 0 1 1 0 8 0 amappl6 120 284 0 273 1 0 1 1 0 8 0 amappl5 112 72 0 64 1 0 1 1 0 8 0 amappl4 104 399 0 376 1 0 1 1 0 8 0 amappl3 96 4042 0 3959 3 0 3 3 0 8 0 amappl2 88 1033 0 964 2 0 2 2 0 8 0 amappl1 80 12011 0 11495 13 0 13 13 0 8 0 amappl 88 6520 0 6364 5 0 5 5 0 92 0 uvmvnodes 80 110 0 0 3 0 3 3 0 8 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 254 0 254 2 1 1 1 0 8 1 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 19 0 18 1 0 1 1 0 8 0 aobjpl 72 15 0 1 1 0 1 1 0 8 0 uaddrrnd 24 893 0 863 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 893 0 863 1 0 1 1 0 8 0 vmmpekpl 168 8873 0 8831 3 0 3 3 0 8 0 vmmpepl 168 64305 0 62490 93 4 89 89 0 357 8 vmsppl 368 892 0 863 4 1 3 4 0 8 0 rwobjpl 40 19734 0 18789 12 0 12 12 0 8 0 pdppl 4096 1795 0 1727 103 35 68 83 0 8 0 pvpl 32 419599 0 408966 141 19 122 122 0 265 36 pmappl 216 893 0 863 3 0 3 3 0 8 0 extentpl 40 45 0 27 1 0 1 1 0 8 0 phpool 112 410 0 64 11 0 11 11 0 8 0 ddb> machine ddbcpu 0 No such command ddb> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff8337bfbc) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff833bb25c,ffffffff833e2be3,376,ffffffff833e2c18) at __assert+0x29 sys/kern/subr_prf.c:-1 process_zap(ffff800038119b18) at process_zap+0x31d sys/kern/kern_exit.c:887 reaper(ffff80002a72ca60) at reaper+0x290 sys/kern/kern_exit.c:521 end trace frame: 0x0, count: -5 ddb> machine ddbcpu 1 No such command ddb> trace db_enter() at db_enter+0x25 sys/arch/amd64/amd64/db_interface.c:438 panic(ffffffff8337bfbc) at panic+0x1cf sys/kern/subr_prf.c:198 __assert(ffffffff833bb25c,ffffffff833e2be3,376,ffffffff833e2c18) at __assert+0x29 sys/kern/subr_prf.c:-1 process_zap(ffff800038119b18) at process_zap+0x31d sys/kern/kern_exit.c:887 reaper(ffff80002a72ca60) at reaper+0x290 sys/kern/kern_exit.c:521 end trace frame: 0x0, count: -5