panic: malloc: out of space in kmem_map Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *169256 98992 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,ffff8000149f6b70,3,ffff8000ffff3788) at kcovioctl+0xe6 kd_init sys/dev/kcov.c:405 [inline] kcovioctl(1b1300,80084b01,ffff8000149f6b70,3,ffff8000ffff3788) at kcovioctl+0xe6 sys/dev/kcov.c:298 VOP_IOCTL(fffffd8029e809b8,80084b01,ffff8000149f6b70,3,fffffd803f7c6ae0,ffff8000ffff3788) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd802facf178,80084b01,ffff8000149f6b70,ffff8000ffff3788) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff8000ffff3788,ffff8000149f6cb0,ffff8000149f6ca0) at sys_ioctl+0x638 syscall(ffff8000149f6d50) at syscall+0x541 Xsyscall(6,36,7f7ffffecf88,36,3,66914f89890) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffecaa0, 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,ffff8000149f6b70,3,ffff8000ffff3788) at kcovioctl+0xe6 kd_init sys/dev/kcov.c:405 [inline] kcovioctl(1b1300,80084b01,ffff8000149f6b70,3,ffff8000ffff3788) at kcovioctl+0xe6 sys/dev/kcov.c:298 VOP_IOCTL(fffffd8029e809b8,80084b01,ffff8000149f6b70,3,fffffd803f7c6ae0,ffff8000ffff3788) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd802facf178,80084b01,ffff8000149f6b70,ffff8000ffff3788) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff8000ffff3788,ffff8000149f6cb0,ffff8000149f6ca0) at sys_ioctl+0x638 syscall(ffff8000149f6d50) at syscall+0x541 Xsyscall(6,36,7f7ffffecf88,36,3,66914f89890) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffecaa0, count: -9 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff8000149f67a0 rbx 0xffff8000149f6850 rdx 0x2 rcx 0 rax 0 r8 0xffff8000149f6760 r9 0x1 r10 0 r11 0x5058d14ccdba9cfc r12 0x3000000008 r13 0xffff8000149f67b0 r14 0x100 r15 0x1 rip 0xffffffff81679bb8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff8000149f6790 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.0) pid=169256 stat=onproc flags process=2 proc=0 pri=51, usrpri=51, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff2e28,0xffffffff822df660 process=0xffff8000ffff6010 user=0xffff8000149f1000, vmspace=0xfffffd803f014738 estcpu=1, cpticks=3, pctcpu=0.0 user=0, sys=1, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND *98992 169256 90858 0 7 0x2 syz-executor.0 59308 502795 16209 0 3 0x80 fsleep syz-executor.1 59308 22727 16209 0 3 0x4000080 ttyout syz-executor.1 16209 304275 90858 0 3 0x82 nanosleep syz-executor.1 2019 363087 1 0 3 0x100083 ttyin getty 81453 317211 0 0 3 0x14200 bored sosplice 90858 109650 12182 0 3 0x82 thrsleep syz-fuzzer 90858 418810 12182 0 3 0x4000082 thrsleep syz-fuzzer 90858 510696 12182 0 3 0x4000082 thrsleep syz-fuzzer 90858 421467 12182 0 3 0x4000082 kqread syz-fuzzer 90858 142912 12182 0 3 0x4000082 thrsleep syz-fuzzer 90858 229606 12182 0 3 0x4000082 thrsleep syz-fuzzer 90858 184103 12182 0 3 0x4000082 thrsleep syz-fuzzer 90858 378417 12182 0 3 0x4000082 thrsleep syz-fuzzer 90858 302701 12182 0 3 0x4000082 thrsleep syz-fuzzer 12182 286770 7660 0 3 0x10008a pause ksh 7660 398839 66074 0 3 0x92 select sshd 66074 372055 1 0 3 0x80 select sshd 13279 227941 73767 73 3 0x100090 kqread syslogd 73767 195638 1 0 3 0x100082 netio syslogd 97996 243122 1 77 3 0x100090 poll dhclient 89258 101529 1 0 3 0x80 poll dhclient 57596 389199 0 0 3 0x14200 pgzero zerothread 11690 462085 0 0 3 0x14200 aiodoned aiodoned 22212 10645 0 0 3 0x14200 syncer update 74175 207311 0 0 3 0x14200 cleaner cleaner 29603 287095 0 0 3 0x14200 reaper reaper 85981 366437 0 0 3 0x14200 pgdaemon pagedaemon 1872 92449 0 0 3 0x14200 bored crynlk 84439 63074 0 0 3 0x14200 bored crypto 72982 93709 0 0 3 0x40014200 acpi0 acpi0 38251 160077 0 0 3 0x14200 bored softnet 86656 161021 0 0 3 0x14200 bored systqmp 74694 86340 0 0 3 0x14200 bored systq 27122 498776 0 0 3 0x40014200 bored softclock 45405 119475 0 0 3 0x40014200 idle0 21229 466917 0 0 3 0x14200 bored smr 1 156040 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 9509 71883K 71903K 78643K 11421 0 0 pcb 23 9K 12K 78643K 1243 0 0 rtable 85 3K 4K 78643K 1099 0 0 ifaddr 53 13K 15K 78643K 386 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 68 0 0 iov 0 0K 24K 78643K 379 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1187 74K 75K 78643K 2297 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 37 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 0K 1K 78643K 321 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12537 0 0 file desc 5 13K 21K 78643K 2277 0 0 sigio 0 0K 0K 78643K 55 0 0 proc 42 30K 46K 78643K 918 0 0 subproc 53 55297K 67586K 78643K 609 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 301 0 0 in_multi 22 1K 2K 78643K 278 0 0 ether_multi 1 0K 0K 78643K 14 0 0 mrt 0 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 90 397K 397K 78643K 90 0 0 exec 0 0K 1K 78643K 416 0 0 pfkey data 0 0K 0K 78643K 4 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 6410 0 0 UVM aobj 130 4K 4K 78643K 140 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 95 0 0 NDP 11 0K 0K 78643K 123 0 0 temp 158 2358K 2487K 78643K 9885 0 0 kqueue 0 0K 0K 78643K 27 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 19 0 16 1 0 1 1 0 8 0 inpcbpl 280 1228 0 1221 2 1 1 2 0 8 0 plimitpl 152 78 0 71 1 0 1 1 0 8 0 rtentry 112 178 0 147 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpcb 544 480 0 476 1 0 1 1 0 8 0 nd6 48 34 0 32 1 0 1 1 0 8 0 ppxss 1128 48 0 48 13 13 0 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 827 0 680 12 0 12 12 0 8 1 art_table 32 828 0 680 2 0 2 2 0 8 0 art_node 16 175 0 147 1 0 1 1 0 8 0 sysvmsgpl 40 17 0 13 2 1 1 1 0 8 0 semapl 112 319 0 309 1 0 1 1 0 8 0 shmpl 112 138 0 10 4 0 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 5204 0 3702 49 0 49 49 0 8 0 ffsino 240 5204 0 3702 90 1 89 89 0 8 0 nchpl 144 8612 0 6923 63 0 63 63 0 8 0 uvmvnodes 72 5686 0 0 104 0 104 104 0 8 0 vnodes 200 5686 0 0 300 0 300 300 0 8 0 namei 1024 28150 0 28150 3 2 1 1 0 8 1 scsiplug 64 5 0 5 3 3 0 1 0 8 0 scxspl 192 31528 0 31528 15 14 1 6 0 8 1 sigapl 432 2401 0 2388 2 0 2 2 0 8 0 futexpl 56 36935 0 36934 2 1 1 1 0 8 0 knotepl 112 809 0 780 7 6 1 2 0 8 0 kqueuepl 104 638 0 636 1 0 1 1 0 8 0 pipepl 112 1644 0 1625 4 3 1 2 0 8 0 fdescpl 424 2402 0 2388 2 0 2 2 0 8 0 filepl 120 15696 0 15606 7 3 4 6 0 8 1 lockfpl 104 791 0 791 7 6 1 1 0 8 1 lockfspl 32 873 0 873 6 5 1 1 0 8 1 sessionpl 112 36 0 27 1 0 1 1 0 8 0 pgrppl 48 71 0 62 1 0 1 1 0 8 0 ucredpl 96 3460 0 3453 1 0 1 1 0 8 0 zombiepl 144 2388 0 2388 2 1 1 1 0 8 1 processpl 840 2417 0 2388 4 0 4 4 0 8 0 procpl 600 5446 0 5408 4 0 4 4 0 8 0 sosppl 128 34 0 34 10 10 0 1 0 8 0 sockpl 384 2276 0 2259 8 5 3 4 0 8 1 mcl64k 65536 1977 0 1977 129 129 0 32 0 8 0 mcl16k 16384 7 0 7 6 6 0 1 0 8 0 mcl12k 12288 47 0 47 14 14 0 1 0 8 0 mcl9k 9216 38 0 38 13 13 0 1 0 8 0 mcl8k 8192 41 0 41 11 11 0 1 0 8 0 mcl4k 4096 116 0 116 12 11 1 1 0 8 1 mcl2k2 2112 12 0 12 8 8 0 1 0 8 0 mcl2k 2048 50113 0 50078 11 6 5 9 0 8 0 mtagpl 80 2 0 2 1 1 0 1 0 8 0 mbufpl 256 96626 0 96570 84 77 7 21 0 8 0 bufpl 256 10751 0 6332 278 1 277 277 0 8 0 anonpl 16 272770 0 265677 133 94 39 53 0 62 0 amapchunkpl 152 10444 0 10365 17 13 4 8 0 158 0 amappl16 192 14885 0 14411 139 114 25 37 0 8 0 amappl15 184 143 0 140 1 0 1 1 0 8 0 amappl14 176 181 0 176 1 0 1 1 0 8 0 amappl13 168 341 0 337 1 0 1 1 0 8 0 amappl12 160 440 0 439 1 0 1 1 0 8 0 amappl11 152 832 0 821 1 0 1 1 0 8 0 amappl10 144 337 0 336 2 1 1 1 0 8 0 amappl9 136 1115 0 1110 1 0 1 1 0 8 0 amappl8 128 650 0 622 1 0 1 1 0 8 0 amappl7 120 504 0 498 1 0 1 1 0 8 0 amappl6 112 132 0 123 1 0 1 1 0 8 0 amappl5 104 242 0 231 1 0 1 1 0 8 0 amappl4 96 759 0 736 1 0 1 1 0 8 0 amappl3 88 410 0 403 1 0 1 1 0 8 0 amappl2 80 21902 0 21855 3 1 2 2 0 8 0 amappl1 72 53055 0 52645 24 15 9 19 0 8 0 amappl 72 5775 0 5745 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 139 0 10 3 0 3 3 0 8 0 uaddrrnd 24 2402 0 2388 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 2402 0 2388 1 0 1 1 0 8 0 vmmpekpl 168 19976 0 19957 2 0 2 2 0 8 0 vmmpepl 168 264818 0 263431 188 105 83 83 0 357 15 vmsppl 264 2401 0 2388 3 2 1 2 0 8 0 pdppl 4096 4810 0 4776 5 0 5 5 0 8 0 pvpl 32 763479 0 753368 279 177 102 138 0 265 2 pmappl 192 2401 0 2388 1 0 1 1 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 648 0 246 14 1 13 13 0 8 0