panic: malloc: out of space in kmem_map Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *105221 2150 0 0x2 0 0 syz-executor.0 db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:399 panic() at panic+0x15c sys/kern/subr_prf.c:208 malloc(200000,2a,9) at malloc+0xa79 sys/kern/kern_malloc.c:242 kcovioctl(1b1300,80084b01,ffff800014a18590,3,ffff8000149e9088) at kcovioctl+0xe6 kd_init sys/dev/kcov.c:405 [inline] kcovioctl(1b1300,80084b01,ffff800014a18590,3,ffff8000149e9088) at kcovioctl+0xe6 sys/dev/kcov.c:298 VOP_IOCTL(fffffd802cd29898,80084b01,ffff800014a18590,3,fffffd803f7c6840,ffff8000149e9088) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd803a188cc0,80084b01,ffff800014a18590,ffff8000149e9088) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff8000149e9088,ffff800014a186d0,ffff800014a186c0) at sys_ioctl+0x638 syscall(ffff800014a18770) at syscall+0x541 Xsyscall(6,36,7f7ffffe6a58,36,3,f54795e2890) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffe6570, 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> ddb> set $lines = 0 ddb> set $maxwidth = 0 ddb> show panic malloc: out of space in kmem_map ddb> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:399 panic() at panic+0x15c sys/kern/subr_prf.c:208 malloc(200000,2a,9) at malloc+0xa79 sys/kern/kern_malloc.c:242 kcovioctl(1b1300,80084b01,ffff800014a18590,3,ffff8000149e9088) at kcovioctl+0xe6 kd_init sys/dev/kcov.c:405 [inline] kcovioctl(1b1300,80084b01,ffff800014a18590,3,ffff8000149e9088) at kcovioctl+0xe6 sys/dev/kcov.c:298 VOP_IOCTL(fffffd802cd29898,80084b01,ffff800014a18590,3,fffffd803f7c6840,ffff8000149e9088) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd803a188cc0,80084b01,ffff800014a18590,ffff8000149e9088) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff8000149e9088,ffff800014a186d0,ffff800014a186c0) at sys_ioctl+0x638 syscall(ffff800014a18770) at syscall+0x541 Xsyscall(6,36,7f7ffffe6a58,36,3,f54795e2890) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffe6570, count: -9 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff800014a181c0 rbx 0xffff800014a18270 rdx 0x2 rcx 0 rax 0 r8 0xffff800014a18180 r9 0x1 r10 0 r11 0xd1694c663e399b70 r12 0x3000000008 r13 0xffff800014a181d0 r14 0x100 r15 0x1 rip 0xffffffff81235868 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800014a181b0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.0) pid=105221 stat=onproc flags process=2 proc=0 pri=50, usrpri=50, nice=20 forw=0xffffffffffffffff, list=0xffff8000149e8278,0xffffffff8224c108 process=0xffff800014953710 user=0xffff800014a13000, vmspace=0xfffffd803f013e70 estcpu=0, cpticks=3, pctcpu=0.0 user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND * 2150 105221 25189 0 7 0x2 syz-executor.0 98329 398689 25189 0 3 0x82 piperd syz-executor.1 54685 442820 1 0 3 0x100083 ttyin getty 8056 351222 0 0 3 0x14200 bored sosplice 25189 19070 98369 0 3 0x82 thrsleep syz-fuzzer 25189 379559 98369 0 3 0x4000082 thrsleep syz-fuzzer 25189 165890 98369 0 3 0x4000082 thrsleep syz-fuzzer 25189 185516 98369 0 3 0x4000082 thrsleep syz-fuzzer 25189 354557 98369 0 3 0x4000082 thrsleep syz-fuzzer 25189 492358 98369 0 3 0x4000082 thrsleep syz-fuzzer 25189 169403 98369 0 3 0x4000082 thrsleep syz-fuzzer 25189 473402 98369 0 3 0x4000082 kqread syz-fuzzer 98369 200243 56276 0 3 0x10008a pause ksh 56276 437439 75923 0 3 0x92 select sshd 75923 452614 1 0 3 0x80 select sshd 90130 152478 40497 73 3 0x100010 ffs_fsync syslogd 40497 176915 1 0 3 0x100082 netio syslogd 65293 466487 1 77 3 0x100090 poll dhclient 99518 85300 1 0 3 0x80 poll dhclient 96715 126101 0 0 3 0x14200 pgzero zerothread 6569 36070 0 0 3 0x14200 aiodoned aiodoned 25470 435519 0 0 3 0x14200 syncer update 5171 13724 0 0 3 0x14200 cleaner cleaner 55225 167878 0 0 3 0x14200 reaper reaper 903 422190 0 0 3 0x14200 pgdaemon pagedaemon 66523 223829 0 0 3 0x14200 bored crynlk 23202 128980 0 0 3 0x14200 bored crypto 70348 478687 0 0 3 0x40014200 acpi0 acpi0 20132 192611 0 0 3 0x14200 bored softnet 52168 76305 0 0 3 0x14200 bored systqmp 82808 1744 0 0 3 0x14200 bored systq 53936 373805 0 0 3 0x40014200 bored softclock 35250 321179 0 0 3 0x40014200 idle0 45517 143836 0 0 3 0x14200 bored smr 1 191642 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 Kern Lim devbuf 9548 71902K 71910K 78643K 12892 0 0 pcb 23 9K 11K 78643K 2665 0 0 rtable 82 3K 4K 78643K 2336 0 0 ifaddr 69 17K 19K 78643K 784 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 89 0 0 iov 0 0K 28K 78643K 664 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1202 75K 76K 78643K 4956 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 45 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 0K 0K 78643K 630 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12537 0 0 file desc 4 9K 25K 78643K 6123 0 0 sigio 0 0K 0K 78643K 56 0 0 proc 42 30K 54K 78643K 1524 0 0 subproc 53 55297K 67586K 78643K 1372 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 572 0 0 in_multi 22 1K 2K 78643K 707 0 0 ether_multi 1 0K 0K 78643K 86 0 0 mrt 0 0K 0K 78643K 15 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 114 503K 503K 78643K 114 0 0 exec 0 0K 1K 78643K 900 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 91 13K 23K 78643K 16153 0 0 UVM aobj 130 4K 4K 78643K 144 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 205 0 0 NDP 16 0K 1K 78643K 274 0 0 temp 192 2355K 2433K 78643K 20696 0 0 kqueue 0 0K 0K 78643K 48 0 0 SYN cache 2 16K 16K 78643K 2 0 0 ddb> show all pools Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle arp 64 39 0 36 1 0 1 1 0 8 0 inpcbpl 280 2115 0 2108 1 0 1 1 0 8 0 plimitpl 152 375 0 368 1 0 1 1 0 8 0 rtentry 112 361 0 330 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 1 0 1 1 1 0 1 0 8 0 tcpcb 544 732 0 728 1 0 1 1 0 8 0 nd6 48 74 0 72 1 0 1 1 0 8 0 ppxss 1128 128 0 127 10 9 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 1687 0 1540 12 0 12 12 0 8 1 art_table 32 1688 0 1540 2 0 2 2 0 8 0 art_node 16 355 0 327 1 0 1 1 0 8 0 semapl 112 628 0 618 1 0 1 1 0 8 0 shmpl 112 142 0 14 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 12652 0 11068 53 1 52 52 0 8 0 ffsino 240 12652 0 11068 94 0 94 94 0 8 0 nchpl 144 20481 0 18761 66 1 65 65 0 8 0 uvmvnodes 72 5926 0 0 108 0 108 108 0 8 0 vnodes 200 5926 0 0 312 0 312 312 0 8 0 namei 1024 61704 0 61704 4 3 1 1 0 8 1 scsiplug 64 12 0 12 6 6 0 1 0 8 0 scxspl 192 121218 0 121217 22 19 3 6 0 8 2 sigapl 432 6190 0 6178 2 0 2 2 0 8 0 futexpl 56 66718 0 66718 4 3 1 1 0 8 1 knotepl 112 1616 0 1587 4 2 2 2 0 8 1 kqueuepl 104 1016 0 1014 1 0 1 1 0 8 0 pipepl 112 2644 0 2625 3 2 1 2 0 8 0 fdescpl 424 6191 0 6178 2 0 2 2 0 8 0 filepl 120 31874 0 31786 7 3 4 5 0 8 1 lockfpl 104 1360 0 1360 25 24 1 1 0 8 1 lockfspl 32 1647 0 1647 25 24 1 1 0 8 1 sessionpl 112 59 0 50 1 0 1 1 0 8 0 pgrppl 48 128 0 119 1 0 1 1 0 8 0 ucredpl 96 10075 0 10068 1 0 1 1 0 8 0 zombiepl 144 6178 0 6178 2 1 1 1 0 8 1 processpl 840 6206 0 6178 4 0 4 4 0 8 0 procpl 600 14526 0 14491 5 1 4 4 0 8 0 sosppl 128 78 0 78 12 11 1 1 0 8 1 sockpl 384 4454 0 4437 16 14 2 4 0 8 0 mcl64k 65536 1433 0 1433 101 100 1 29 0 8 1 mcl16k 16384 9 0 9 6 6 0 1 0 8 0 mcl12k 12288 151 0 151 25 25 0 1 0 8 0 mcl9k 9216 125 0 125 19 19 0 1 0 8 0 mcl8k 8192 71 0 71 18 18 0 1 0 8 0 mcl4k 4096 481 0 481 19 19 0 1 0 8 0 mcl2k2 2112 52 0 52 11 11 0 1 0 8 0 mcl2k 2048 29993 0 29958 48 41 7 9 0 8 2 mtagpl 80 4 0 4 2 2 0 1 0 8 0 mbufpl 256 110576 0 110530 74 65 9 20 0 8 2 bufpl 256 23007 0 17405 351 0 351 351 0 8 0 anonpl 16 1105549 0 1101353 133 97 36 50 0 62 4 amapchunkpl 152 35464 0 35387 51 37 14 14 0 158 8 amappl16 192 58626 0 58418 143 127 16 33 0 8 0 amappl15 184 1435 0 1434 1 0 1 1 0 8 0 amappl14 176 2059 0 2051 1 0 1 1 0 8 0 amappl13 168 199 0 196 1 0 1 1 0 8 0 amappl12 160 2588 0 2588 4 3 1 1 0 8 1 amappl11 152 1428 0 1419 1 0 1 1 0 8 0 amappl10 144 77 0 75 2 1 1 1 0 8 0 amappl9 136 1089 0 1084 1 0 1 1 0 8 0 amappl8 128 2642 0 2615 2 0 2 2 0 8 0 amappl7 120 277 0 269 1 0 1 1 0 8 0 amappl6 112 692 0 683 1 0 1 1 0 8 0 amappl5 104 1634 0 1623 1 0 1 1 0 8 0 amappl4 96 1008 0 988 1 0 1 1 0 8 0 amappl3 88 462 0 456 1 0 1 1 0 8 0 amappl2 80 58879 0 58838 2 0 2 2 0 8 0 amappl1 72 119931 0 119545 23 12 11 18 0 8 0 amappl 72 15148 0 15120 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 143 0 14 3 0 3 3 0 8 0 uaddrrnd 24 6191 0 6178 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 6191 0 6178 1 0 1 1 0 8 0 vmmpekpl 168 44428 0 44407 3 1 2 2 0 8 0 vmmpepl 168 760661 0 759633 228 170 58 73 0 357 1 vmsppl 264 6190 0 6178 9 7 2 2 0 8 1 pdppl 4096 12388 0 12356 6 0 6 6 0 8 1 pvpl 32 3738237 0 3731029 574 392 182 209 0 265 103 pmappl 192 6190 0 6178 1 0 1 1 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 740 0 254 15 0 15 15 0 8 0