panic: malloc: out of space in kmem_map Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *274540 11326 0 0x2 0 0 syz-executor.1 db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 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,ffff800014a34b10,3,ffff8000ffff92c8) at kcovioctl+0xe6 kd_init sys/dev/kcov.c:405 [inline] kcovioctl(1b1300,80084b01,ffff800014a34b10,3,ffff8000ffff92c8) at kcovioctl+0xe6 sys/dev/kcov.c:298 VOP_IOCTL(fffffd80309ef7b0,80084b01,ffff800014a34b10,3,fffffd803f7c6a80,ffff8000ffff92c8) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd802eb59cb8,80084b01,ffff800014a34b10,ffff8000ffff92c8) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff8000ffff92c8,ffff800014a34c50,ffff800014a34c40) at sys_ioctl+0x638 syscall(ffff800014a34cf0) at syscall+0x541 Xsyscall(6,36,7f7ffffd4668,36,3,2c1d3832890) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffd4180, 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:398 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,ffff800014a34b10,3,ffff8000ffff92c8) at kcovioctl+0xe6 kd_init sys/dev/kcov.c:405 [inline] kcovioctl(1b1300,80084b01,ffff800014a34b10,3,ffff8000ffff92c8) at kcovioctl+0xe6 sys/dev/kcov.c:298 VOP_IOCTL(fffffd80309ef7b0,80084b01,ffff800014a34b10,3,fffffd803f7c6a80,ffff8000ffff92c8) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd802eb59cb8,80084b01,ffff800014a34b10,ffff8000ffff92c8) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff8000ffff92c8,ffff800014a34c50,ffff800014a34c40) at sys_ioctl+0x638 syscall(ffff800014a34cf0) at syscall+0x541 Xsyscall(6,36,7f7ffffd4668,36,3,2c1d3832890) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffd4180, count: -9 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff800014a34740 rbx 0xffff800014a347f0 rdx 0x2 rcx 0 rax 0 r8 0xffff800014a34700 r9 0x1 r10 0 r11 0xa73013612b75abde r12 0x3000000008 r13 0xffff800014a34750 r14 0x100 r15 0x1 rip 0xffffffff810e7008 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800014a34730 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.1) pid=274540 stat=onproc flags process=2 proc=0 pri=51, usrpri=51, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff84b8,0xffff8000ffff8720 process=0xffff8000ffff66a0 user=0xffff800014a2f000, vmspace=0xfffffd803f013000 estcpu=1, cpticks=2, pctcpu=0.0 user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND *11326 274540 82306 0 7 0x2 syz-executor.1 49769 286596 16285 0 2 0 syz-executor.0 49769 524071 16285 0 3 0x4000080 fsleep syz-executor.0 49769 493963 16285 0 3 0x4000080 fsleep syz-executor.0 16285 333096 82306 0 3 0x82 nanosleep syz-executor.0 99202 481425 0 0 3 0x14200 bored sosplice 82306 315841 29482 0 3 0x82 thrsleep syz-fuzzer 82306 74584 29482 0 3 0x4000082 thrsleep syz-fuzzer 82306 508339 29482 0 3 0x4000082 thrsleep syz-fuzzer 82306 72655 29482 0 3 0x4000082 thrsleep syz-fuzzer 82306 379577 29482 0 3 0x4000082 thrsleep syz-fuzzer 82306 130391 29482 0 3 0x4000082 kqread syz-fuzzer 82306 482481 29482 0 3 0x4000082 thrsleep syz-fuzzer 82306 243128 29482 0 3 0x4000082 thrsleep syz-fuzzer 29482 58584 61906 0 3 0x10008a pause ksh 61906 190167 56309 0 3 0x92 select sshd 65474 485581 1 0 3 0x100083 ttyin getty 56309 320149 1 0 3 0x80 select sshd 82094 39143 20086 73 2 0x100010 syslogd 20086 478311 1 0 3 0x100082 netio syslogd 74105 165455 1 77 3 0x100090 poll dhclient 11487 420489 1 0 3 0x80 poll dhclient 64003 306507 0 0 3 0x14200 pgzero zerothread 34242 41800 0 0 3 0x14200 aiodoned aiodoned 52819 221886 0 0 3 0x14200 syncer update 40690 64436 0 0 3 0x14200 cleaner cleaner 36806 56706 0 0 3 0x14200 reaper reaper 40118 389392 0 0 3 0x14200 pgdaemon pagedaemon 96873 497352 0 0 3 0x14200 bored crynlk 77872 439642 0 0 3 0x14200 bored crypto 72185 395495 0 0 3 0x40014200 acpi0 acpi0 22080 316930 0 0 3 0x14200 bored softnet 4343 162100 0 0 3 0x14200 bored systqmp 95371 432771 0 0 3 0x14200 bored systq 74164 419570 0 0 3 0x40014200 bored softclock 43166 454299 0 0 3 0x40014200 idle0 58095 482849 0 0 3 0x14200 bored smr 1 4626 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 9454 71863K 71863K 78643K 10621 0 0 pcb 23 9K 10K 78643K 135 0 0 rtable 82 3K 3K 78643K 327 0 0 ifaddr 37 10K 11K 78643K 81 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 19 0 0 iov 0 0K 12K 78643K 6 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1204 75K 76K 78643K 1348 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 4 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 4 0K 0K 78643K 4 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12537 0 0 file desc 5 13K 21K 78643K 166 0 0 sigio 0 0K 0K 78643K 4 0 0 proc 44 38K 46K 78643K 374 0 0 subproc 53 55297K 67586K 78643K 225 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 17 0 0 in_multi 22 1K 2K 78643K 90 0 0 ether_multi 1 0K 0K 78643K 2 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 196 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 69 12K 38K 78643K 1145 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 ip6_options 0 0K 0K 78643K 4 0 0 NDP 6 0K 0K 78643K 26 0 0 temp 86 2345K 2411K 78643K 3550 0 0 kqueue 0 0K 0K 78643K 2 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 8 0 5 1 0 1 1 0 8 0 inpcbpl 280 90 0 83 1 0 1 1 0 8 0 plimitpl 152 25 0 18 1 0 1 1 0 8 0 rtentry 112 77 0 46 2 0 2 2 0 8 0 syncache 264 4 0 4 2 2 0 1 0 8 0 tcpcb 544 32 0 28 1 0 1 1 0 8 0 nd6 48 12 0 10 1 0 1 1 0 8 0 ppxss 1128 3 0 3 2 1 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 356 0 212 12 0 12 12 0 8 2 art_table 32 357 0 212 2 0 2 2 0 8 0 art_node 16 76 0 48 1 0 1 1 0 8 0 semapl 112 2 0 0 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 1649 0 226 46 0 46 46 0 8 0 ffsino 240 1649 0 226 84 0 84 84 0 8 0 nchpl 144 2071 0 446 61 0 61 61 0 8 0 uvmvnodes 72 1782 0 0 33 0 33 33 0 8 0 vnodes 200 1782 0 0 94 0 94 94 0 8 0 namei 1024 5404 0 5404 4 3 1 1 0 8 1 scxspl 192 6823 0 6823 10 9 1 6 0 8 1 sigapl 432 321 0 308 2 0 2 2 0 8 0 futexpl 56 1790 0 1788 2 1 1 1 0 8 0 knotepl 112 185 0 164 1 0 1 1 0 8 0 kqueuepl 104 36 0 34 1 0 1 1 0 8 0 pipepl 112 278 0 259 4 3 1 2 0 8 0 fdescpl 424 322 0 308 2 0 2 2 0 8 0 filepl 120 1810 0 1720 5 1 4 4 0 8 1 lockfpl 104 40 0 40 3 2 1 1 0 8 1 lockfspl 32 17 0 17 3 2 1 1 0 8 1 sessionpl 112 21 0 12 1 0 1 1 0 8 0 pgrppl 48 23 0 14 1 0 1 1 0 8 0 ucredpl 96 240 0 233 1 0 1 1 0 8 0 zombiepl 144 308 0 308 3 2 1 1 0 8 1 processpl 840 337 0 308 4 0 4 4 0 8 0 procpl 600 489 0 451 4 0 4 4 0 8 1 sosppl 128 6 0 6 2 1 1 1 0 8 1 sockpl 384 196 0 179 4 1 3 3 0 8 1 mcl64k 65536 6 0 6 2 1 1 1 0 8 1 mcl9k 9216 2 0 2 1 1 0 1 0 8 0 mcl4k 4096 14 0 14 4 3 1 1 0 8 1 mcl2k 2048 47586 0 47555 11 5 6 9 0 8 1 mtagpl 80 2 0 2 1 1 0 1 0 8 0 mbufpl 256 79071 0 79019 9 2 7 7 0 8 1 bufpl 256 6903 0 1285 352 0 352 352 0 8 0 anonpl 16 41651 0 34639 55 3 52 53 0 62 17 amapchunkpl 152 1639 0 1557 16 2 14 15 0 158 10 amappl16 192 964 0 532 23 0 23 23 0 8 1 amappl15 184 83 0 78 1 0 1 1 0 8 0 amappl14 176 58 0 56 3 2 1 1 0 8 0 amappl13 168 57 0 51 1 0 1 1 0 8 0 amappl12 160 34 0 33 2 1 1 1 0 8 0 amappl11 152 51 0 40 1 0 1 1 0 8 0 amappl10 144 55 0 54 4 3 1 1 0 8 0 amappl9 136 240 0 236 1 0 1 1 0 8 0 amappl8 128 155 0 141 1 0 1 1 0 8 0 amappl7 120 35 0 29 1 0 1 1 0 8 0 amappl6 112 59 0 52 1 0 1 1 0 8 0 amappl5 104 846 0 836 1 0 1 1 0 8 0 amappl4 96 503 0 475 2 1 1 2 0 8 0 amappl3 88 165 0 160 1 0 1 1 0 8 0 amappl2 80 1691 0 1640 2 0 2 2 0 8 0 amappl1 72 15034 0 14618 24 14 10 19 0 8 0 amappl 72 738 0 706 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 322 0 308 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 322 0 308 1 0 1 1 0 8 0 vmmpekpl 168 6528 0 6504 2 0 2 2 0 8 0 vmmpepl 168 42629 0 41283 105 27 78 78 0 357 16 vmsppl 264 321 0 308 3 1 2 2 0 8 1 pdppl 4096 650 0 616 5 0 5 5 0 8 0 pvpl 32 180058 0 169555 257 36 221 243 0 265 127 pmappl 192 321 0 308 1 0 1 1 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 490 0 16 14 0 14 14 0 8 0