Skip to content

runtime/debug: WriteHeapDump does not write a heapdump for go1.3beta2 windows #8119

@gopherbot

Description

@gopherbot

by marcel.lanz:

What does 'go version' print?
go version go1.3beta2 windows/386

What steps reproduce the problem?

http://play.golang.org/p/jcL5Ab1ivY
build and run the programm.

What happened?
It produced a file named heapdump_win32 but of size 0 bytes

What should have happened instead?
it should write a heapdump to a file named heapdump_win32 with file size > 0 bytes

Please provide any additional information below:
Windows is Windows7, 64Bit
runtime/debug.WriteHeapDump works on OSX with: go version go1.3beta2 darwin/amd64

package main

import (
    "fmt"
    "os"
    "runtime/debug"
)

func main() {

    fmt.Println("writing heapdump")
    f, err := os.Create("heapdump_wind32")
    if err != nil {
        panic(err)
    }

    debug.WriteHeapDump(f.Fd())
    f.Close()
}

produces a file of 0 bytes on Windows and 137410 bytes on OSX

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions