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

strings: OpenBSD builders timing out running strings test #26174

Closed
ianlancetaylor opened this issue Jul 1, 2018 · 11 comments
Closed

strings: OpenBSD builders timing out running strings test #26174

ianlancetaylor opened this issue Jul 1, 2018 · 11 comments
Labels
FrozenDueToAge help wanted NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. OS-OpenBSD Performance
Milestone

Comments

@ianlancetaylor ianlancetaylor added OS-OpenBSD NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. release-blocker labels Jul 1, 2018
@ianlancetaylor ianlancetaylor added this to the Go1.11 milestone Jul 1, 2018
@ianlancetaylor
Copy link
Contributor Author

Most likely cause is https://golang.org/cl/121495 which started running much longer string comparison tests on the builders.

@ianlancetaylor
Copy link
Contributor Author

But the full test only takes 9 seconds on my laptop so it's hard to understand how it could take 180 seconds on OpenBSD.

@ianlancetaylor
Copy link
Contributor Author

See also #26155

@ianlancetaylor
Copy link
Contributor Author

Using gomote and running go test strings without -test.short, I see that TestCompareStrings takes 213.40 seconds to run.

@gopherbot
Copy link

Change https://golang.org/cl/121820 mentions this issue: strings: do much less redundant testing in TestCompareStrings

@ianlancetaylor
Copy link
Contributor Author

Running the test with -test.cpuprofile gives me this from go tool pprof's top command:

Showing nodes accounting for 21s, 94.13% of 22.31s total
Dropped 72 nodes (cum <= 0.11s)
Showing top 10 nodes out of 80
      flat  flat%   sum%        cum   cum%
     7.68s 34.42% 34.42%      7.68s 34.42%  runtime.nanotime
     5.59s 25.06% 59.48%      5.59s 25.06%  runtime.thrsleep
     2.36s 10.58% 70.06%      2.36s 10.58%  runtime.osyield
     2.08s  9.32% 79.38%      2.08s  9.32%  runtime.memmove
     1.36s  6.10% 85.48%      1.36s  6.10%  runtime.thrwakeup
     0.61s  2.73% 88.21%      0.61s  2.73%  memeqbody
     0.51s  2.29% 90.50%      0.51s  2.29%  cmpbody
     0.36s  1.61% 92.11%      0.36s  1.61%  runtime.procyield
     0.32s  1.43% 93.55%      0.40s  1.79%  runtime.scanobject
     0.13s  0.58% 94.13%      0.13s  0.58%  runtime.findObject

@josharian
Copy link
Contributor

linux/arm too

gopherbot pushed a commit that referenced this issue Jul 2, 2018
On the OpenBSD builder this reduces the test time from 213 seconds to
60 seconds, without loss of testing.

Not sure why the test is so much slower on OpenBSD, so not closing the
issues.

Updates #26155
Updates #26174

Change-Id: I13b58bbe3b209e591c308765077d2342943a3d2a
Reviewed-on: https://go-review.googlesource.com/121820
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ralph Corderoy <ralph@inputplus.co.uk>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
@ianlancetaylor
Copy link
Contributor Author

CL 121820 has been committed, which should let this test pass reliably, so removing the release-blocker label. Leaving the issue open to investigate why the test is so much slower on OpenBSD compared to GNU/Linux. It may be only that GNU/Linux gets the current time via a VDSO and sleeps on a futex, but it would be nice to know for sure.

@gopherbot
Copy link

Change https://golang.org/cl/124115 mentions this issue: [release-branch.go1.10] strings: do much less redundant testing in TestCompareStrings

gopherbot pushed a commit that referenced this issue Jul 16, 2018
…stCompareStrings

On the OpenBSD builder this reduces the test time from 213 seconds to
60 seconds, without loss of testing.

Not sure why the test is so much slower on OpenBSD, so not closing the
issues.

Updates #26155
Updates #26174

Change-Id: I13b58bbe3b209e591c308765077d2342943a3d2a
Reviewed-on: https://go-review.googlesource.com/121820
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ralph Corderoy <ralph@inputplus.co.uk>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
(cherry picked from commit 869884d)
Reviewed-on: https://go-review.googlesource.com/124115
Reviewed-by: Bill O'Farrell <billotosyr@gmail.com>
@gopherbot
Copy link

Change https://golang.org/cl/124295 mentions this issue: [release-branch.go1.9] strings: do much less redundant testing in TestCompareStrings

@gopherbot
Copy link

Change https://golang.org/cl/147358 mentions this issue: strings: lower running time of TestCompareStrings

@golang golang locked and limited conversation to collaborators Nov 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge help wanted NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. OS-OpenBSD Performance
Projects
None yet
Development

No branches or pull requests

3 participants