Skip to content

runtime: VirtualAlloc of 1048576 bytes failed with errno=487 #14638

@mei-rune

Description

@mei-rune

Please answer these questions before submitting your issue. Thanks!

  1. What version of Go are you using (go version)?
    go version go1.6 windows/386
  2. What operating system and processor architecture are you using (go env)?
    set GOARCH=386
    set GOBIN=
    set GOEXE=.exe
    set GOHOSTARCH=386
    set GOHOSTOS=windows
    set GOOS=windows
    set GOPATH=C:\tpt_programs\go_3td;C:\tpt_programs\Jenkins\jobs\xxx\workspace\src\engine
    set GORACE=
    set GOROOT=C:\tpt_programs\go
    set GOTOOLDIR=C:\tpt_programs\go\pkg\tool\windows_386
    set GO15VENDOREXPERIMENT=1
    set CC=gcc
    set GOGCCFLAGS=-m32 -mthreads -fmessage-length=0
    set CXX=g++
    set CGO_ENABLED=1
  3. What did you do?
    (Use play.golang.org to provide a runnable example, if possible.)
    run 'go build' on the windows
  4. What did you expect to see?
    Build is ok.
  5. What did you see instead?
runtime: VirtualAlloc of 1048576 bytes failed with errno=487
fatal error: runtime: cannot map pages in arena address space

runtime stack:
runtime.throw(0x657940, 0x30)
    c:/go/src/runtime/panic.go:530 +0x7f
runtime.sysMap(0x41380000, 0x100000, 0x30c3fd01, 0x728fd8)
    c:/go/src/runtime/mem_windows.go:116 +0xf9
runtime.(*mheap).sysAlloc(0x7189a0, 0x100000, 0x0)
    c:/go/src/runtime/malloc.go:429 +0x121
runtime.(*mheap).grow(0x7189a0, 0x8, 0x0)
    c:/go/src/runtime/mheap.go:651 +0x52
runtime.(*mheap).allocSpanLocked(0x7189a0, 0x1, 0x313d9e60)
    c:/go/src/runtime/mheap.go:553 +0x485
runtime.(*mheap).alloc_m(0x7189a0, 0x1, 0x17, 0x16600, 0x313d9e60)
    c:/go/src/runtime/mheap.go:437 +0x116
runtime.(*mheap).alloc.func1()
    c:/go/src/runtime/mheap.go:502 +0x3d
runtime.systemstack(0x30c3fec4)
    c:/go/src/runtime/asm_386.s:329 +0x88
runtime.(*mheap).alloc(0x7189a0, 0x1, 0x17, 0x27f0100, 0x1606)
    c:/go/src/runtime/mheap.go:503 +0x5a
runtime.(*mcentral).grow(0x719c18, 0x0)
    c:/go/src/runtime/mcentral.go:209 +0x8e
runtime.(*mcentral).cacheSpan(0x719c18, 0x313d9e60)
    c:/go/src/runtime/mcentral.go:89 +0x4c0
runtime.(*mcache).refill(0x310000, 0x17, 0x313d9e60)
    c:/go/src/runtime/mcache.go:119 +0xab
runtime.mallocgc.func2()
    c:/go/src/runtime/malloc.go:642 +0x2b
runtime.systemstack(0x109ae000)
    c:/go/src/runtime/asm_386.s:313 +0x5e
runtime.mstart()
    c:/go/src/runtime/proc.go:1048

goroutine 1 [running]:
runtime.systemstack_switch()
    c:/go/src/runtime/asm_386.s:267 fp=0x3bd937f4 sp=0x3bd937f0
runtime.mallocgc(0x1c0, 0x5bd5c0, 0x0, 0x4)
    c:/go/src/runtime/malloc.go:643 +0x6ca fp=0x3bd93860 sp=0x3bd937f4
runtime.newobject(0x5bd5c0, 0x0)
    c:/go/src/runtime/malloc.go:781 +0x41 fp=0x3bd93874 sp=0x3bd93860
cmd/link/internal/ld.writelines()
    c:/go/src/cmd/link/internal/ld/dwarf.go:1651 +0xe77 fp=0x3bd93aac sp=0x3bd93874
cmd/link/internal/ld.Dwarfemitdebugsections()
    c:/go/src/cmd/link/internal/ld/dwarf.go:2108 +0x94a fp=0x3bd93bc0 sp=0x3bd93aac
cmd/link/internal/x86.asmb()
    c:/go/src/cmd/link/internal/x86/asm.go:729 +0xea2 fp=0x3bd93cdc sp=0x3bd93bc0
cmd/link/internal/ld.Ldmain()
    c:/go/src/cmd/link/internal/ld/pobj.go:248 +0x1ac6 fp=0x3bd93f28 sp=0x3bd93cdc
cmd/link/internal/x86.Main()
    c:/go/src/cmd/link/internal/x86/obj.go:44 +0x1c fp=0x3bd93f2c sp=0x3bd93f28
main.main()
    c:/go/src/cmd/link/main.go:25 +0xf6 fp=0x3bd93f98 sp=0x3bd93f2c
runtime.main()
    c:/go/src/runtime/proc.go:188 +0x234 fp=0x3bd93fc0 sp=0x3bd93f98
runtime.goexit()
    c:/go/src/runtime/asm_386.s:1585 +0x1 fp=0x3bd93fc4 sp=0x3bd93fc0

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions