panic: malloc: out of space in kmem_map Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *404308 88193 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,ffff800014a20280,3,ffff8000ffff8260) at kcovioctl+0xe6 kd_init sys/dev/kcov.c:405 [inline] kcovioctl(1b1300,80084b01,ffff800014a20280,3,ffff8000ffff8260) at kcovioctl+0xe6 sys/dev/kcov.c:298 VOP_IOCTL(fffffd802a3b4498,80084b01,ffff800014a20280,3,fffffd803f7c6b40,ffff8000ffff8260) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd802f8ec2e0,80084b01,ffff800014a20280,ffff8000ffff8260) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff8000ffff8260,ffff800014a203c0,ffff800014a203b0) at sys_ioctl+0x638 syscall(ffff800014a20460) at syscall+0x541 Xsyscall(6,36,7f7fffff54c8,36,3,bd9e3562890) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7fffff4fe0, 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,ffff800014a20280,3,ffff8000ffff8260) at kcovioctl+0xe6 kd_init sys/dev/kcov.c:405 [inline] kcovioctl(1b1300,80084b01,ffff800014a20280,3,ffff8000ffff8260) at kcovioctl+0xe6 sys/dev/kcov.c:298 VOP_IOCTL(fffffd802a3b4498,80084b01,ffff800014a20280,3,fffffd803f7c6b40,ffff8000ffff8260) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd802f8ec2e0,80084b01,ffff800014a20280,ffff8000ffff8260) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff8000ffff8260,ffff800014a203c0,ffff800014a203b0) at sys_ioctl+0x638 syscall(ffff800014a20460) at syscall+0x541 Xsyscall(6,36,7f7fffff54c8,36,3,bd9e3562890) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7fffff4fe0, count: -9 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff800014a1feb0 rbx 0xffff800014a1ff60 rdx 0x2 rcx 0 rax 0 r8 0xffff800014a1fe70 r9 0x1 r10 0 r11 0x3d98006edfc188fb r12 0x3000000008 r13 0xffff800014a1fec0 r14 0x100 r15 0x1 rip 0xffffffff812c72d8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800014a1fea0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.1) pid=404308 stat=onproc flags process=2 proc=0 pri=68, usrpri=68, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff5528,0xffffffff8224cb48 process=0xffff8000ffff7078 user=0xffff800014a1b000, vmspace=0xfffffd803f014318 estcpu=18, cpticks=2, pctcpu=0.0 user=0, sys=0, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND *88193 404308 5378 0 7 0x2 syz-executor.1 58776 440056 5378 0 3 0x82 piperd syz-executor.0 44650 239050 1 0 3 0x100083 ttyin getty 4428 352684 0 0 3 0x14200 bored sosplice 5378 499896 55485 0 3 0x82 kqread syz-fuzzer 5378 332061 55485 0 3 0x4000082 thrsleep syz-fuzzer 5378 364005 55485 0 3 0x4000082 thrsleep syz-fuzzer 5378 114074 55485 0 3 0x4000082 thrsleep syz-fuzzer 5378 386817 55485 0 3 0x4000082 thrsleep syz-fuzzer 5378 30377 55485 0 3 0x4000082 thrsleep syz-fuzzer 5378 424074 55485 0 3 0x4000082 thrsleep syz-fuzzer 5378 44891 55485 0 3 0x4000082 thrsleep syz-fuzzer 55485 426295 89941 0 3 0x10008a pause ksh 89941 197217 78314 0 3 0x92 select sshd 78314 263734 1 0 3 0x80 select sshd 9535 25720 84311 73 3 0x100090 kqread syslogd 84311 357786 1 0 3 0x100082 netio syslogd 43190 265029 1 77 3 0x100090 poll dhclient 89001 43038 1 0 3 0x80 poll dhclient 82231 451735 0 0 3 0x14200 pgzero zerothread 84971 97178 0 0 3 0x14200 aiodoned aiodoned 74898 144994 0 0 3 0x14200 syncer update 42270 312373 0 0 3 0x14200 cleaner cleaner 2567 25637 0 0 3 0x14200 reaper reaper 96069 442896 0 0 3 0x14200 pgdaemon pagedaemon 55153 399217 0 0 3 0x14200 bored crynlk 45560 378442 0 0 3 0x14200 bored crypto 27125 140995 0 0 3 0x40014200 acpi0 acpi0 19562 120333 0 0 3 0x14200 bored softnet 14081 249600 0 0 3 0x14200 bored systqmp 92875 298910 0 0 3 0x14200 bored systq 45329 407552 0 0 3 0x40014200 bored softclock 35544 303361 0 0 3 0x40014200 idle0 67971 219581 0 0 3 0x14200 bored smr 1 297197 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 9504 71886K 71894K 78643K 11127 0 0 pcb 23 9K 11K 78643K 652 0 0 rtable 85 3K 4K 78643K 872 0 0 ifaddr 52 12K 14K 78643K 266 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 49 0 0 iov 0 0K 20K 78643K 125 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1198 75K 76K 78643K 2165 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 22 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 0K 1K 78643K 165 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12537 0 0 file desc 4 9K 21K 78643K 1238 0 0 sigio 0 0K 0K 78643K 26 0 0 proc 42 30K 46K 78643K 710 0 0 subproc 53 55297K 67586K 78643K 573 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 136 0 0 in_multi 22 1K 2K 78643K 239 0 0 ether_multi 1 0K 0K 78643K 9 0 0 mrt 0 0K 0K 78643K 3 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 72 318K 318K 78643K 72 0 0 exec 0 0K 1K 78643K 354 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 70 12K 29K 78643K 3784 0 0 UVM aobj 72 5K 5K 78643K 77 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 40 0 0 NDP 11 0K 0K 78643K 90 0 0 temp 158 2358K 2487K 78643K 7226 0 0 kqueue 0 0K 0K 78643K 8 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 18 0 15 1 0 1 1 0 8 0 inpcbpl 280 667 0 660 1 0 1 1 0 8 0 plimitpl 152 63 0 56 1 0 1 1 0 8 0 rtentry 112 169 0 138 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpcb 544 252 0 248 1 0 1 1 0 8 0 nd6 48 32 0 30 1 0 1 1 0 8 0 ppxss 1128 27 0 27 8 7 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 782 0 635 12 0 12 12 0 8 1 art_table 32 783 0 635 2 0 2 2 0 8 0 art_node 16 166 0 138 1 0 1 1 0 8 0 sysvmsgpl 40 18 0 10 1 0 1 1 0 8 0 semapl 112 161 0 151 1 0 1 1 0 8 0 shmpl 112 75 0 5 2 0 2 2 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 3626 0 2151 48 0 48 48 0 8 0 ffsino 240 3626 0 2151 88 0 88 88 0 8 1 nchpl 144 5531 0 3849 63 0 63 63 0 8 0 uvmvnodes 72 4074 0 0 75 0 75 75 0 8 0 vnodes 200 4074 0 0 215 0 215 215 0 8 0 namei 1024 17460 0 17460 2 1 1 1 0 8 1 scsiplug 64 2 0 2 2 2 0 1 0 8 0 scxspl 192 17270 0 17270 12 11 1 6 0 8 1 sigapl 432 1365 0 1353 2 0 2 2 0 8 0 futexpl 56 19522 0 19522 2 1 1 1 0 8 1 knotepl 112 628 0 607 1 0 1 1 0 8 0 kqueuepl 104 328 0 326 1 0 1 1 0 8 0 pipepl 112 936 0 917 3 2 1 2 0 8 0 fdescpl 424 1366 0 1353 2 0 2 2 0 8 0 filepl 120 8791 0 8703 6 2 4 5 0 8 1 lockfpl 104 459 0 459 4 3 1 1 0 8 1 lockfspl 32 578 0 578 4 3 1 1 0 8 1 sessionpl 112 33 0 24 1 0 1 1 0 8 0 pgrppl 48 39 0 30 1 0 1 1 0 8 0 ucredpl 96 2157 0 2150 1 0 1 1 0 8 0 zombiepl 144 1353 0 1353 2 1 1 1 0 8 1 processpl 840 1381 0 1353 4 0 4 4 0 8 0 procpl 600 2884 0 2849 4 0 4 4 0 8 1 sosppl 128 15 0 15 6 6 0 1 0 8 0 sockpl 384 1235 0 1218 7 4 3 4 0 8 1 mcl64k 65536 555 0 555 67 64 3 33 0 8 3 mcl16k 16384 4 0 4 4 4 0 1 0 8 0 mcl12k 12288 29 0 29 5 4 1 1 0 8 1 mcl9k 9216 16 0 16 7 6 1 1 0 8 1 mcl8k 8192 22 0 22 7 6 1 1 0 8 1 mcl4k 4096 73 0 73 6 5 1 1 0 8 1 mcl2k2 2112 6 0 6 3 3 0 1 0 8 0 mcl2k 2048 50533 0 50499 13 8 5 11 0 8 0 mtagpl 80 2 0 2 1 1 0 1 0 8 0 mbufpl 256 90405 0 90343 44 36 8 22 0 8 0 bufpl 256 8461 0 3896 286 0 286 286 0 8 0 anonpl 16 156195 0 148946 77 30 47 58 0 62 7 amapchunkpl 152 6054 0 5977 17 11 6 9 0 158 2 amappl16 192 7450 0 6960 77 43 34 37 0 8 8 amappl15 184 341 0 337 1 0 1 1 0 8 0 amappl14 176 410 0 408 2 1 1 1 0 8 0 amappl13 168 144 0 140 1 0 1 1 0 8 0 amappl12 160 373 0 370 1 0 1 1 0 8 0 amappl11 152 20 0 9 1 0 1 1 0 8 0 amappl10 144 134 0 132 2 1 1 1 0 8 0 amappl9 136 868 0 863 1 0 1 1 0 8 0 amappl8 128 454 0 436 1 0 1 1 0 8 0 amappl7 120 126 0 120 1 0 1 1 0 8 0 amappl6 112 62 0 55 1 0 1 1 0 8 0 amappl5 104 560 0 548 1 0 1 1 0 8 0 amappl4 96 1345 0 1319 2 1 1 2 0 8 0 amappl3 88 529 0 523 1 0 1 1 0 8 0 amappl2 80 10980 0 10938 2 0 2 2 0 8 0 amappl1 72 34234 0 33841 26 17 9 19 0 8 0 amappl 72 3206 0 3177 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 76 0 5 2 0 2 2 0 8 0 uaddrrnd 24 1366 0 1353 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1366 0 1353 1 0 1 1 0 8 0 vmmpekpl 168 12823 0 12802 3 1 2 2 0 8 0 vmmpepl 168 153443 0 152125 154 58 96 96 0 357 27 vmsppl 264 1365 0 1353 4 2 2 2 0 8 1 pdppl 4096 2738 0 2706 5 0 5 5 0 8 0 pvpl 32 448352 0 438112 189 62 127 146 0 265 24 pmappl 192 1365 0 1353 1 0 1 1 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 541 0 126 13 0 13 13 0 8 0