-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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: TestChtimes failures #68687
Comments
Found new dashboard test flakes for:
2024-07-31 19:54 gotip-linux-arm go@ab7435ab os.TestChtimes (log)
|
Found new dashboard test flakes for:
2024-08-02 14:33 gotip-linux-arm go@e7619216 os.TestChtimes (log)
|
This seems like the same issue as #68663, which started happening on ARM since 2024-07-30. |
Change https://go.dev/cl/604155 mentions this issue: |
The linux-arm builder had a change in its environment on 2024-07-29, which coincidences with the timing of this test becoming flaky on that builder. The host VM started running additional security software in the background. The intent was not not affect the signal the builder provides, but it is possible that this test becoming flaky is related to that environment change rather than a change in the Go tree itself. |
So basically someone else is reading the file, which changes its atime. This can probably be mitigated by having an empty file. inode(7) says:
If we make a file of 0 bytes, no one can read more than 0 bytes from it, The alternative is to use a different location which is guaranteed to not be touched by the above mentioned security software (although that could defeat the purpose of that software). |
Change https://go.dev/cl/604315 mentions this issue: |
Change https://go.dev/cl/604196 mentions this issue: |
@gopherbot Please backport to Go 1.23 and 1.22. This is a test-only fix that makes a test more resilient against other programs possibly reading files in the background. It's also needed to fix test flakiness on the linux/arm builder where this started happening after a builder environment change. |
Backport issue(s) opened: #68811 (for 1.22), #68812 (for 1.23). Remember to create the cherry-pick CL(s) as soon as the patch is submitted to master, according to https://go.dev/wiki/MinorReleases. |
Change https://go.dev/cl/605375 mentions this issue: |
It appears that some builders (notably, linux-arm) have some additional security software installed, which apparently reads the files created by tests. As a result, test file atime is changed, making the test fail like these: === RUN TestChtimesOmit ... os_test.go:1475: atime mismatch, got: "2024-07-30 18:42:03.450932494 +0000 UTC", want: "2024-07-30 18:42:02.450932494 +0000 UTC" === RUN TestChtimes ... os_test.go:1539: AccessTime didn't go backwards; was=2024-07-31 20:45:53.390326147 +0000 UTC, after=2024-07-31 20:45:53.394326118 +0000 UTC According to inode(7), atime is changed when more than 0 bytes are read from the file. So, one possible solution to these flakes is to make the test files empty, so no one can read more than 0 bytes from them. For #68687 For #68663 Fixes #68812 Change-Id: Ib9234567883ef7b16ff8811e3360cd26c2d6bdab Reviewed-on: https://go-review.googlesource.com/c/go/+/604315 LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Kirill Kolyshkin <[email protected]> Reviewed-by: Robert Griesemer <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]> Commit-Queue: Ian Lance Taylor <[email protected]> Auto-Submit: Ian Lance Taylor <[email protected]> (cherry picked from commit 84266e1) Reviewed-on: https://go-review.googlesource.com/c/go/+/604196
It appears that some builders (notably, linux-arm) have some additional security software installed, which apparently reads the files created by tests. As a result, test file atime is changed, making the test fail like these: === RUN TestChtimesOmit ... os_test.go:1475: atime mismatch, got: "2024-07-30 18:42:03.450932494 +0000 UTC", want: "2024-07-30 18:42:02.450932494 +0000 UTC" === RUN TestChtimes ... os_test.go:1539: AccessTime didn't go backwards; was=2024-07-31 20:45:53.390326147 +0000 UTC, after=2024-07-31 20:45:53.394326118 +0000 UTC According to inode(7), atime is changed when more than 0 bytes are read from the file. So, one possible solution to these flakes is to make the test files empty, so no one can read more than 0 bytes from them. For #68687 For #68663 Fixes #68811 Change-Id: Ib9234567883ef7b16ff8811e3360cd26c2d6bdab Reviewed-on: https://go-review.googlesource.com/c/go/+/604315 LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Kirill Kolyshkin <[email protected]> Reviewed-by: Robert Griesemer <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]> Commit-Queue: Ian Lance Taylor <[email protected]> Auto-Submit: Ian Lance Taylor <[email protected]> (cherry picked from commit 84266e1) Reviewed-on: https://go-review.googlesource.com/c/go/+/605375 Reviewed-by: Carlos Amedee <[email protected]>
Issue created automatically to collect these failures.
Example (log):
— watchflakes
The text was updated successfully, but these errors were encountered: