panic: malloc: out of space in kmem_map Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND * 79141 39969 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(1b1300,80084b01,ffff8000149d0a20,3,ffff8000ffff92c8) at kcovioctl+0xe6 kd_init sys/dev/kcov.c:405 [inline] kcovioctl(1b1300,80084b01,ffff8000149d0a20,3,ffff8000ffff92c8) at kcovioctl+0xe6 sys/dev/kcov.c:298 VOP_IOCTL(fffffd802b24e620,80084b01,ffff8000149d0a20,3,fffffd803f7c6a20,ffff8000ffff92c8) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd802f059100,80084b01,ffff8000149d0a20,ffff8000ffff92c8) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff8000ffff92c8,ffff8000149d0b60,ffff8000149d0b50) at sys_ioctl+0x638 syscall(ffff8000149d0c00) at syscall+0x541 Xsyscall(6,36,7f7fffff3868,36,3,d2b0bcbb890) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7fffff3380, 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,ffff8000149d0a20,3,ffff8000ffff92c8) at kcovioctl+0xe6 kd_init sys/dev/kcov.c:405 [inline] kcovioctl(1b1300,80084b01,ffff8000149d0a20,3,ffff8000ffff92c8) at kcovioctl+0xe6 sys/dev/kcov.c:298 VOP_IOCTL(fffffd802b24e620,80084b01,ffff8000149d0a20,3,fffffd803f7c6a20,ffff8000ffff92c8) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd802f059100,80084b01,ffff8000149d0a20,ffff8000ffff92c8) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff8000ffff92c8,ffff8000149d0b60,ffff8000149d0b50) at sys_ioctl+0x638 syscall(ffff8000149d0c00) at syscall+0x541 Xsyscall(6,36,7f7fffff3868,36,3,d2b0bcbb890) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7fffff3380, count: -9 ddb> show registers rdi 0 rsi 0x1 rbp 0xffff8000149d0650 rbx 0xffff8000149d0700 rdx 0x2 rcx 0 rax 0 r8 0xffff8000149d0610 r9 0x1 r10 0 r11 0x41c5bf108243dbd2 r12 0x3000000008 r13 0xffff8000149d0660 r14 0x100 r15 0x1 rip 0xffffffff81d42d58 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff8000149d0640 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb> show proc PROC (syz-executor.0) pid=79141 stat=onproc flags process=2 proc=0 pri=51, usrpri=51, nice=20 forw=0xffffffffffffffff, list=0xffff8000ffff8008,0xffffffff822856a0 process=0xffff8000149629f0 user=0xffff8000149cb000, vmspace=0xfffffd803f014318 estcpu=1, cpticks=2, pctcpu=0.0 user=0, sys=2, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND *39969 79141 12414 0 7 0x2 syz-executor.0 32860 94826 12414 0 3 0x82 piperd syz-executor.1 58596 83827 0 0 3 0x14200 bored sosplice 12414 74707 66189 0 3 0x82 thrsleep syz-fuzzer 12414 237343 66189 0 3 0x4000082 thrsleep syz-fuzzer 12414 145281 66189 0 3 0x4000082 thrsleep syz-fuzzer 12414 295555 66189 0 3 0x4000082 thrsleep syz-fuzzer 12414 424465 66189 0 3 0x4000082 thrsleep syz-fuzzer 12414 311464 66189 0 3 0x4000082 kqread syz-fuzzer 12414 119000 66189 0 3 0x4000082 thrsleep syz-fuzzer 12414 265179 66189 0 3 0x4000082 thrsleep syz-fuzzer 66189 447971 56145 0 3 0x10008a pause ksh 56145 371280 33398 0 3 0x92 select sshd 63516 11615 1 0 3 0x100083 ttyin getty 33398 88993 1 0 3 0x80 select sshd 52019 93405 4201 73 3 0x100090 kqread syslogd 4201 47341 1 0 3 0x100082 netio syslogd 41602 496950 1 77 3 0x100090 poll dhclient 62079 462875 1 0 3 0x80 poll dhclient 88135 237656 0 0 3 0x14200 pgzero zerothread 4307 196903 0 0 3 0x14200 aiodoned aiodoned 3801 383987 0 0 3 0x14200 syncer update 52142 663 0 0 3 0x14200 cleaner cleaner 64296 5945 0 0 3 0x14200 reaper reaper 76013 85455 0 0 3 0x14200 pgdaemon pagedaemon 78878 459311 0 0 3 0x14200 bored crynlk 37449 73752 0 0 3 0x14200 bored crypto 62038 177347 0 0 3 0x40014200 acpi0 acpi0 95151 413023 0 0 3 0x14200 bored softnet 33967 206312 0 0 3 0x14200 bored systqmp 20014 348017 0 0 3 0x14200 bored systq 25982 523741 0 0 3 0x40014200 bored softclock 54883 112772 0 0 3 0x40014200 idle0 81607 250872 0 0 3 0x14200 bored smr 1 41896 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 9511 71882K 71890K 78643K 11054 0 0 pcb 23 9K 10K 78643K 481 0 0 rtable 85 3K 4K 78643K 569 0 0 ifaddr 56 13K 14K 78643K 188 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 32 0 0 iov 0 0K 24K 78643K 133 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1200 75K 76K 78643K 1917 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 19 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 0K 0K 78643K 122 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1793 195K 288K 78643K 12537 0 0 file desc 4 9K 21K 78643K 1007 0 0 sigio 0 0K 0K 78643K 28 0 0 proc 41 30K 46K 78643K 511 0 0 subproc 53 55297K 69634K 78643K 334 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 140 0 0 in_multi 22 1K 2K 78643K 167 0 0 ether_multi 1 0K 0K 78643K 13 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 314 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 74 12K 22K 78643K 3093 0 0 UVM aobj 48 2K 2K 78643K 58 0 0 memdesc 1 4K 4K 78643K 1 0 0 crypto data 1 1K 1K 78643K 1 0 0 ip6_options 0 0K 1K 78643K 54 0 0 NDP 12 0K 0K 78643K 59 0 0 temp 162 2355K 2423K 78643K 5985 0 0 kqueue 0 0K 0K 78643K 4 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 11 0 8 1 0 1 1 0 8 0 inpcbpl 280 469 0 462 1 0 1 1 0 8 0 plimitpl 152 49 0 42 1 0 1 1 0 8 0 rtentry 112 104 0 73 2 0 2 2 0 8 1 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpcb 544 176 0 172 1 0 1 1 0 8 0 nd6 48 18 0 16 1 0 1 1 0 8 0 ppxss 1128 21 0 21 5 4 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 494 0 347 12 0 12 12 0 8 2 art_table 32 495 0 347 2 0 2 2 0 8 0 art_node 16 103 0 75 1 0 1 1 0 8 0 sysvmsgpl 40 12 0 3 1 0 1 1 0 8 0 semapl 112 118 0 108 1 0 1 1 0 8 0 shmpl 112 56 0 10 2 0 2 2 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 3353 0 1906 47 0 47 47 0 8 0 ffsino 240 3353 0 1906 86 0 86 86 0 8 0 nchpl 144 4933 0 3287 62 0 62 62 0 8 0 uvmvnodes 72 3604 0 0 66 0 66 66 0 8 0 vnodes 200 3604 0 0 190 0 190 190 0 8 0 namei 1024 14607 0 14607 2 1 1 1 0 8 1 scxspl 192 13972 0 13972 15 12 3 6 0 8 3 sigapl 432 1153 0 1141 2 0 2 2 0 8 0 futexpl 56 15146 0 15146 1 0 1 1 0 8 1 knotepl 112 401 0 380 1 0 1 1 0 8 0 kqueuepl 104 229 0 227 1 0 1 1 0 8 0 pipepl 112 712 0 693 3 2 1 2 0 8 0 fdescpl 424 1154 0 1141 2 0 2 2 0 8 0 filepl 120 6845 0 6757 5 1 4 5 0 8 1 lockfpl 104 284 0 284 2 1 1 1 0 8 1 lockfspl 32 224 0 224 2 1 1 1 0 8 1 sessionpl 112 24 0 15 1 0 1 1 0 8 0 pgrppl 48 30 0 21 1 0 1 1 0 8 0 ucredpl 96 1527 0 1520 1 0 1 1 0 8 0 zombiepl 144 1141 0 1141 2 1 1 1 0 8 1 processpl 840 1169 0 1141 4 0 4 4 0 8 0 procpl 600 2364 0 2329 4 0 4 4 0 8 1 sosppl 128 17 0 17 3 3 0 1 0 8 0 sockpl 384 880 0 863 3 0 3 3 0 8 1 mcl64k 65536 37 0 37 4 3 1 1 0 8 1 mcl16k 16384 3 0 3 3 2 1 1 0 8 1 mcl12k 12288 13 0 13 4 3 1 1 0 8 1 mcl9k 9216 19 0 19 3 2 1 1 0 8 1 mcl8k 8192 15 0 15 4 3 1 1 0 8 1 mcl4k 4096 44 0 44 3 2 1 1 0 8 1 mcl2k2 2112 6 0 6 3 3 0 1 0 8 0 mcl2k 2048 47644 0 47603 13 7 6 11 0 8 0 mtagpl 80 2 0 2 1 1 0 1 0 8 0 mbufpl 256 83189 0 83118 19 11 8 10 0 8 0 bufpl 256 8901 0 3255 353 0 353 353 0 8 0 anonpl 16 105409 0 98520 51 16 35 49 0 62 0 amapchunkpl 152 4944 0 4867 24 19 5 14 0 158 1 amappl16 192 4481 0 4026 38 14 24 35 0 8 1 amappl15 184 468 0 463 1 0 1 1 0 8 0 amappl14 176 240 0 238 2 1 1 1 0 8 0 amappl13 168 28 0 25 1 0 1 1 0 8 0 amappl12 160 378 0 377 1 0 1 1 0 8 0 amappl11 152 352 0 340 1 0 1 1 0 8 0 amappl10 144 69 0 67 2 1 1 1 0 8 0 amappl9 136 653 0 650 1 0 1 1 0 8 0 amappl8 128 236 0 216 1 0 1 1 0 8 0 amappl7 120 46 0 40 1 0 1 1 0 8 0 amappl6 112 59 0 51 1 0 1 1 0 8 0 amappl5 104 444 0 433 1 0 1 1 0 8 0 amappl4 96 1108 0 1080 2 1 1 2 0 8 0 amappl3 88 434 0 428 1 0 1 1 0 8 0 amappl2 80 9270 0 9225 2 0 2 2 0 8 0 amappl1 72 28999 0 28613 26 17 9 19 0 8 0 amappl 72 2623 0 2594 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 57 0 10 1 0 1 1 0 8 0 uaddrrnd 24 1154 0 1141 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1154 0 1141 1 0 1 1 0 8 0 vmmpekpl 168 11384 0 11364 2 0 2 2 0 8 0 vmmpepl 168 122888 0 121611 136 59 77 77 0 357 10 vmsppl 264 1153 0 1141 3 2 1 2 0 8 0 pdppl 4096 2314 0 2282 5 0 5 5 0 8 0 pvpl 32 410093 0 400172 226 77 149 214 0 265 53 pmappl 192 1153 0 1141 1 0 1 1 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 511 0 31 14 0 14 14 0 8 0