panic: malloc: out of space in kmem_map Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *369642 31204 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,ffff800014a08180,3,ffff8000ffff9778) at kcovioctl+0xe6 kd_init sys/dev/kcov.c:405 [inline] kcovioctl(1b1300,80084b01,ffff800014a08180,3,ffff8000ffff9778) at kcovioctl+0xe6 sys/dev/kcov.c:298 VOP_IOCTL(fffffd802a8479c0,80084b01,ffff800014a08180,3,fffffd803f7c7780,ffff8000ffff9778) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd803044fe20,80084b01,ffff800014a08180,ffff8000ffff9778) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff8000ffff9778,ffff800014a082c0,ffff800014a082b0) at sys_ioctl+0x62d syscall(ffff800014a08360) at syscall+0x535 Xsyscall(6,36,7f7ffffc2ca8,36,3,9e844fc890) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffc27c0, 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+24 panic() at panic+348 malloc(200000,2a,9) at malloc+2681 kcovioctl(1b1300,80084b01,ffff800014a08180,3,ffff8000ffff9778) at kcovioctl+230 VOP_IOCTL(fffffd802a8479c0,80084b01,ffff800014a08180,3,fffffd803f7c7780,ffff8000ffff9778) at VOP_IOCTL+154 vn_ioctl(fffffd803044fe20,80084b01,ffff800014a08180,ffff8000ffff9778) at vn_ioctl+201 sys_ioctl(ffff8000ffff9778,ffff800014a082c0,ffff800014a082b0) at sys_ioctl+1581 syscall(ffff800014a08360) at syscall+1333 Xsyscall(6,36,7f7ffffc2ca8,36,3,9e844fc890) at Xsyscall+296 end of kernel end trace frame: 0x7f7ffffc27c0, count: -9 ddb> show registers rdi 0 rsi 1 rbp 18446603336567258544 rbx 18446603336567258720 rdx 2 rcx 0 rax 0 r8 18446603336567258480 r9 1 r10 0 r11 9295648162436577581 r12 206158430216 r13 18446603336567258560 r14 256 r15 1 rip 18446744071579043944 db_enter+24 cs 8 rflags 582 rsp 18446603336567258528 ss 16 db_enter+24: addq $8,%rsp ddb> show proc PROC (syz-executor.0) pid=369642 stat=onproc flags process=2 proc=0 pri=50, usrpri=50, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff84b8,0xffffffff822369f8 process=0xffff8000ffff7708 user=0xffff800014a03000, vmspace=0xfffffd803f015948 estcpu=0, cpticks=1, pctcpu=0.0 user=0, sys=0, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND *31204 369642 31719 0 7 0x2 syz-executor.0 14166 36667 31719 0 3 0x82 piperd syz-executor.1 31719 512751 3037 0 3 0x82 kqread syz-fuzzer 31719 237597 3037 0 3 0x4000082 thrsleep syz-fuzzer 31719 193455 3037 0 3 0x4000082 thrsleep syz-fuzzer 31719 501451 3037 0 3 0x4000082 thrsleep syz-fuzzer 31719 193231 3037 0 3 0x4000082 thrsleep syz-fuzzer 31719 111075 3037 0 3 0x4000082 thrsleep syz-fuzzer 31719 51052 3037 0 3 0x4000082 thrsleep syz-fuzzer 3037 170114 76109 0 3 0x10008a pause ksh 76109 126105 93690 0 3 0x92 select sshd 93641 419101 1 0 3 0x100083 ttyin getty 93690 69794 1 0 3 0x80 select sshd 15916 459986 44399 73 3 0x100090 kqread syslogd 44399 327965 1 0 3 0x100082 netio syslogd 46928 290038 1 77 3 0x100090 poll dhclient 61157 306674 1 0 3 0x80 poll dhclient 22699 288012 0 0 3 0x14200 pgzero zerothread 14974 347092 0 0 3 0x14200 aiodoned aiodoned 35483 476955 0 0 3 0x14200 syncer update 55027 501561 0 0 3 0x14200 cleaner cleaner 1156 439233 0 0 3 0x14200 reaper reaper 79519 398732 0 0 3 0x14200 pgdaemon pagedaemon 75930 523944 0 0 3 0x14200 bored crynlk 65471 438817 0 0 3 0x14200 bored crypto 95039 492745 0 0 3 0x40014200 acpi0 acpi0 95902 480009 0 0 3 0x14200 bored softnet 12592 397653 0 0 3 0x14200 bored systqmp 41140 120693 0 0 3 0x14200 bored systq 16444 329949 0 0 3 0x40014200 bored softclock 45073 295208 0 0 3 0x40014200 idle0 1 118203 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 9446 71852K 71860K 78643K 10568 0 0 pcb 23 9K 9K 78643K 83 0 0 rtable 79 2K 3K 78643K 175 0 0 ifaddr 32 9K 10K 78643K 38 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 15 0 0 iov 0 0K 2K 78643K 4 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1202 75K 76K 78643K 1261 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 5 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 1777 193K 286K 78643K 12501 0 0 file desc 4 9K 19K 78643K 76 0 0 proc 41 30K 46K 78643K 258 0 0 subproc 53 55297K 67586K 78643K 89 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 2 0 0 in_multi 22 1K 2K 78643K 33 0 0 ether_multi 1 0K 0K 78643K 1 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 54 238K 238K 78643K 54 0 0 exec 0 0K 1K 78643K 166 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 62 11K 20K 78643K 920 0 0 UVM aobj 6 4K 4K 78643K 6 0 0 memdesc 1 4K 4K 78643K 1 0 0 crypto data 1 1K 1K 78643K 1 0 0 NDP 5 0K 0K 78643K 10 0 0 temp 75 2332K 2396K 78643K 2937 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 4 0 1 1 0 1 1 0 8 0 inpcbpl 280 46 0 39 1 0 1 1 0 8 0 plimitpl 152 15 0 8 1 0 1 1 0 8 0 rtentry 112 41 0 10 2 0 2 2 0 8 1 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 2 0 2 1 1 0 1 0 8 0 tcpcb 544 14 0 10 1 0 1 1 0 8 0 nd6 48 4 0 2 1 0 1 1 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 185 0 41 12 0 12 12 0 8 3 art_table 32 186 0 41 2 0 2 2 0 8 0 art_node 16 40 0 12 1 0 1 1 0 8 0 semapl 112 2 0 0 1 0 1 1 0 8 0 shmpl 112 4 0 0 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 1538 0 133 46 0 46 46 0 8 0 ffsino 240 1538 0 133 83 0 83 83 0 8 0 nchpl 144 1844 0 239 61 0 61 61 0 8 0 uvmvnodes 72 1601 0 0 30 0 30 30 0 8 0 vnodes 200 1601 0 0 85 0 85 85 0 8 0 namei 1024 4531 0 4531 3 2 1 1 0 8 1 scxspl 192 4320 0 4320 13 12 1 6 0 8 1 sigapl 432 241 0 229 2 0 2 2 0 8 0 futexpl 56 872 0 872 2 1 1 1 0 8 1 knotepl 112 86 0 57 2 1 1 2 0 8 0 kqueuepl 104 8 0 6 1 0 1 1 0 8 0 pipepl 112 142 0 123 2 1 1 1 0 8 0 fdescpl 424 242 0 229 2 0 2 2 0 8 0 filepl 120 1286 0 1198 4 0 4 4 0 8 1 lockfpl 104 32 0 32 3 2 1 1 0 8 1 lockfspl 32 37 0 37 3 2 1 1 0 8 1 sessionpl 112 17 0 8 1 0 1 1 0 8 0 pgrppl 48 17 0 8 1 0 1 1 0 8 0 ucredpl 96 197 0 190 1 0 1 1 0 8 0 zombiepl 144 229 0 229 2 1 1 1 0 8 1 processpl 840 255 0 229 5 1 4 4 0 8 1 procpl 600 341 0 309 4 1 3 4 0 8 0 sockpl 384 108 0 91 3 1 2 3 0 8 0 mcl64k 65536 3 0 3 1 1 0 1 0 8 0 mcl9k 9216 1 0 1 1 1 0 1 0 8 0 mcl8k 8192 1 0 1 1 1 0 1 0 8 0 mcl4k 4096 11 0 11 2 2 0 1 0 8 0 mcl2k 2048 41085 0 41054 13 8 5 10 0 8 0 mtagpl 80 2 0 2 1 1 0 1 0 8 0 mbufpl 256 67491 0 67448 9 3 6 6 0 8 0 bufpl 256 5261 0 1097 261 0 261 261 0 8 0 anonpl 16 33844 0 27961 47 2 45 45 0 62 16 amapchunkpl 152 1041 0 965 5 1 4 5 0 158 0 amappl16 192 911 0 562 30 4 26 30 0 8 8 amappl15 184 1 0 0 1 0 1 1 0 8 0 amappl14 176 29 0 28 2 1 1 1 0 8 0 amappl13 168 57 0 52 1 0 1 1 0 8 0 amappl12 160 14 0 12 1 0 1 1 0 8 0 amappl11 152 180 0 171 1 0 1 1 0 8 0 amappl10 144 53 0 53 2 2 0 1 0 8 0 amappl9 136 283 0 280 1 0 1 1 0 8 0 amappl8 128 134 0 117 1 0 1 1 0 8 0 amappl7 120 71 0 63 1 0 1 1 0 8 0 amappl6 112 77 0 71 1 0 1 1 0 8 0 amappl5 104 272 0 260 1 0 1 1 0 8 0 amappl4 96 262 0 238 2 1 1 2 0 8 0 amappl3 88 127 0 120 1 0 1 1 0 8 0 amappl2 80 1170 0 1130 2 0 2 2 0 8 1 amappl1 72 13295 0 12897 26 17 9 19 0 8 0 amappl 72 566 0 538 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 5 0 0 1 0 1 1 0 8 0 uaddrrnd 24 242 0 229 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 242 0 229 1 0 1 1 0 8 0 vmmpekpl 168 5652 0 5635 1 0 1 1 0 8 0 vmmpepl 168 32461 0 31299 89 22 67 70 0 357 12 vmsppl 264 241 0 229 1 0 1 1 0 8 0 pdppl 4096 490 0 458 5 0 5 5 0 8 0 pvpl 32 118467 0 109760 131 10 121 121 0 265 39 pmappl 192 241 0 229 1 0 1 1 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 397 0 19 12 1 11 12 0 8 0