panic: malloc: out of space in kmem_map Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *166968 69811 0 0x2 0 0 syz-executor.0 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(1c1300,80084b01,ffff8000149d5f90,3,ffff8000149f3790) at kcovioctl+0xe6 kd_init sys/dev/kcov.c:405 [inline] kcovioctl(1c1300,80084b01,ffff8000149d5f90,3,ffff8000149f3790) at kcovioctl+0xe6 sys/dev/kcov.c:298 VOP_IOCTL(fffffd80282d4138,80084b01,ffff8000149d5f90,3,fffffd803f7c6900,ffff8000149f3790) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd803e3193d8,80084b01,ffff8000149d5f90,ffff8000149f3790) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff8000149f3790,ffff8000149d60d0,ffff8000149d60c0) at sys_ioctl+0x638 syscall(ffff8000149d6170) at syscall+0x541 Xsyscall(6,36,7f7ffffc6468,36,3,4fe26dfe958) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffc5f80, 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(1c1300,80084b01,ffff8000149d5f90,3,ffff8000149f3790) at kcovioctl+0xe6 kd_init sys/dev/kcov.c:405 [inline] kcovioctl(1c1300,80084b01,ffff8000149d5f90,3,ffff8000149f3790) at kcovioctl+0xe6 sys/dev/kcov.c:298 VOP_IOCTL(fffffd80282d4138,80084b01,ffff8000149d5f90,3,fffffd803f7c6900,ffff8000149f3790) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd803e3193d8,80084b01,ffff8000149d5f90,ffff8000149f3790) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff8000149f3790,ffff8000149d60d0,ffff8000149d60c0) at sys_ioctl+0x638 syscall(ffff8000149d6170) at syscall+0x541 Xsyscall(6,36,7f7ffffc6468,36,3,4fe26dfe958) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffc5f80, count: -9 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff8000149d5bc0 rbx 0xffff8000149d5c70 rdx 0x2 rcx 0 rax 0 r8 0xffff8000149d5b80 r9 0x1 r10 0 r11 0x34c4bffe9d409c9 r12 0x3000000008 r13 0xffff8000149d5bd0 r14 0x100 r15 0x1 rip 0xffffffff819129c8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff8000149d5bb0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.0) pid=166968 stat=onproc flags process=2 proc=0 pri=51, usrpri=51, nice=20 forw=0xffffffffffffffff, list=0xffff8000149f24d0,0xffffffff822dfc38 process=0xffff8000ffff7708 user=0xffff8000149d1000, vmspace=0xfffffd803f013528 estcpu=1, cpticks=2, pctcpu=0.0 user=0, sys=2, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND *69811 166968 17366 0 7 0x2 syz-executor.0 66946 67717 0 0 3 0x14200 bored sosplice 23562 345309 17366 0 3 0x82 piperd syz-executor.1 93815 503017 1 0 3 0x100083 ttyin getty 17366 256172 66172 0 3 0x82 thrsleep syz-fuzzer 17366 453188 66172 0 3 0x4000082 thrsleep syz-fuzzer 17366 72317 66172 0 3 0x4000082 thrsleep syz-fuzzer 17366 122253 66172 0 3 0x4000082 kqread syz-fuzzer 17366 196619 66172 0 3 0x4000082 thrsleep syz-fuzzer 17366 429606 66172 0 3 0x4000082 thrsleep syz-fuzzer 17366 343818 66172 0 3 0x4000082 thrsleep syz-fuzzer 17366 70343 66172 0 3 0x4000082 thrsleep syz-fuzzer 66172 161215 9135 0 3 0x10008a pause ksh 9135 261557 5320 0 3 0x92 select sshd 5320 296716 1 0 3 0x80 select sshd 87359 340232 57755 73 3 0x100090 kqread syslogd 57755 318111 1 0 3 0x100082 netio syslogd 70497 504280 1 77 3 0x100090 poll dhclient 52407 392388 1 0 3 0x80 poll dhclient 58159 220016 0 0 3 0x14200 pgzero zerothread 94247 516481 0 0 3 0x14200 aiodoned aiodoned 86064 368238 0 0 3 0x14200 syncer update 24573 273515 0 0 3 0x14200 cleaner cleaner 69223 297339 0 0 3 0x14200 reaper reaper 78283 443566 0 0 3 0x14200 pgdaemon pagedaemon 53725 268293 0 0 3 0x14200 bored crynlk 43168 96833 0 0 3 0x14200 bored crypto 81255 106704 0 0 3 0x40014200 acpi0 acpi0 11684 141962 0 0 3 0x14200 bored softnet 6860 361660 0 0 3 0x14200 bored systqmp 59943 253107 0 0 3 0x14200 bored systq 40443 203276 0 0 3 0x40014200 bored softclock 36646 389038 0 0 3 0x40014200 idle0 57080 123450 0 0 3 0x14200 bored smr 1 374623 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 9458 71863K 71871K 78643K 10631 0 0 pcb 23 9K 10K 78643K 223 0 0 rtable 82 3K 3K 78643K 303 0 0 ifaddr 37 10K 11K 78643K 79 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 18 0 0 iov 0 0K 28K 78643K 59 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1194 75K 75K 78643K 1434 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 7 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 1K 1K 78643K 43 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12537 0 0 file desc 4 9K 25K 78643K 303 0 0 sigio 0 0K 0K 78643K 4 0 0 proc 41 30K 54K 78643K 339 0 0 subproc 55 57345K 67586K 78643K 193 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 33 0 0 in_multi 22 1K 2K 78643K 72 0 0 ether_multi 1 0K 0K 78643K 1 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 66 291K 291K 78643K 66 0 0 exec 0 0K 1K 78643K 214 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 72 12K 22K 78643K 1542 0 0 UVM aobj 26 2K 2K 78643K 26 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 23 0 0 NDP 6 0K 0K 78643K 24 0 0 temp 88 2349K 2415K 78643K 3838 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 7 0 4 1 0 1 1 0 8 0 inpcbpl 280 169 0 162 1 0 1 1 0 8 0 plimitpl 152 28 0 21 1 0 1 1 0 8 0 rtentry 112 68 0 37 2 0 2 2 0 8 1 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpcb 544 66 0 62 1 0 1 1 0 8 0 nd6 48 10 0 8 1 0 1 1 0 8 0 ppxss 1128 4 0 4 3 2 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 316 0 171 12 0 12 12 0 8 2 art_table 32 317 0 171 2 0 2 2 0 8 0 art_node 16 67 0 39 1 0 1 1 0 8 0 sysvmsgpl 40 2 0 0 1 0 1 1 0 8 0 semupl 112 2 0 2 1 1 0 1 0 8 0 semapl 112 41 0 31 1 0 1 1 0 8 0 shmpl 112 24 0 0 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 1966 0 559 46 0 46 46 0 8 0 ffsino 240 1966 0 559 84 0 84 84 0 8 0 nchpl 144 2617 0 1000 61 0 61 61 0 8 0 uvmvnodes 72 2099 0 0 39 0 39 39 0 8 0 vnodes 200 2099 0 0 111 0 111 111 0 8 0 namei 1024 7100 0 7100 3 2 1 1 0 8 1 scxspl 192 11444 0 11444 9 6 3 6 0 8 3 sigapl 432 462 0 450 2 0 2 2 0 8 0 futexpl 56 5087 0 5087 2 1 1 1 0 8 1 knotepl 112 176 0 155 1 0 1 1 0 8 0 kqueuepl 104 54 0 52 1 0 1 1 0 8 0 pipepl 112 378 0 359 4 2 2 2 0 8 1 fdescpl 424 463 0 450 2 0 2 2 0 8 0 filepl 120 2871 0 2782 6 1 5 5 0 8 2 lockfpl 104 151 0 151 3 2 1 1 0 8 1 lockfspl 32 123 0 123 3 2 1 1 0 8 1 sessionpl 112 21 0 12 1 0 1 1 0 8 0 pgrppl 48 21 0 12 1 0 1 1 0 8 0 ucredpl 96 545 0 538 1 0 1 1 0 8 0 zombiepl 144 450 0 450 2 1 1 1 0 8 1 processpl 840 478 0 450 4 0 4 4 0 8 0 procpl 600 857 0 822 5 1 4 4 0 8 0 sosppl 128 1 0 1 1 1 0 1 0 8 0 sockpl 384 347 0 330 4 1 3 3 0 8 1 mcl64k 65536 10 0 10 2 1 1 1 0 8 1 mcl16k 16384 2 0 2 1 0 1 1 0 8 1 mcl12k 12288 9 0 9 3 2 1 1 0 8 1 mcl9k 9216 4 0 4 2 1 1 1 0 8 1 mcl8k 8192 4 0 4 2 1 1 1 0 8 1 mcl4k 4096 23 0 23 3 2 1 1 0 8 1 mcl2k2 2112 3 0 3 2 2 0 1 0 8 0 mcl2k 2048 47836 0 47796 14 8 6 12 0 8 0 mtagpl 80 2 0 2 1 1 0 1 0 8 0 mbufpl 256 79804 0 79741 12 5 7 8 0 8 0 bufpl 256 8122 0 2446 355 0 355 355 0 8 0 anonpl 16 64530 0 57462 55 13 42 53 0 62 1 amapchunkpl 152 2530 0 2453 14 9 5 14 0 158 0 amappl16 192 2119 0 1654 37 11 26 36 0 8 2 amappl15 184 49 0 45 1 0 1 1 0 8 0 amappl14 176 79 0 77 2 1 1 1 0 8 0 amappl13 168 26 0 23 1 0 1 1 0 8 0 amappl12 160 108 0 105 1 0 1 1 0 8 0 amappl11 152 21 0 8 1 0 1 1 0 8 0 amappl10 144 66 0 66 2 2 0 1 0 8 0 amappl9 136 628 0 623 1 0 1 1 0 8 0 amappl8 128 206 0 191 1 0 1 1 0 8 0 amappl7 120 32 0 27 1 0 1 1 0 8 0 amappl6 112 61 0 53 1 0 1 1 0 8 0 amappl5 104 184 0 174 1 0 1 1 0 8 0 amappl4 96 599 0 575 2 1 1 2 0 8 0 amappl3 88 230 0 224 1 0 1 1 0 8 0 amappl2 80 3002 0 2961 2 0 2 2 0 8 0 amappl1 72 17599 0 17200 25 15 10 19 0 8 0 amappl 72 1117 0 1088 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 25 0 0 1 0 1 1 0 8 0 uaddrrnd 24 463 0 450 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 463 0 450 1 0 1 1 0 8 0 vmmpekpl 168 7510 0 7489 2 0 2 2 0 8 0 vmmpepl 168 56157 0 54865 110 32 78 81 0 357 16 vmsppl 264 462 0 450 2 1 1 2 0 8 0 pdppl 4096 932 0 900 6 1 5 6 0 8 0 pvpl 32 276159 0 266071 231 33 198 228 0 265 93 pmappl 192 462 0 450 1 0 1 1 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 501 0 22 14 0 14 14 0 8 0