Skip to content

runtime/pprof: TestCPUProfile fails, "profile too short" on go 1.0.3 #4466

@gopherbot

Description

@gopherbot

by jsawczuk:

When trying to build Go 1.0.3, TestCPUProfile fails on a VirtualBox with Fedora 16 as
its guest OS. I read somewhere that the IO APIC VBox setting is relevant here, and its
enabled. The build succeeds in Go 1.0.2.

Test output:

--- FAIL: TestCPUProfile (0.46 seconds)
pprof_test.go:57:   profile too short: [0x0 0x3 0x0 0x2710 0x0 0x0 0x1 0x0]
FAIL
FAIL    runtime/pprof   0.470s

uname -a:

Linux jsawdev 3.6.6-1.fc16.x86_64 #1 SMP Mon Nov 5 16:56:43 UTC 2012 x86_64 x86_64
x86_64 GNU/Linux

Relevant diff in pprof_test.go:

+   l := len(bytes) / int(unsafe.Sizeof(uintptr(0)))
    val := *(*[]uintptr)(unsafe.Pointer(&bytes))
-   val = val[:len(bytes)/int(unsafe.Sizeof(uintptr(0)))]
+   val = val[:l]
 
-   if len(val) < 10 {
+   if l < 13 {
        t.Fatalf("profile too short: %#x", val)
    }

Let me know if I can provide any additional information. Thanks!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions