panic: malloc: out of space in kmem_map Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND * 57124 54248 0 0x2 0 1K syz-executor.1 db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:399 panic() at panic+0x174 sys/kern/subr_prf.c:208 malloc(200000,2a,9) at malloc+0xad5 sys/kern/kern_malloc.c:242 kcovioctl(1b1300,80084b01,ffff800020c32ef0,3,ffff800020b24008) at kcovioctl+0xe6 kd_init sys/dev/kcov.c:405 [inline] kcovioctl(1b1300,80084b01,ffff800020c32ef0,3,ffff800020b24008) at kcovioctl+0xe6 sys/dev/kcov.c:298 VOP_IOCTL(fffffd8062d2a828,80084b01,ffff800020c32ef0,3,fffffd807f7c79c0,ffff800020b24008) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd80672b2868,80084b01,ffff800020c32ef0,ffff800020b24008) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800020b24008,ffff800020c33030,ffff800020c33020) at sys_ioctl+0x646 syscall(ffff800020c330d0) at syscall+0x5ac mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c330d0) at syscall+0x5ac sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,36,7f7ffffdc3d8,36,3,bd7b8950890) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffdbef0, count: 6 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}> set $maxwidth = 0 ddb{1}> show panic malloc: out of space in kmem_map ddb{1}> trace db_enter() at db_enter+24 panic() at panic+372 malloc(200000,2a,9) at malloc+2773 kcovioctl(1b1300,80084b01,ffff800020c32ef0,3,ffff800020b24008) at kcovioctl+230 VOP_IOCTL(fffffd8062d2a828,80084b01,ffff800020c32ef0,3,fffffd807f7c79c0,ffff800020b24008) at VOP_IOCTL+154 vn_ioctl(fffffd80672b2868,80084b01,ffff800020c32ef0,ffff800020b24008) at vn_ioctl+201 sys_ioctl(ffff800020b24008,ffff800020c33030,ffff800020c33020) at sys_ioctl+1606 syscall(ffff800020c330d0) at syscall+1452 Xsyscall(6,36,7f7ffffdc3d8,36,3,bd7b8950890) at Xsyscall+296 end of kernel end trace frame: 0x7f7ffffdbef0, count: -9 ddb{1}> show registers rdi 0 rsi 1 rbp 18446603336770857760 rbx 18446603336770857936 rdx 18446744071594925066 apollo_pio_rec+41165 rcx 0 rax 0 r8 18446744071592058003 kprintf+387 r9 1 r10 37 r11 7353685793602302270 r12 206158430216 r13 18446603336770857776 r14 256 r15 1 rip 18446744071587275480 db_enter+24 cs 8 rflags 582 rsp 18446603336770857744 ss 16 db_enter+24: addq $8,%rsp ddb{1}> show proc PROC (syz-executor.1) pid=57124 stat=onproc flags process=2 proc=0 pri=51, usrpri=51, nice=20 forw=0xffffffffffffffff, list=0xffff800020b24710,0xffffffff82347020 process=0xffff800020b45708 user=0xffff800020c2e000, vmspace=0xfffffd807f00cb40 estcpu=1, cpticks=2, pctcpu=0.0 user=0, sys=1, intr=0 ddb{1}> ps PID TID PPID UID S FLAGS WAIT COMMAND *54248 57124 94359 0 7 0x2 syz-executor.1 568 463049 94359 0 3 0x82 piperd syz-executor.0 94359 226690 49102 0 3 0x82 thrsleep syz-fuzzer 94359 509686 49102 0 3 0x4000082 nanosleep syz-fuzzer 94359 153906 49102 0 3 0x4000082 thrsleep syz-fuzzer 94359 324781 49102 0 3 0x4000082 thrsleep syz-fuzzer 94359 247505 49102 0 3 0x4000082 thrsleep syz-fuzzer 94359 393796 49102 0 3 0x4000082 thrsleep syz-fuzzer 94359 84064 49102 0 3 0x4000082 kqread syz-fuzzer 94359 273775 49102 0 3 0x4000082 thrsleep syz-fuzzer 94359 70651 49102 0 3 0x4000082 thrsleep syz-fuzzer 94359 521495 49102 0 3 0x4000082 thrsleep syz-fuzzer 49102 519720 17947 0 3 0x10008a pause ksh 17947 378042 82918 0 3 0x92 select sshd 78458 268747 1 0 3 0x100083 ttyin getty 82918 135889 1 0 3 0x80 select sshd 72713 172079 33014 73 3 0x100090 kqread syslogd 33014 45850 1 0 3 0x100082 netio syslogd 86727 424323 1 77 3 0x100090 poll dhclient 60305 269088 1 0 3 0x80 poll dhclient 68214 176087 0 0 3 0x14200 pgzero zerothread 13367 191099 0 0 3 0x14200 aiodoned aiodoned 34444 86481 0 0 3 0x14200 syncer update 33298 312840 0 0 3 0x14200 cleaner cleaner 63807 421544 0 0 3 0x14200 reaper reaper 91586 111957 0 0 3 0x14200 pgdaemon pagedaemon 10075 325011 0 0 3 0x14200 bored crynlk 85537 435643 0 0 3 0x14200 bored crypto 69686 194176 0 0 3 0x40014200 acpi0 acpi0 15302 82221 0 0 3 0x40014200 idle1 43279 53230 0 0 3 0x14200 bored softnet 63306 240037 0 0 3 0x14200 bored systqmp 44434 318511 0 0 3 0x14200 bored systq 39428 377071 0 0 3 0x40014200 bored softclock 2279 321659 0 0 7 0x40014200 idle0 1 107997 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{1}> show all locks Process 54248 (syz-executor.1) thread 0xffff800020b24008 (57124) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff82340dc0) locked @ /syzkaller/managers/multicore/kernel/sys/sys/syscall_mi.h:90 #0 witness_lock+1418 #1 syscall+1151 #2 Xsyscall+296 ddb{1}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim devbuf 9469 71864K 71872K 78643K 10578 0 0 pcb 23 9K 10K 78643K 105 0 0 rtable 79 2K 3K 78643K 177 0 0 ifaddr 35 9K 10K 78643K 41 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 2K 78643K 15 0 0 iov 0 0K 2K 78643K 6 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1198 75K 75K 78643K 1248 0 0 UFS quota 1 32K 32K 78643K 1 0 0 UFS mount 5 36K 36K 78643K 5 0 0 shm 2 1K 5K 78643K 3 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 10 0K 0K 78643K 14 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1792 194K 288K 78643K 12592 0 0 file desc 4 9K 25K 78643K 72 0 0 sigio 0 0K 0K 78643K 2 0 0 proc 41 38K 58K 78643K 257 0 0 subproc 53 55297K 67586K 78643K 89 0 0 NFS srvsock 1 0K 0K 78643K 1 0 0 NFS daemon 1 16K 16K 78643K 1 0 0 ip_moptions 0 0K 0K 78643K 5 0 0 in_multi 22 1K 2K 78643K 33 0 0 ether_multi 1 0K 0K 78643K 1 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 42 185K 185K 78643K 42 0 0 exec 0 0K 1K 78643K 166 0 0 pagedep 1 8K 8K 78643K 1 0 0 inodedep 1 32K 32K 78643K 1 0 0 newblk 1 0K 0K 78643K 1 0 0 VM swap 7 26K 26K 78643K 7 0 0 UVM amap 70 12K 20K 78643K 933 0 0 UVM aobj 10 2K 2K 78643K 10 0 0 memdesc 1 4K 4K 78643K 1 0 0 crypto data 1 1K 1K 78643K 1 0 0 NDP 6 0K 0K 78643K 11 0 0 temp 82 2352K 2420K 78643K 2951 0 0 SYN cache 2 16K 16K 78643K 2 0 0 ddb{1}> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle arp 64 4 0 1 1 0 1 1 0 8 0 inpcbpl 280 50 0 43 1 0 1 1 0 8 0 plimitpl 152 18 0 11 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtentry 112 41 0 10 2 0 2 2 0 8 1 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpcb 544 16 0 12 1 0 1 1 0 8 0 nd6 48 4 0 2 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 185 0 41 12 0 12 12 0 8 3 art_table 32 186 0 41 2 0 2 2 0 8 0 art_node 16 40 0 12 1 0 1 1 0 8 0 semapl 112 10 0 2 1 0 1 1 0 8 0 shmpl 112 8 0 0 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 1527 0 121 46 0 46 46 0 8 0 ffsino 272 1527 0 121 95 0 95 95 0 8 0 nchpl 144 1836 0 231 61 0 61 61 0 8 0 uvmvnodes 72 1582 0 0 29 0 29 29 0 8 0 vnodes 200 1582 0 0 84 0 84 84 0 8 0 namei 1024 4565 0 4565 2 1 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scsiplug 64 1 0 1 1 0 1 1 0 8 1 scxspl 192 4304 0 4304 9 7 2 6 0 8 2 sigapl 432 237 0 225 2 0 2 2 0 8 0 futexpl 56 757 0 757 1 0 1 1 0 8 1 knotepl 112 107 0 78 2 0 2 2 0 8 1 kqueuepl 104 36 0 34 1 0 1 1 0 8 0 pipepl 112 206 0 187 3 1 2 2 0 8 1 fdescpl 488 238 0 225 3 0 3 3 0 8 1 filepl 152 1363 0 1275 5 0 5 5 0 8 1 lockfpl 104 21 0 21 2 1 1 1 0 8 1 lockfspl 32 7 0 7 2 1 1 1 0 8 1 sessionpl 112 17 0 8 1 0 1 1 0 8 0 pgrppl 48 17 0 8 1 0 1 1 0 8 0 ucredpl 96 187 0 180 1 0 1 1 0 8 0 zombiepl 144 225 0 225 2 1 1 1 0 8 1 processpl 840 252 0 225 4 0 4 4 0 8 0 procpl 600 374 0 338 4 0 4 4 0 8 1 srpgc 64 6 0 6 1 0 1 1 0 8 1 sockpl 384 132 0 115 3 0 3 3 0 8 1 mcl64k 65536 2 0 0 1 0 1 1 0 8 0 mcl16k 16384 2 0 0 1 0 1 1 0 8 0 mcl12k 12288 3 0 0 1 0 1 1 0 8 0 mcl8k 8192 1 0 0 1 0 1 1 0 8 0 mcl4k 4096 6 0 0 1 0 1 1 0 8 0 mcl2k 2048 110 0 0 13 0 13 13 0 8 0 mtagpl 80 1 0 0 1 0 1 1 0 8 0 mbufpl 256 127 0 0 8 0 8 8 0 8 0 bufpl 256 5257 0 1013 266 0 266 266 0 8 0 anonpl 16 29788 0 23789 34 1 33 33 0 125 4 amapchunkpl 152 938 0 855 5 0 5 5 0 158 0 amappl16 192 713 0 359 21 0 21 21 0 8 2 amappl15 184 1 0 0 1 0 1 1 0 8 0 amappl14 176 5 0 4 2 1 1 1 0 8 0 amappl13 168 54 0 50 1 0 1 1 0 8 0 amappl12 160 8 0 7 2 1 1 1 0 8 0 amappl11 152 178 0 168 1 0 1 1 0 8 0 amappl10 144 108 0 106 2 1 1 1 0 8 0 amappl9 136 356 0 353 1 0 1 1 0 8 0 amappl8 128 131 0 116 1 0 1 1 0 8 0 amappl7 120 40 0 33 1 0 1 1 0 8 0 amappl6 112 57 0 50 1 0 1 1 0 8 0 amappl5 104 119 0 106 1 0 1 1 0 8 0 amappl4 96 298 0 271 2 1 1 2 0 8 0 amappl3 88 132 0 126 1 0 1 1 0 8 0 amappl2 80 1132 0 1090 2 0 2 2 0 8 1 amappl1 72 13385 0 12997 24 8 16 19 0 8 6 amappl 72 578 0 548 1 0 1 1 0 75 0 dma4096 4096 1 0 1 1 1 0 1 0 8 0 dma256 256 6 0 6 1 1 0 1 0 8 0 dma64 64 259 0 259 1 1 0 1 0 8 0 dma32 32 7 0 7 1 1 0 1 0 8 0 dma16 16 17 0 17 1 1 0 1 0 8 0 aobjpl 64 9 0 0 1 0 1 1 0 8 0 uaddrrnd 24 238 0 225 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 238 0 225 1 0 1 1 0 8 0 vmmpekpl 168 5777 0 5755 2 0 2 2 0 8 0 vmmpepl 168 32354 0 31182 86 18 68 70 0 357 12 vmsppl 360 237 0 225 2 0 2 2 0 8 0 pdppl 4096 483 0 450 6 0 6 6 0 8 1 pvpl 32 115982 0 107125 100 6 94 96 0 265 12 pmappl 224 237 0 225 1 0 1 1 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 413 0 3 12 0 12 12 0 8 0