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

runtime:mayMoreStackPreempt: TestRuntimeLockMetricsAndProfile/runtime.lock/sample-1 failures #68980

Open
gopherbot opened this issue Aug 20, 2024 · 3 comments
Assignees
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.

Comments

@gopherbot
Copy link
Contributor

#!watchflakes
default <- pkg == "runtime:mayMoreStackPreempt" && test == "TestRuntimeLockMetricsAndProfile/runtime.lock/sample-1"

Issue created automatically to collect these failures.

Example (log):

=== RUN   TestRuntimeLockMetricsAndProfile/runtime.lock/sample-1
    metrics_test.go:1065: lock contention growth in runtime/pprof's view  (0.036582s)
    metrics_test.go:1066: lock contention growth in runtime/metrics' view (0.037450s)
    metrics_test.go:1104: stack [runtime.unlock runtime_test.TestRuntimeLockMetricsAndProfile.func5.1 runtime_test.(*contentionWorker).run] has samples totaling n=199 value=35811485
    metrics_test.go:1192: mutex profile reported contention count different from the known true count (199 != 200)
--- FAIL: TestRuntimeLockMetricsAndProfile/runtime.lock/sample-1 (0.06s)

watchflakes

@gopherbot gopherbot added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Aug 20, 2024
@gopherbot
Copy link
Contributor Author

Found new dashboard test flakes for:

#!watchflakes
default <- pkg == "runtime:mayMoreStackPreempt" && test == "TestRuntimeLockMetricsAndProfile/runtime.lock/sample-1"
2024-08-20 17:52 gotip-linux-386-longtest go@a4cb37d4 runtime:mayMoreStackPreempt.TestRuntimeLockMetricsAndProfile/runtime.lock/sample-1 (log)
=== RUN   TestRuntimeLockMetricsAndProfile/runtime.lock/sample-1
    metrics_test.go:1065: lock contention growth in runtime/pprof's view  (0.036582s)
    metrics_test.go:1066: lock contention growth in runtime/metrics' view (0.037450s)
    metrics_test.go:1104: stack [runtime.unlock runtime_test.TestRuntimeLockMetricsAndProfile.func5.1 runtime_test.(*contentionWorker).run] has samples totaling n=199 value=35811485
    metrics_test.go:1192: mutex profile reported contention count different from the known true count (199 != 200)
--- FAIL: TestRuntimeLockMetricsAndProfile/runtime.lock/sample-1 (0.06s)

watchflakes

@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Aug 20, 2024
@rhysh
Copy link
Contributor

rhysh commented Aug 21, 2024

Commit a4cb37d comes after CL 606115, so lack of that CL doesn't explain this.

I don't see where / how mayMoreStackPreempt gets involved with the build. But if the watchflakes line really is telling us about a build that sets mayMoreStackPreempt for the runtime package, then I wonder if the sample is getting dropped because preemption can result in an additional contended lock access (before m.locks gets back down to 0), which competes with the desired report for the M's single reporting slot. It's unfortunate that this t.Error path doesn't write out the profile to show us if that's the case.

@gopherbot
Copy link
Contributor Author

Found new dashboard test flakes for:

#!watchflakes
default <- pkg == "runtime:mayMoreStackPreempt" && test == "TestRuntimeLockMetricsAndProfile/runtime.lock/sample-1"
2024-09-30 17:02 gotip-linux-amd64-longtest-aliastypeparams go@c7f70433 runtime:mayMoreStackPreempt.TestRuntimeLockMetricsAndProfile/runtime.lock/sample-1 (log)
=== RUN   TestRuntimeLockMetricsAndProfile/runtime.lock/sample-1
    metrics_test.go:1065: lock contention growth in runtime/pprof's view  (0.037930s)
    metrics_test.go:1066: lock contention growth in runtime/metrics' view (0.038007s)
    metrics_test.go:1104: stack [runtime.unlock runtime_test.TestRuntimeLockMetricsAndProfile.func5.1 runtime_test.(*contentionWorker).run] has samples totaling n=199 value=37634624
    metrics_test.go:1192: mutex profile reported contention count different from the known true count (199 != 200)
--- FAIL: TestRuntimeLockMetricsAndProfile/runtime.lock/sample-1 (0.05s)

watchflakes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
Status: No status
Development

No branches or pull requests

4 participants