panic: malloc: out of space in kmem_map Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *453981 239 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(1c1300,80084b01,ffff8000149e1c90,3,ffff80001495d9d8) at kcovioctl+0xe6 kd_init sys/dev/kcov.c:405 [inline] kcovioctl(1c1300,80084b01,ffff8000149e1c90,3,ffff80001495d9d8) at kcovioctl+0xe6 sys/dev/kcov.c:298 VOP_IOCTL(fffffd802f5b6c18,80084b01,ffff8000149e1c90,3,fffffd803f7c7b40,ffff80001495d9d8) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd802fec1da8,80084b01,ffff8000149e1c90,ffff80001495d9d8) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff80001495d9d8,ffff8000149e1dd0,ffff8000149e1dc0) at sys_ioctl+0x62d syscall(ffff8000149e1e70) at syscall+0x535 Xsyscall(6,36,7f7ffffcb758,36,3,c9cd1628958) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffcb270, 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(1c1300,80084b01,ffff8000149e1c90,3,ffff80001495d9d8) at kcovioctl+230 VOP_IOCTL(fffffd802f5b6c18,80084b01,ffff8000149e1c90,3,fffffd803f7c7b40,ffff80001495d9d8) at VOP_IOCTL+154 vn_ioctl(fffffd802fec1da8,80084b01,ffff8000149e1c90,ffff80001495d9d8) at vn_ioctl+201 sys_ioctl(ffff80001495d9d8,ffff8000149e1dd0,ffff8000149e1dc0) at sys_ioctl+1581 syscall(ffff8000149e1e70) at syscall+1333 Xsyscall(6,36,7f7ffffcb758,36,3,c9cd1628958) at Xsyscall+296 end of kernel end trace frame: 0x7f7ffffcb270, count: -9 ddb> show registers rdi 0 rsi 1 rbp 18446603336567101632 rbx 18446603336567101808 rdx 2 rcx 0 rax 0 r8 18446603336567101568 r9 1 r10 0 r11 13169986264134026511 r12 206158430216 r13 18446603336567101648 r14 256 r15 1 rip 18446744071581293752 db_enter+24 cs 8 rflags 582 rsp 18446603336567101616 ss 16 db_enter+24: addq $8,%rsp ddb> show proc PROC (syz-executor.0) pid=453981 stat=onproc flags process=2 proc=0 pri=50, usrpri=50, nice=20 forw=0xffffffffffffffff, list=0xffff80001495d780,0xffffffff8224fb30 process=0xffff8000149c66b0 user=0xffff8000149dc000, vmspace=0xfffffd803f014b58 estcpu=0, cpticks=1, pctcpu=0.0 user=0, sys=0, intr=0 ddb> ps PID TID PPID UID S FLAGS WAIT COMMAND * 239 453981 79993 0 7 0x2 syz-executor.0 57820 504246 72299 0 3 0x80 fsleep syz-executor.1 57820 259215 72299 0 3 0x4000080 netio syz-executor.1 72299 208285 79993 0 3 0x82 nanosleep syz-executor.1 5579 15387 1 0 3 0x100083 ttyin getty 95077 419393 0 0 3 0x14200 bored sosplice 79993 346467 26110 0 3 0x82 thrsleep syz-fuzzer 79993 114934 26110 0 3 0x4000082 thrsleep syz-fuzzer 79993 156336 26110 0 3 0x4000082 thrsleep syz-fuzzer 79993 72470 26110 0 3 0x4000082 thrsleep syz-fuzzer 79993 30134 26110 0 3 0x4000082 thrsleep syz-fuzzer 79993 114218 26110 0 3 0x4000082 kqread syz-fuzzer 79993 199953 26110 0 3 0x4000082 thrsleep syz-fuzzer 79993 293506 26110 0 3 0x4000082 thrsleep syz-fuzzer 26110 168700 13462 0 3 0x10008a pause ksh 13462 509556 777 0 3 0x92 select sshd 777 66644 1 0 3 0x80 select sshd 16911 89833 42149 73 3 0x100090 kqread syslogd 42149 74811 1 0 3 0x100082 netio syslogd 43666 132565 1 77 3 0x100090 poll dhclient 94715 507337 1 0 3 0x80 poll dhclient 84759 485109 0 0 3 0x14200 pgzero zerothread 71246 258138 0 0 3 0x14200 aiodoned aiodoned 46816 449155 0 0 3 0x14200 syncer update 66846 518420 0 0 3 0x14200 cleaner cleaner 16313 169858 0 0 3 0x14200 reaper reaper 36143 56659 0 0 3 0x14200 pgdaemon pagedaemon 12282 321813 0 0 3 0x14200 bored crynlk 29067 501558 0 0 3 0x14200 bored crypto 94299 362461 0 0 3 0x40014200 acpi0 acpi0 67708 325295 0 0 3 0x14200 bored softnet 82200 478260 0 0 3 0x14200 bored systqmp 92066 321150 0 0 3 0x14200 bored systq 15231 103455 0 0 3 0x40014200 bored softclock 59409 488217 0 0 3 0x40014200 idle0 1 504762 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 9506 69154K 69162K 78643K 11622 0 0 pcb 25 9K 11K 78643K 1943 0 0 rtable 82 3K 3K 78643K 540 0 0 ifaddr 49 12K 13K 78643K 250 0 0 counters 19 16K 16K 78643K 19 0 0 ioctlops 0 0K 2K 78643K 44 0 0 iov 0 0K 32K 78643K 329 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1185 74K 75K 78643K 3345 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 55 0 0 VM map 2 0K 0K 78643K 2 0 0 sem 12 0K 0K 78643K 374 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1777 193K 286K 78643K 12501 0 0 file desc 5 13K 21K 78643K 3451 0 0 sigio 0 0K 0K 78643K 55 0 0 proc 42 30K 46K 78643K 759 0 0 subproc 55 57345K 67586K 78643K 163 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 498 0 0 in_multi 22 1K 2K 78643K 234 0 0 ether_multi 1 0K 0K 78643K 24 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 102 450K 450K 78643K 102 0 0 exec 0 0K 1K 78643K 475 0 0 pfkey data 0 0K 0K 78643K 2 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 89 13K 30K 78643K 9254 0 0 UVM aobj 130 6K 6K 78643K 143 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 98 0 0 NDP 10 0K 0K 78643K 69 0 0 temp 150 2346K 2415K 78643K 12062 0 0 kqueue 0 0K 0K 78643K 42 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 6 0 3 1 0 1 1 0 8 0 inpcbpl 280 1658 0 1651 1 0 1 1 0 8 0 plimitpl 152 53 0 46 1 0 1 1 0 8 0 rtentry 112 59 0 28 2 0 2 2 0 8 1 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpcb 544 612 0 608 1 0 1 1 0 8 0 nd6 48 8 0 6 1 0 1 1 0 8 0 ppxss 1128 36 0 36 18 17 1 1 0 8 1 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 278 0 130 12 0 12 12 0 8 2 art_table 32 279 0 130 2 0 2 2 0 8 0 art_node 16 58 0 30 1 0 1 1 0 8 0 sysvmsgpl 40 20 0 10 1 0 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 368 0 358 1 0 1 1 0 8 0 shmpl 112 141 0 13 5 1 4 4 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 8134 0 6681 48 0 48 48 0 8 0 ffsino 240 8134 0 6681 86 0 86 86 0 8 0 nchpl 144 13265 0 11661 61 0 61 61 0 8 0 uvmvnodes 72 6541 0 0 119 0 119 119 0 8 0 vnodes 200 6541 0 0 345 0 345 345 0 8 0 namei 1024 42018 0 42018 4 3 1 1 0 8 1 scsiplug 64 14 0 14 12 12 0 1 0 8 0 scxspl 192 44494 0 44494 18 17 1 6 0 8 1 sigapl 432 3613 0 3600 2 0 2 2 0 8 0 futexpl 56 56613 0 56612 3 2 1 1 0 8 0 knotepl 112 1068 0 1039 3 2 1 2 0 8 0 kqueuepl 104 1136 0 1134 1 0 1 1 0 8 0 pipepl 112 2470 0 2451 12 11 1 2 0 8 0 fdescpl 424 3614 0 3600 2 0 2 2 0 8 0 filepl 120 23323 0 23232 8 4 4 5 0 8 1 lockfpl 104 1120 0 1120 7 6 1 1 0 8 1 lockfspl 32 1810 0 1810 7 6 1 1 0 8 1 sessionpl 112 22 0 13 1 0 1 1 0 8 0 pgrppl 48 64 0 55 1 0 1 1 0 8 0 ucredpl 96 7001 0 6994 1 0 1 1 0 8 0 zombiepl 144 3600 0 3600 3 2 1 1 0 8 1 processpl 840 3628 0 3600 5 1 4 4 0 8 0 procpl 600 8482 0 8446 5 1 4 4 0 8 0 sosppl 128 52 0 52 12 11 1 1 0 8 1 sockpl 384 3431 0 3412 10 7 3 4 0 8 1 mcl64k 65536 1301 0 1301 129 128 1 33 0 8 1 mcl16k 16384 15 0 15 12 12 0 1 0 8 0 mcl12k 12288 83 0 83 17 16 1 1 0 8 1 mcl9k 9216 53 0 53 22 22 0 1 0 8 0 mcl8k 8192 78 0 78 19 18 1 1 0 8 1 mcl4k 4096 167 0 167 16 16 0 1 0 8 0 mcl2k2 2112 37 0 37 17 16 1 1 0 8 1 mcl2k 2048 46067 0 46034 13 8 5 8 0 8 0 mtagpl 80 4 0 4 2 2 0 1 0 8 0 mbufpl 256 92980 0 92926 66 59 7 22 0 8 0 bufpl 256 13106 0 6564 410 0 410 410 0 8 0 anonpl 16 366318 0 360042 194 160 34 50 0 62 0 amapchunkpl 152 16613 0 16534 63 59 4 14 0 158 0 amappl16 192 20081 0 19669 186 164 22 34 0 8 1 amappl15 184 1714 0 1710 1 0 1 1 0 8 0 amappl14 176 1724 0 1718 2 1 1 1 0 8 0 amappl13 168 30 0 27 1 0 1 1 0 8 0 amappl12 160 10 0 9 1 0 1 1 0 8 0 amappl11 152 1079 0 1070 1 0 1 1 0 8 0 amappl10 144 60 0 59 2 1 1 1 0 8 0 amappl9 136 1121 0 1118 1 0 1 1 0 8 0 amappl8 128 196 0 159 2 0 2 2 0 8 0 amappl7 120 46 0 38 1 0 1 1 0 8 0 amappl6 112 962 0 954 1 0 1 1 0 8 0 amappl5 104 1222 0 1211 1 0 1 1 0 8 0 amappl4 96 1119 0 1096 1 0 1 1 0 8 0 amappl3 88 303 0 297 1 0 1 1 0 8 0 amappl2 80 34041 0 33990 2 0 2 2 0 8 0 amappl1 72 75704 0 75288 25 15 10 19 0 8 0 amappl 72 8758 0 8728 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 142 0 13 3 0 3 3 0 8 0 uaddrrnd 24 3614 0 3600 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 3614 0 3600 1 0 1 1 0 8 0 vmmpekpl 168 27041 0 27018 2 0 2 2 0 8 0 vmmpepl 168 381597 0 380249 209 130 79 84 0 357 12 vmsppl 264 3613 0 3600 2 1 1 2 0 8 0 pdppl 4096 7234 0 7200 5 0 5 5 0 8 0 pvpl 32 1189570 0 1180287 518 353 165 232 0 265 73 pmappl 192 3613 0 3600 1 0 1 1 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 779 0 246 18 1 17 17 0 8 0