login: panic: malloc: out of space in kmem_map Stopped at db_enter+0x18: addq $0x8,%rsp TID PID UID PRFLAGS PFLAGS CPU COMMAND * 80165 63692 0 0x2 0 0K syz-executor.1 db_enter() at db_enter+0x18 sys/arch/amd64/amd64/db_interface.c:398 panic() at panic+0x174 sys/kern/subr_prf.c:208 malloc(200000,2a,9) at malloc+0xad5 sys/kern/kern_malloc.c:242 kcovioctl(1a1300,80084b01,ffff800020c1b7a0,3,ffff800020b759e0) at kcovioctl+0xe6 kd_init sys/dev/kcov.c:405 [inline] kcovioctl(1a1300,80084b01,ffff800020c1b7a0,3,ffff800020b759e0) at kcovioctl+0xe6 sys/dev/kcov.c:298 VOP_IOCTL(fffffd8068baa5c0,80084b01,ffff800020c1b7a0,3,fffffd807f7c6780,ffff800020b759e0) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd8073baf150,80084b01,ffff800020c1b7a0,ffff800020b759e0) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800020b759e0,ffff800020c1b8e0,ffff800020c1b8d0) at sys_ioctl+0x651 syscall(ffff800020c1b980) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c1b980) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,36,7f7ffffe4f28,36,3,9555abb27c8) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffe4a40, 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:398 panic() at panic+0x174 sys/kern/subr_prf.c:208 malloc(200000,2a,9) at malloc+0xad5 sys/kern/kern_malloc.c:242 kcovioctl(1a1300,80084b01,ffff800020c1b7a0,3,ffff800020b759e0) at kcovioctl+0xe6 kd_init sys/dev/kcov.c:405 [inline] kcovioctl(1a1300,80084b01,ffff800020c1b7a0,3,ffff800020b759e0) at kcovioctl+0xe6 sys/dev/kcov.c:298 VOP_IOCTL(fffffd8068baa5c0,80084b01,ffff800020c1b7a0,3,fffffd807f7c6780,ffff800020b759e0) at VOP_IOCTL+0x9a sys/kern/vfs_vops.c:290 vn_ioctl(fffffd8073baf150,80084b01,ffff800020c1b7a0,ffff800020b759e0) at vn_ioctl+0xc9 sys/kern/vfs_vnops.c:512 sys_ioctl(ffff800020b759e0,ffff800020c1b8e0,ffff800020c1b8d0) at sys_ioctl+0x651 syscall(ffff800020c1b980) at syscall+0x5b8 mi_syscall sys/sys/syscall_mi.h:99 [inline] syscall(ffff800020c1b980) at syscall+0x5b8 sys/arch/amd64/amd64/trap.c:574 Xsyscall(6,36,7f7ffffe4f28,36,3,9555abb27c8) at Xsyscall+0x128 end of kernel end trace frame: 0x7f7ffffe4a40, count: -9 ddb{0}> show registers rdi 0 rsi 0x1 rbp 0xffff800020c1b3d0 rbx 0xffff800020c1b480 rdx 0xffffffff81f8b3f2 apollo_pio_rec+0xa90e rcx 0 rax 0 r8 0xffffffff81476a83 kprintf+0x183 r9 0x1 r10 0x25 r11 0x4e367b277325e8db r12 0x3000000008 r13 0xffff800020c1b3e0 r14 0x100 r15 0x1 rip 0xffffffff81b0eb48 db_enter+0x18 cs 0x8 rflags 0x246 rsp 0xffff800020c1b3c0 ss 0x10 db_enter+0x18: addq $0x8,%rsp ddb{0}> show proc PROC (syz-executor.1) pid=80165 stat=onproc flags process=2 proc=0 pri=59, usrpri=59, nice=20 forw=0xffffffffffffffff, list=0xffff800020b74018,0xffffffff8237cfc8 process=0xffff800020b8d710 user=0xffff800020c16000, vmspace=0xfffffd807effdb40 estcpu=9, cpticks=2, pctcpu=0.0 user=0, sys=1, intr=0 ddb{0}> ps PID TID PPID UID S FLAGS WAIT COMMAND *63692 80165 27715 0 7 0x2 syz-executor.1 43407 320929 1 0 3 0x100083 ttyin getty 54839 86280 27715 0 3 0x82 piperd syz-executor.0 59388 110791 0 0 3 0x14200 bored sosplice 27715 80724 88256 0 3 0x82 thrsleep syz-fuzzer 27715 166517 88256 0 3 0x4000082 thrsleep syz-fuzzer 27715 203044 88256 0 3 0x4000082 thrsleep syz-fuzzer 27715 243259 88256 0 3 0x4000082 thrsleep syz-fuzzer 27715 423990 88256 0 3 0x4000082 thrsleep syz-fuzzer 27715 39041 88256 0 3 0x4000082 kqread syz-fuzzer 27715 244645 88256 0 3 0x4000082 thrsleep syz-fuzzer 27715 237774 88256 0 3 0x4000082 thrsleep syz-fuzzer 27715 242607 88256 0 3 0x4000082 thrsleep syz-fuzzer 27715 15031 88256 0 3 0x4000082 thrsleep syz-fuzzer 88256 358952 70299 0 3 0x10008a pause ksh 70299 266873 50198 0 3 0x92 select sshd 50198 459476 1 0 3 0x80 select sshd 65185 207414 6369 74 3 0x100092 bpf pflogd 6369 348023 1 0 3 0x80 netio pflogd 64208 204067 68736 73 3 0x100090 kqread syslogd 68736 146674 1 0 3 0x100082 netio syslogd 10229 98706 0 0 3 0x14200 pgzero zerothread 8691 308158 0 0 3 0x14200 aiodoned aiodoned 81454 71173 0 0 3 0x14200 syncer update 57486 207071 0 0 3 0x14200 cleaner cleaner 57146 317543 0 0 3 0x14200 reaper reaper 32914 281987 0 0 3 0x14200 pgdaemon pagedaemon 33664 23801 0 0 3 0x14200 bored crynlk 44823 227594 0 0 3 0x14200 bored crypto 40348 125061 0 0 3 0x40014200 acpi0 acpi0 99880 453406 0 0 7 0x40014200 idle1 6067 182274 0 0 3 0x14200 bored softnet 12324 54946 0 0 3 0x14200 bored systqmp 43822 163760 0 0 3 0x14200 bored systq 85286 353116 0 0 3 0x40014200 bored softclock 99786 187436 0 0 3 0x40014200 idle0 15203 467717 0 0 3 0x14200 bored smr 1 482733 0 0 3 0x82 wait init 0 0 -1 0 3 0x10200 scheduler swapper ddb{0}> show all locks Process 63692 (syz-executor.1) thread 0xffff800020b759e0 (80165) exclusive kernel_lock &kernel_lock r = 0 (0xffffffff82394290) 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 9519 71890K 71898K 78643K 11015 0 0 pcb 21 9K 11K 78643K 547 0 0 rtable 82 3K 4K 78643K 411 0 0 ifaddr 56 13K 15K 78643K 249 0 0 counters 39 33K 33K 78643K 39 0 0 ioctlops 0 0K 4K 78643K 1491 0 0 iov 0 0K 36K 78643K 763 0 0 mount 1 1K 1K 78643K 1 0 0 vnodes 1217 76K 77K 78643K 1830 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 14 0 0 VM map 2 1K 1K 78643K 2 0 0 sem 12 0K 1K 78643K 198 0 0 dirhash 12 2K 2K 78643K 12 0 0 ACPI 1808 196K 290K 78643K 12628 0 0 file desc 4 9K 21K 78643K 1178 0 0 sigio 0 0K 0K 78643K 17 0 0 proc 54 51K 71K 78643K 652 0 0 subproc 51 53249K 67586K 78643K 377 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 131 0 0 in_multi 22 1K 2K 78643K 182 0 0 ether_multi 1 0K 0K 78643K 11 0 0 mrt 0 0K 0K 78643K 7 0 0 ISOFS mount 1 32K 32K 78643K 1 0 0 MSDOSFS mount 1 16K 16K 78643K 1 0 0 ttys 78 344K 344K 78643K 78 0 0 exec 0 0K 1K 78643K 310 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 73 12K 25K 78643K 5263 0 0 UVM aobj 68 3K 3K 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 65 0 0 NDP 12 0K 0K 78643K 77 0 0 temp 164 2379K 2445K 78643K 6764 0 0 kqueue 0 0K 0K 78643K 2 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 12 0 9 1 0 1 1 0 8 0 inpcbpl 280 557 0 553 1 0 1 1 0 8 0 plimitpl 152 56 0 49 1 0 1 1 0 8 0 plcache 128 20 0 0 1 0 1 1 0 8 0 rtentry 112 114 0 83 2 0 2 2 0 8 0 syncache 264 4 0 4 1 1 0 1 0 8 0 tcpqe 32 9 0 9 1 1 0 1 0 8 0 tcpcb 544 174 0 170 1 0 1 1 0 8 0 rttmr 72 1 0 1 1 1 0 1 0 8 0 nd6 48 20 0 18 1 0 1 1 0 8 0 ppxss 1128 30 0 30 6 5 1 1 0 8 1 pffrag 232 1 0 1 1 1 0 1 0 482 0 pffrnode 88 1 0 1 1 1 0 1 0 8 0 pffrent 40 2 0 2 1 1 0 1 0 8 0 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 45 0 21 1 0 1 1 0 8 0 pfstkey 112 45 0 21 1 0 1 1 0 8 0 pfstate 328 45 0 21 3 0 3 3 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 532 0 384 12 0 12 12 0 8 1 art_table 32 533 0 384 2 0 2 2 0 8 0 art_node 16 113 0 85 1 0 1 1 0 8 0 sysvmsgpl 40 16 0 7 1 0 1 1 0 8 0 semupl 112 1 0 1 1 1 0 1 0 8 0 semapl 112 192 0 182 1 0 1 1 0 8 0 shmpl 112 75 0 9 2 0 2 2 0 8 0 dirhash 1024 17 0 0 3 0 3 3 0 8 0 dino1pl 128 3530 0 2066 48 0 48 48 0 8 0 ffsino 272 3530 0 2066 99 1 98 98 0 8 0 nchpl 144 5584 0 3922 63 1 62 62 0 8 0 uvmvnodes 72 3833 0 0 70 0 70 70 0 8 0 vnodes 200 3833 0 0 202 0 202 202 0 8 0 namei 1024 16589 0 16589 3 2 1 1 0 8 1 percpumem 16 30 0 0 1 0 1 1 0 8 0 scxspl 192 35238 0 35238 18 17 1 6 0 8 1 sigapl 432 1353 0 1341 2 0 2 2 0 8 0 futexpl 56 14973 0 14973 2 1 1 1 0 8 1 knotepl 112 366 0 345 1 0 1 1 0 8 0 kqueuepl 104 206 0 204 1 0 1 1 0 8 0 pipepl 112 1558 0 1539 3 1 2 2 0 8 1 fdescpl 488 1354 0 1341 3 0 3 3 0 8 0 filepl 152 8704 0 8622 9 3 6 6 0 8 2 lockfpl 104 984 0 984 3 2 1 1 0 8 1 lockfspl 32 660 0 660 3 2 1 1 0 8 1 sessionpl 112 29 0 21 1 0 1 1 0 8 0 pgrppl 48 41 0 33 1 0 1 1 0 8 0 ucredpl 96 1260 0 1252 1 0 1 1 0 8 0 zombiepl 144 1341 0 1341 3 2 1 1 0 8 1 processpl 840 1370 0 1341 4 0 4 4 0 8 0 procpl 600 4215 0 4177 6 2 4 5 0 8 0 srpgc 64 55 0 55 4 3 1 1 0 8 1 sosppl 128 12 0 12 5 4 1 1 0 8 1 sockpl 384 1010 0 998 5 2 3 3 0 8 1 mcl64k 65536 263 0 0 33 5 28 33 0 8 1 mcl16k 16384 1 0 0 1 0 1 1 0 8 0 mcl12k 12288 12 0 0 2 0 2 2 0 8 0 mcl9k 9216 7 0 0 1 0 1 1 0 8 0 mcl8k 8192 4 0 0 1 0 1 1 0 8 0 mcl4k 4096 17 0 0 3 0 3 3 0 8 0 mcl2k2 2112 2 0 0 1 0 1 1 0 8 0 mcl2k 2048 120 0 0 14 0 14 14 0 8 0 mtagpl 80 1 0 0 1 0 1 1 0 8 0 mbufpl 256 412 0 0 22 1 21 21 0 8 0 bufpl 256 19428 0 12404 440 0 440 440 0 8 0 anonpl 16 177437 0 170339 87 49 38 53 0 125 0 amapchunkpl 152 8179 0 8101 13 6 7 9 0 158 2 amappl16 192 8747 0 8276 66 40 26 36 0 8 1 amappl15 184 60 0 56 1 0 1 1 0 8 0 amappl14 176 451 0 446 2 1 1 1 0 8 0 amappl13 168 231 0 228 1 0 1 1 0 8 0 amappl12 160 416 0 412 1 0 1 1 0 8 0 amappl11 152 24 0 16 1 0 1 1 0 8 0 amappl10 144 131 0 128 1 0 1 1 0 8 0 amappl9 136 1163 0 1160 1 0 1 1 0 8 0 amappl8 128 741 0 724 1 0 1 1 0 8 0 amappl7 120 66 0 62 1 0 1 1 0 8 0 amappl6 112 63 0 54 1 0 1 1 0 8 0 amappl5 104 300 0 287 1 0 1 1 0 8 0 amappl4 96 1234 0 1208 2 1 1 2 0 8 0 amappl3 88 809 0 803 1 0 1 1 0 8 0 amappl2 80 10907 0 10866 2 0 2 2 0 8 0 amappl1 72 40351 0 39957 26 16 10 20 0 8 0 amappl 72 4498 0 4470 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 9 2 0 2 2 0 8 0 uaddrrnd 24 1354 0 1341 1 0 1 1 0 8 0 uaddrbest 32 2 0 0 1 0 1 1 0 8 0 uaddr 24 1354 0 1341 1 0 1 1 0 8 0 vmmpekpl 168 17277 0 17252 2 0 2 2 0 8 0 vmmpepl 168 156499 0 155199 134 55 79 86 0 357 12 vmsppl 360 1353 0 1341 2 0 2 2 0 8 0 pdppl 4096 2716 0 2682 6 0 6 6 0 8 0 pvpl 32 532902 0 522698 193 91 102 136 0 265 0 pmappl 224 1353 0 1341 3 2 1 2 0 8 0 extentpl 40 39 0 25 1 0 1 1 0 8 0 phpool 112 643 0 12 19 0 19 19 0 8 0