login: panic: malloc: out of space in kmem_map Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND *136761 48264 0 0x2 0 0 syz-executor.1 198819 30384 0 0x14000 0x200 1K update db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:399 panic() at panic+0x174 sys/kern/subr_prf.c:208 malloc(200000,2a,9) at malloc+0xad5 sys/kern/kern_malloc.c:242 kcovioctl(1b1300,80084b01,ffff800020c19420,3,ffff800020b8a018) at kcovioctl+0xe6 kd_init sys/dev/kcov.c:405 [inline] kcovioctl(1b1300,80084b01,ffff800020c19420,3,ffff800020b8a018) at kcovioctl+0xe6 sys/dev/kcov.c:298 VOP_IOCTL(fffffd8062c31170,80084b01,ffff800020c19420,3,fffffd807f7c69c0,ffff800020b8a018) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd8067142148,80084b01,ffff800020c19420,ffff800020b8a018) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800020b8a018,ffff800020c19560,ffff800020c19550) at sys_ioctl+0x651 syscall(ffff800020c19600) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c19600) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,36,7f7fffff59f8,36,3,8a00f4e0890) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7fffff5510, 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{0}> ddb{0}> set $lines = 0 ddb{0}> set $maxwidth = 0 ddb{0}> show panic malloc: out of space in kmem_map ddb{0}> trace db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:399 panic() at panic+0x174 sys/kern/subr_prf.c:208 malloc(200000,2a,9) at malloc+0xad5 sys/kern/kern_malloc.c:242 kcovioctl(1b1300,80084b01,ffff800020c19420,3,ffff800020b8a018) at kcovioctl+0xe6 kd_init sys/dev/kcov.c:405 [inline] kcovioctl(1b1300,80084b01,ffff800020c19420,3,ffff800020b8a018) at kcovioctl+0xe6 sys/dev/kcov.c:298 VOP_IOCTL(fffffd8062c31170,80084b01,ffff800020c19420,3,fffffd807f7c69c0,ffff800020b8a018) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd8067142148,80084b01,ffff800020c19420,ffff800020b8a018) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800020b8a018,ffff800020c19560,ffff800020c19550) at sys_ioctl+0x651 syscall(ffff800020c19600) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c19600) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,36,7f7fffff59f8,36,3,8a00f4e0890) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7fffff5510, count: -9 ddb{0}> show registers rdi 0 rsi 0x1 rbp 0xffff800020c19050 rbx 0xffff800020c19100 rdx 0xffffffff81f8a3e4 cy_pio_rec+0x1c1 rcx 0 rax 0 r8 0xffffffff81a096d3 kprintf+0x183 r9 0x1 r10 0x25 r11 0xb505e6d432a2e068 r12 0x3000000008 r13 0xffff800020c19060 r14 0x100 r15 0x1 rip 0xffffffff81767cc8 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020c19040 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor.1) pid=136761 stat=onproc flags process=2 proc=0 pri=50, usrpri=50, nice=20 forw=0xffffffffffffffff, list=0xffff800020b8b530,0xffffffff823c5f18 process=0xffff800020b7da58 user=0xffff800020c14000, vmspace=0xfffffd807f00b5a0 estcpu=0, cpticks=0, pctcpu=0.3 user=0, sys=2, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND *48264 136761 28488 0 7 0x2 syz-executor.1 79535 471107 28488 0 3 0x82 piperd syz-executor.0 72081 378648 1 0 3 0x100083 ttyin getty 65241 126216 0 0 3 0x14200 bored sosplice 28488 468610 65920 0 3 0x82 thrsleep syz-fuzzer 28488 386360 65920 0 3 0x4000082 thrsleep syz-fuzzer 28488 283678 65920 0 3 0x4000082 thrsleep syz-fuzzer 28488 146009 65920 0 3 0x4000082 kqread syz-fuzzer 28488 179662 65920 0 3 0x4000082 thrsleep syz-fuzzer 28488 193482 65920 0 3 0x4000082 thrsleep syz-fuzzer 28488 297604 65920 0 3 0x4000082 thrsleep syz-fuzzer 28488 365644 65920 0 3 0x4000082 thrsleep syz-fuzzer 28488 139872 65920 0 3 0x4000082 thrsleep syz-fuzzer 28488 311705 65920 0 3 0x4000082 thrsleep syz-fuzzer 65920 2459 65183 0 3 0x10008a pause ksh 65183 516020 25426 0 3 0x92 select sshd 25426 253048 1 0 3 0x80 select sshd 94219 20866 36216 74 3 0x100092 bpf pflogd 36216 303 1 0 3 0x80 netio pflogd 39935 252425 6976 73 3 0x100090 kqread syslogd 6976 63694 1 0 3 0x100082 netio syslogd 68292 394865 1 77 3 0x100090 poll dhclient 48778 409475 1 0 3 0x80 poll dhclient 85096 197344 0 0 3 0x14200 pgzero zerothread 43183 391749 0 0 3 0x14200 aiodoned aiodoned 30384 198819 0 0 7 0x14200 update 95412 136309 0 0 3 0x14200 cleaner cleaner 31995 8169 0 0 3 0x14200 reaper reaper 57526 150643 0 0 3 0x14200 pgdaemon pagedaemon 84955 405707 0 0 3 0x14200 bored crynlk 37789 294873 0 0 3 0x14200 bored crypto 7600 503142 0 0 3 0x40014200 acpi0 acpi0 76372 516553 0 0 3 0x40014200 idle1 53852 524246 0 0 3 0x14200 bored softnet 60254 139582 0 0 3 0x14200 bored systqmp 36720 140726 0 0 3 0x14200 bored systq 55040 119548 0 0 3 0x40014200 bored softclock 99179 470673 0 0 3 0x40014200 idle0 54487 507070 0 0 3 0x14200 bored smr 1 486200 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 48264 (syz-executor.1) thread 0xffff800020b8a018 (136761) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff823d2f80) locked @ /syzkaller/managers/multicore/kernel/sys/sys/syscall_mi.h:90 #0 witness_lock+0x594 sys/kern/subr_witness.c:1201 #1 syscall+0x48b mi_syscall sys/sys/syscall_mi.h:91 [inline] #1 syscall+0x48b sys/arch/amd64/amd64/trap.c:574 #2 Xsyscall+0x128 ddb{0}> show malloc Type InUse MemUse HighUse Limit Requests Type Lim Kern Lim devbuf 9511 71957K 71977K 78643K 10823 0 0 pcb 25 9K 11K 78643K 365 0 0 rtable 82 3K 4K 78643K 402 0 0 ifaddr 49 11K 13K 78643K 140 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 4K 78643K 1482 0 0 iov 0 0K 16K 78643K 62 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1200 75K 75K 78643K 1597 0 0 UFS quota 1 32K 32K 78643K 1 0 0 UFS mount 5 36K 36K 78643K 5 0 0 shm 2 1K 9K 78643K 10 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 0K 0K 78643K 86 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12628 0 0 file desc 4 9K 21K 78643K 618 0 0 sigio 0 0K 0K 78643K 6 0 0 proc 53 50K 79K 78643K 481 0 0 subproc 53 55297K 67586K 78643K 191 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 63 0 0 in_multi 22 1K 2K 78643K 83 0 0 ether_multi 1 0K 0K 78643K 2 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 66 291K 291K 78643K 66 0 0 exec 0 0K 1K 78643K 257 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 84 13K 29K 78643K 2849 0 0 UVM aobj 37 2K 2K 78643K 40 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 12 0 0 NDP 10 0K 0K 78643K 41 0 0 temp 150 2374K 2440K 78643K 4936 0 0 kqueue 0 0K 0K 78643K 4 0 0 SYN cache 2 16K 16K 78643K 2 0 0 ddb{0}> 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 358 0 351 1 0 1 1 0 8 0 plimitpl 152 49 0 41 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtentry 112 69 0 38 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 6 0 6 1 1 0 1 0 8 0 tcpcb 544 129 0 125 1 0 1 1 0 8 0 rttmr 72 1 0 1 1 1 0 1 0 8 0 nd6 48 10 0 8 1 0 1 1 0 8 0 ppxss 1128 16 0 16 4 3 1 1 0 8 1 pfosfp 40 846 0 423 5 0 5 5 0 8 0 pfosfpen 112 1428 0 714 21 0 21 21 0 8 0 pfstitem 24 21 0 8 1 0 1 1 0 8 0 pfstkey 112 21 0 8 1 0 1 1 0 8 0 pfstate 328 21 0 8 2 0 2 2 0 8 0 pfrule 1360 21 0 16 2 1 1 2 0 8 0 art_heap8 4096 1 0 0 1 0 1 1 0 8 0 art_heap4 256 312 0 164 12 0 12 12 0 8 1 art_table 32 313 0 164 2 0 2 2 0 8 0 art_node 16 68 0 40 1 0 1 1 0 8 0 sysvmsgpl 40 9 0 1 1 0 1 1 0 8 0 semupl 112 2 0 2 1 1 0 1 0 8 0 semapl 112 82 0 72 1 0 1 1 0 8 0 shmpl 112 38 0 3 1 0 1 1 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 2523 0 1081 47 0 47 47 0 8 0 ffsino 272 2523 0 1081 97 0 97 97 0 8 0 nchpl 144 3594 0 1951 62 0 62 62 0 8 0 uvmvnodes 72 2688 0 0 49 0 49 49 0 8 0 vnodes 200 2688 0 0 142 0 142 142 0 8 0 namei 1024 10844 0 10844 1 0 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scxspl 192 9198 0 9188 8 7 1 7 0 8 0 sigapl 432 803 0 789 2 0 2 2 0 8 0 futexpl 56 7162 0 7162 1 0 1 1 0 8 1 knotepl 112 251 0 222 2 1 1 2 0 8 0 kqueuepl 104 144 0 142 1 0 1 1 0 8 0 pipepl 112 562 0 543 2 1 1 2 0 8 0 fdescpl 488 804 0 789 3 0 3 3 0 8 0 filepl 152 4943 0 4850 6 1 5 6 0 8 1 lockfpl 104 191 0 191 3 2 1 1 0 8 1 lockfspl 32 212 0 212 3 2 1 1 0 8 1 sessionpl 112 22 0 12 1 0 1 1 0 8 0 pgrppl 48 38 0 28 1 0 1 1 0 8 0 ucredpl 96 1135 0 1126 1 0 1 1 0 8 0 zombiepl 144 789 0 789 1 0 1 1 0 8 1 processpl 840 820 0 789 4 0 4 4 0 8 0 procpl 600 2115 0 2075 4 0 4 4 0 8 0 srpgc 64 25 0 25 3 2 1 1 0 8 1 sosppl 128 7 0 7 2 1 1 1 0 8 1 sockpl 384 672 0 653 4 1 3 4 0 8 1 mcl64k 65536 229 0 0 29 0 29 29 0 8 1 mcl16k 16384 2 0 0 1 0 1 1 0 8 0 mcl12k 12288 6 0 0 1 0 1 1 0 8 0 mcl9k 9216 1 0 0 1 0 1 1 0 8 0 mcl8k 8192 3 0 0 1 0 1 1 0 8 0 mcl4k 4096 8 0 0 1 0 1 1 0 8 0 mcl2k2 2112 3 0 0 1 0 1 1 0 8 0 mcl2k 2048 125 0 0 15 0 15 15 0 8 0 mtagpl 80 1 0 0 1 0 1 1 0 8 0 mbufpl 256 343 0 0 18 0 18 18 0 8 0 bufpl 256 6419 0 1043 336 0 336 336 0 8 0 anonpl 16 84787 0 77775 55 10 45 47 0 125 8 amapchunkpl 152 4654 0 4569 14 10 4 9 0 158 0 amappl16 192 3393 0 2933 37 6 31 36 0 8 6 amappl15 184 284 0 283 1 0 1 1 0 8 0 amappl14 176 32 0 26 1 0 1 1 0 8 0 amappl13 168 34 0 31 1 0 1 1 0 8 0 amappl12 160 6 0 6 1 1 0 1 0 8 0 amappl11 152 503 0 490 1 0 1 1 0 8 0 amappl10 144 222 0 218 1 0 1 1 0 8 0 amappl9 136 369 0 366 1 0 1 1 0 8 0 amappl8 128 156 0 140 1 0 1 1 0 8 0 amappl7 120 42 0 34 1 0 1 1 0 8 0 amappl6 112 58 0 51 1 0 1 1 0 8 0 amappl5 104 405 0 390 1 0 1 1 0 8 0 amappl4 96 613 0 588 2 1 1 2 0 8 0 amappl3 88 150 0 144 1 0 1 1 0 8 0 amappl2 80 6434 0 6384 2 0 2 2 0 8 0 amappl1 72 26602 0 26175 24 14 10 19 0 8 0 amappl 72 2378 0 2346 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 39 0 3 1 0 1 1 0 8 0 uaddrrnd 24 804 0 789 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 804 0 789 1 0 1 1 0 8 0 vmmpekpl 168 10920 0 10893 2 0 2 2 0 8 0 vmmpepl 168 91719 0 90361 101 20 81 81 0 357 11 vmsppl 360 803 0 789 2 0 2 2 0 8 0 pdppl 4096 1616 0 1578 6 0 6 6 0 8 0 pvpl 32 259789 0 249696 138 17 121 123 0 265 23 pmappl 224 803 0 789 2 1 1 2 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 526 0 3 15 0 15 15 0 8 0