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

os: TestPipeThreads failing sporadically on aix-ppc64 #70131

Open
pmur opened this issue Oct 30, 2024 · 6 comments
Open

os: TestPipeThreads failing sporadically on aix-ppc64 #70131

pmur opened this issue Oct 30, 2024 · 6 comments
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@pmur
Copy link
Contributor

pmur commented Oct 30, 2024

Go version

master

Output of go env in your module/workspace:

GOOS=aix

What did you do?

#build go.
go test os -test.run=TestPipeThreads -test.count=1

What did you see happen?

The tests fails consistently on aix systems with GOMAXPROC >= 8. It fails sporadically with smaller values, as is seen with aix-ppc64 CI. This CI log seems like the first of the recent failures. However, it is reproducible prior to the 1.23 release.

What did you expect to see?

The test passes consistently.

@gabyhelp
Copy link

Related Issues and Documentation

(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)

@ianlancetaylor
Copy link
Contributor

The log https://build.golang.org/log/f58a9df223e4f6179ce1ec967c5ec8fa219cdefa shows 39 threads waiting in syscall.Read. The test expects those threads to quickly see that there is no data to read, and to fall back to using poll. There are 11 goroutines (not threads) sleeping waiting for poll to report that there is more data.

It's at least possible that with many CPUs the reading threads are being created faster than the kernel is deciding that there is no data to read and returning EAGAIN. It would be fine to skip the test on AIX with a comment pointing to this issue, as we've done with #19111 for Solaris.

@pmur
Copy link
Contributor Author

pmur commented Oct 31, 2024

That seems to agree with what I am seeing. I am curious why it started failing consistently during CI only recently. Does the scheduler restrict thread creation?

@cagedmantis cagedmantis added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Oct 31, 2024
@cagedmantis
Copy link
Contributor

@cagedmantis cagedmantis added this to the Backlog milestone Oct 31, 2024
@gopherbot
Copy link
Contributor

Change https://go.dev/cl/623817 mentions this issue: os: skip TestPipeThreads on aix

@ianlancetaylor
Copy link
Contributor

The test uses the unusual runtime/debug.SetMaxThreads function to tell the scheduler to limit the number of threads that it creates.

But I have no idea why it started failing more frequently recently.

gopherbot pushed a commit that referenced this issue Oct 31, 2024
This tests fails sporadically on the aix-ppc64 CI. I suspect this is
an aix performance related issue. Skip the test.

AIX seems slow to perform a non-blocking reading on a pipe, and this
results in too many threads being created. This happens as far back
as go1.22, where I stopped looking.

On the GCC farm machine gcc119, The failure rate seemed coupled to
GOMAXPROCS; about 1% for <=8, up to 40%+ for >=30 for all releases
tested.

For #70131

Change-Id: If002b55e5a4586d10cc7876d7c25259e61b17163
Reviewed-on: https://go-review.googlesource.com/c/go/+/623817
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: Paul Murphy <murp@ibm.com>
Auto-Submit: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

5 participants