Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

profiler: test TestDeltaMutexProfile fails with Go 1.14beta1 #1761

Closed
eclipseo opened this issue Jan 29, 2020 · 3 comments
Closed

profiler: test TestDeltaMutexProfile fails with Go 1.14beta1 #1761

eclipseo opened this issue Jan 29, 2020 · 3 comments
Assignees
Labels
priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@eclipseo
Copy link

Environment
Fedora Rawhide, Go 1.14beta1, cloud 0.51 and 0.52

Code

cloud.google.com/go/profiler
--- FAIL: TestDeltaMutexProfile (2.04s)
    profiler_test.go:868: backgroundHog not in the delta mutex profile (sum=0):
        PeriodType: contentions count
        Period: 1
        Time: 2020-01-29 15:26:46.270877537 +0000 UTC
        Samples:
        contentions/count delay/nanoseconds
             793600  959566780: 1 2 
                700    2304313: 3 2 
        Locations
             1: 0x55dab3d9d580 M=1 sync.(*Mutex).Unlock /usr/lib/golang/src/sync/mutex.go:190 s=0
             2: 0x55dab3da3b28 M=1 cloud.google.com/go/profiler.hog.func1 /builddir/build/BUILD/google-cloud-go-0.52.0/_build/src/cloud.google.com/go/profiler/profiler_test.go:927 s=0
             3: 0x55dab3d9d55f M=1 sync.(*Mutex).Unlock /usr/lib/golang/src/sync/mutex.go:190 s=0
        Mappings
        1: 0x55dab360b000/0x55dab3da6000/0x4a7000 /tmp/go-build963720630/b001/profiler.test 0fdaed16e14eba5df21ec9643c4fce7ee94a99ed [FN]
FAIL
exit status 1
FAIL	cloud.google.com/go/profiler	12.574s

Started to fail on Go 1.14beta1, was working or Go 1.13.5.

@eclipseo eclipseo added the triage me I really want to be triaged. label Jan 29, 2020
@tbpg tbpg added api: profiler priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. and removed triage me I really want to be triaged. labels Jan 29, 2020
@tbpg
Copy link
Contributor

tbpg commented Jan 29, 2020

I was able to reproduce this:

Go 1.13:

$ go test -v -run TestDeltaMutexProfile
go: downloading google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba
go: extracting google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba
go: finding google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba
=== RUN   TestDeltaMutexProfile
--- PASS: TestDeltaMutexProfile (2.10s)
PASS
ok  	cloud.google.com/go/profiler	2.198s

Go 1.14beta1:

$ go1.14beta1 test -v -run TestDeltaMutexProfile           
=== RUN   TestDeltaMutexProfile
    TestDeltaMutexProfile: profiler_test.go:868: backgroundHog not in the delta mutex profile (sum=0):
        PeriodType: contentions count
        Period: 1
        Time: 2020-01-29 11:23:19.673458092 -0500 EST
        Samples:
        contentions/count delay/nanoseconds
             869700 1054401211: 1 2 
               1100    2516636: 3 2 
        Locations
             1: 0xb8e09e M=1 sync.(*Mutex).Unlock /usr/local/google/home/tbp/sdk/go1.14beta1/src/sync/mutex.go:190 s=0
             2: 0xb945f6 M=1 cloud.google.com/go/profiler.hog.func1 /usr/local/google/home/tbp/go/src/cloud.google.com/go/profiler/profiler_test.go:927 s=0
             3: 0xb8e07d M=1 sync.(*Mutex).Unlock /usr/local/google/home/tbp/sdk/go1.14beta1/src/sync/mutex.go:190 s=0
        Mappings
        1: 0x400000/0xb96000/0x0 /tmp/go-build528717842/b001/profiler.test  [FN]
--- FAIL: TestDeltaMutexProfile (2.02s)
FAIL
exit status 1
FAIL	cloud.google.com/go/profiler	2.120s

@tbpg
Copy link
Contributor

tbpg commented Jan 29, 2020

I reported golang/go#36874 since this seems to be a change in the behavior of Go.

The call to symbolize is the problem. But, I think we can delete it since the workaround is not needed yet. I'll send a CL. Edit: assigning to @jqll, who's worked on this in the past.

@tbpg tbpg assigned tbpg and jqll Jan 29, 2020
@jqll
Copy link
Contributor

jqll commented Jan 29, 2020

Mutex profile is probably now symbolized. https://github.com/googleapis/google-cloud-go/blob/master/profiler/profiler.go#L442 needs to check if the profile is already symbolized. I can work on a fix probably later today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

3 participants