panic: malloc: out of space in kmem_map Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *151835 7298 0 0x2 0 0 syz-executor.1 80740 17306 0 0 0 1 syz-executor.0 db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 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,ffff800020c25990,3,ffff800020b74bd0) at kcovioctl+0xe6 kd_init sys/dev/kcov.c:405 [inline] kcovioctl(1b1300,80084b01,ffff800020c25990,3,ffff800020b74bd0) at kcovioctl+0xe6 sys/dev/kcov.c:298 VOP_IOCTL(fffffd8061c05a00,80084b01,ffff800020c25990,3,fffffd807f7c6840,ffff800020b74bd0) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd8066e1b1e0,80084b01,ffff800020c25990,ffff800020b74bd0) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800020b74bd0,ffff800020c25ad0,ffff800020c25ac0) at sys_ioctl+0x651 syscall(ffff800020c25b70) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c25b70) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,36,7f7ffffbdd88,36,3,eb2cfda4890) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffbd8a0, 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{0}> ddb{0}> set $lines = 0 ddb{0}> set $maxwidth = 0 ddb{0}> show panic malloc: out of space in kmem_map ddb{0}> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 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,ffff800020c25990,3,ffff800020b74bd0) at kcovioctl+0xe6 kd_init sys/dev/kcov.c:405 [inline] kcovioctl(1b1300,80084b01,ffff800020c25990,3,ffff800020b74bd0) at kcovioctl+0xe6 sys/dev/kcov.c:298 VOP_IOCTL(fffffd8061c05a00,80084b01,ffff800020c25990,3,fffffd807f7c6840,ffff800020b74bd0) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd8066e1b1e0,80084b01,ffff800020c25990,ffff800020b74bd0) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800020b74bd0,ffff800020c25ad0,ffff800020c25ac0) at sys_ioctl+0x651 syscall(ffff800020c25b70) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c25b70) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,36,7f7ffffbdd88,36,3,eb2cfda4890) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffbd8a0, count: -9 ddb{0}> show registers rdi 0 rsi 0x1 rbp 0xffff800020c255c0 rbx 0xffff800020c25670 rdx 0xffffffff81f8b3f2 apollo_pio_rec+0xa90e rcx 0 rax 0 r8 0xffffffff81476a83 kprintf+0x183 r9 0x1 r10 0x25 r11 0xd3f010f8e56c5a1c r12 0x3000000008 r13 0xffff800020c255d0 r14 0x100 r15 0x1 rip 0xffffffff81b0eb48 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020c255b0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor.1) pid=151835 stat=onproc flags process=2 proc=0 pri=51, usrpri=51, nice=20 forw=0xffffffffffffffff, list=0xffff800020b74270,0xffffffff8237cfc8 process=0xffff800020b8c9f0 user=0xffff800020c20000, vmspace=0xfffffd807effd708 estcpu=1, cpticks=3, pctcpu=0.0 user=0, sys=2, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND * 7298 151835 70171 0 7 0x2 syz-executor.1 17306 80740 50860 0 7 0 syz-executor.0 17306 480443 50860 0 3 0x4000080 wsevent_read syz-executor.0 17306 166279 50860 0 3 0x4000080 fsleep syz-executor.0 50860 273404 70171 0 3 0x82 nanosleep syz-executor.0 47178 53380 1 0 3 0x100083 ttyin getty 13489 123081 0 0 3 0x14200 bored sosplice 70171 315175 88765 0 3 0x82 thrsleep syz-fuzzer 70171 1224 88765 0 3 0x4000082 thrsleep syz-fuzzer 70171 316330 88765 0 3 0x4000082 thrsleep syz-fuzzer 70171 107097 88765 0 3 0x4000082 thrsleep syz-fuzzer 70171 462595 88765 0 3 0x4000082 thrsleep syz-fuzzer 70171 480818 88765 0 3 0x4000082 kqread syz-fuzzer 70171 439784 88765 0 3 0x4000082 thrsleep syz-fuzzer 70171 359584 88765 0 3 0x4000082 thrsleep syz-fuzzer 70171 396069 88765 0 3 0x4000082 thrsleep syz-fuzzer 70171 489458 88765 0 3 0x4000082 thrsleep syz-fuzzer 88765 419199 99440 0 3 0x10008a pause ksh 99440 479299 87678 0 3 0x92 select sshd 87678 238755 1 0 3 0x80 select sshd 30230 471131 59371 74 3 0x100092 bpf pflogd 59371 354061 1 0 3 0x80 netio pflogd 55324 133728 49204 73 3 0x100090 kqread syslogd 49204 181794 1 0 3 0x100082 netio syslogd 73473 420335 1 77 3 0x100090 poll dhclient 46028 244690 1 0 3 0x80 poll dhclient 30653 97474 0 0 3 0x14200 pgzero zerothread 67519 267460 0 0 3 0x14200 aiodoned aiodoned 67763 419269 0 0 3 0x14200 syncer update 30922 88770 0 0 3 0x14200 cleaner cleaner 95243 136647 0 0 3 0x14200 reaper reaper 19883 242097 0 0 3 0x14200 pgdaemon pagedaemon 65564 197648 0 0 3 0x14200 bored crynlk 22884 137466 0 0 3 0x14200 bored crypto 92572 259874 0 0 3 0x40014200 acpi0 acpi0 56843 64597 0 0 3 0x40014200 idle1 60374 515163 0 0 3 0x14200 bored softnet 65209 252943 0 0 3 0x14200 bored systqmp 8768 435977 0 0 3 0x14200 bored systq 56368 224586 0 0 3 0x40014200 bored softclock 14415 102588 0 0 3 0x40014200 idle0 43264 55201 0 0 3 0x14200 bored smr 1 67962 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 7298 (syz-executor.1) thread 0xffff800020b74bd0 (151835) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff82394290) locked @ /syzkaller/managers/multicore/kernel/sys/sys/syscall_mi.h:90 #0 witness_lock+0x594 sys/kern/subr_witness.c:1201 #1 syscall+0x48b mi_syscall sys/sys/syscall_mi.h:91 [inline] #1 syscall+0x48b sys/arch/amd64/amd64/trap.c:574 #2 Xsyscall+0x128 ddb{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim devbuf 9518 71967K 71967K 78643K 10824 0 0 pcb 25 9K 11K 78643K 319 0 0 rtable 82 3K 4K 78643K 659 0 0 ifaddr 53 12K 14K 78643K 192 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 4K 78643K 1483 0 0 iov 0 0K 16K 78643K 62 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1209 76K 76K 78643K 1672 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 5 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 0K 0K 78643K 57 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12628 0 0 file desc 5 13K 25K 78643K 577 0 0 sigio 0 0K 0K 78643K 19 0 0 proc 54 51K 71K 78643K 630 0 0 subproc 53 55297K 67586K 78643K 475 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 67 0 0 in_multi 22 1K 2K 78643K 181 0 0 ether_multi 1 0K 0K 78643K 5 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 66 291K 291K 78643K 66 0 0 exec 0 0K 1K 78643K 292 0 0 pfkey data 0 0K 0K 78643K 2 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 82 12K 29K 78643K 2704 0 0 UVM aobj 22 2K 2K 78643K 24 0 0 memdesc 1 4K 4K 78643K 1 0 0 crypto data 1 1K 1K 78643K 1 0 0 ip6_options 0 0K 1K 78643K 29 0 0 NDP 11 0K 0K 78643K 65 0 0 temp 149 2373K 2437K 78643K 5402 0 0 kqueue 0 0K 0K 78643K 1 0 0 SYN cache 2 16K 16K 78643K 2 0 0 ddb{0}> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle arp 64 15 0 12 1 0 1 1 0 8 0 inpcbpl 280 334 0 326 1 0 1 1 0 8 0 plimitpl 152 45 0 37 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtentry 112 142 0 111 2 0 2 2 0 8 1 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 16 0 16 1 1 0 1 0 8 0 tcpcb 544 117 0 113 1 0 1 1 0 8 0 nd6 48 26 0 24 1 0 1 1 0 8 0 ppxss 1128 15 0 15 2 1 1 1 0 8 1 pfosfp 40 846 0 423 5 0 5 5 0 8 0 pfosfpen 112 1428 0 714 21 0 21 21 0 8 0 pfstitem 24 32 0 16 1 0 1 1 0 8 0 pfstkey 112 32 0 16 1 0 1 1 0 8 0 pfstate 328 32 0 16 2 0 2 2 0 8 0 pfrule 1360 21 0 16 2 1 1 2 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 662 0 515 12 0 12 12 0 8 2 art_table 32 663 0 515 2 0 2 2 0 8 0 art_node 16 139 0 111 1 0 1 1 0 8 0 sysvmsgpl 40 18 0 8 1 0 1 1 0 8 0 semapl 112 55 0 45 1 0 1 1 0 8 0 shmpl 112 22 0 2 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 2375 0 915 48 0 48 48 0 8 0 ffsino 272 2375 0 915 98 0 98 98 0 8 0 nchpl 144 3335 0 1656 63 0 63 63 0 8 0 uvmvnodes 72 2667 0 0 49 0 49 49 0 8 0 vnodes 200 2667 0 0 141 0 141 141 0 8 0 namei 1024 10072 0 10072 2 1 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scsiplug 64 4 0 4 2 1 1 1 0 8 1 scxspl 192 8348 0 8348 12 11 1 6 0 8 1 sigapl 432 741 0 726 3 1 2 3 0 8 0 futexpl 56 5794 0 5793 1 0 1 1 0 8 0 knotepl 112 385 0 364 1 0 1 1 0 8 0 kqueuepl 104 135 0 133 1 0 1 1 0 8 0 pipepl 112 514 0 495 3 2 1 2 0 8 0 fdescpl 488 742 0 726 3 0 3 3 0 8 0 filepl 152 4418 0 4323 5 0 5 5 0 8 1 lockfpl 104 195 0 195 2 1 1 1 0 8 1 lockfspl 32 214 0 214 2 1 1 1 0 8 1 sessionpl 112 30 0 20 1 0 1 1 0 8 0 pgrppl 48 34 0 24 1 0 1 1 0 8 0 ucredpl 96 839 0 830 1 0 1 1 0 8 0 zombiepl 144 726 0 726 2 1 1 1 0 8 1 processpl 840 758 0 726 4 0 4 4 0 8 0 procpl 600 1829 0 1786 4 0 4 4 0 8 0 srpgc 64 68 0 68 4 3 1 1 0 8 1 sosppl 128 2 0 2 1 1 0 1 0 8 0 sockpl 384 589 0 569 4 1 3 4 0 8 1 mcl64k 65536 229 0 0 29 0 29 29 0 8 0 mcl16k 16384 1 0 0 1 0 1 1 0 8 0 mcl12k 12288 2 0 0 1 0 1 1 0 8 0 mcl9k 9216 2 0 0 1 0 1 1 0 8 0 mcl8k 8192 3 0 0 1 0 1 1 0 8 0 mcl4k 4096 7 0 0 1 0 1 1 0 8 0 mcl2k2 2112 2 0 0 1 0 1 1 0 8 0 mcl2k 2048 121 0 0 14 1 13 14 0 8 0 mtagpl 80 1 0 0 1 0 1 1 0 8 0 mbufpl 256 340 0 0 20 0 20 20 0 8 0 bufpl 256 6456 0 1147 332 0 332 332 0 8 0 anonpl 16 82620 0 75474 50 14 36 47 0 125 1 amapchunkpl 152 4476 0 4392 17 12 5 9 0 158 1 amappl16 192 2909 0 2443 41 16 25 34 0 8 0 amappl15 184 187 0 183 1 0 1 1 0 8 0 amappl14 176 134 0 127 2 1 1 1 0 8 0 amappl13 168 126 0 122 1 0 1 1 0 8 0 amappl12 160 193 0 190 1 0 1 1 0 8 0 amappl11 152 153 0 138 1 0 1 1 0 8 0 amappl10 144 196 0 190 1 0 1 1 0 8 0 amappl9 136 632 0 629 1 0 1 1 0 8 0 amappl8 128 216 0 199 1 0 1 1 0 8 0 amappl7 120 154 0 149 1 0 1 1 0 8 0 amappl6 112 193 0 187 1 0 1 1 0 8 0 amappl5 104 294 0 280 1 0 1 1 0 8 0 amappl4 96 907 0 877 2 1 1 2 0 8 0 amappl3 88 224 0 217 1 0 1 1 0 8 0 amappl2 80 5082 0 5027 2 0 2 2 0 8 0 amappl1 72 26152 0 25707 26 16 10 20 0 8 0 amappl 72 2142 0 2108 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 23 0 2 1 0 1 1 0 8 0 uaddrrnd 24 742 0 726 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 742 0 726 1 0 1 1 0 8 0 vmmpekpl 168 9982 0 9958 2 0 2 2 0 8 0 vmmpepl 168 89454 0 87991 108 22 86 86 0 357 17 vmsppl 360 741 0 726 2 0 2 2 0 8 0 pdppl 4096 1492 0 1452 6 0 6 6 0 8 0 pvpl 32 263687 0 252788 137 37 100 125 0 265 1 pmappl 224 741 0 726 2 1 1 2 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 525 0 5 15 0 15 15 0 8 0