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

path/filepath: TestEvalSymlinksAboveRoot failures on macOS #37910

Open
bcmills opened this issue Mar 18, 2020 · 10 comments
Open

path/filepath: TestEvalSymlinksAboveRoot failures on macOS #37910

bcmills opened this issue Mar 18, 2020 · 10 comments
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. OS-Darwin
Milestone

Comments

@bcmills
Copy link
Contributor

bcmills commented Mar 18, 2020

2020-03-17T20:48:23-0eeec4f/darwin-amd64-race

--- FAIL: TestEvalSymlinksAboveRoot (0.01s)
    path_test.go:1449: EvalSymlinks("/private/var/folders/kh/5zzynz152r94t18yzstnrwx80000gn/T/workdir-host-darwin-10_15/tmp/TestEvalSymlinksAboveRoot800207813/../../../../../../../../../private/var/folders/kh/5zzynz152r94t18yzstnrwx80000gn/T/workdir-host-darwin-10_15/tmp/TestEvalSymlinksAboveRoot800207813/b/file") = "/private/var/folders/kh/5zzynz152r94t18yzstnrwx80000gn/T/workdir-host-darwin-10_15/tmp/TestEvalSymlinksAboveRoot800207813/a/file"
    path_test.go:1449: EvalSymlinks("/private/var/folders/kh/5zzynz152r94t18yzstnrwx80000gn/T/workdir-host-darwin-10_15/tmp/TestEvalSymlinksAboveRoot800207813/../../../../../../../../../../private/var/folders/kh/5zzynz152r94t18yzstnrwx80000gn/T/workdir-host-darwin-10_15/tmp/TestEvalSymlinksAboveRoot800207813/b/file") = "/private/var/folders/kh/5zzynz152r94t18yzstnrwx80000gn/T/workdir-host-darwin-10_15/tmp/TestEvalSymlinksAboveRoot800207813/a/file"
    path_test.go:1445: EvalSymlinks("/private/var/folders/kh/5zzynz152r94t18yzstnrwx80000gn/T/workdir-host-darwin-10_15/tmp/TestEvalSymlinksAboveRoot800207813/../../../../../../../../../../../private/var/folders/kh/5zzynz152r94t18yzstnrwx80000gn/T/workdir-host-darwin-10_15/tmp/TestEvalSymlinksAboveRoot800207813/b/file") failed: lstat /private/../../../private/var: no such file or directory
FAIL
FAIL	path/filepath	0.252s

See previously #35201.

@bcmills bcmills added OS-Darwin NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. labels Mar 18, 2020
@bcmills bcmills added this to the Backlog milestone Mar 18, 2020
@bcmills
Copy link
Contributor Author

bcmills commented Mar 18, 2020

Given the general flakiness of macOS filesystems, I wouldn't be surprised if this is due to a platform bug. (But I wouldn't be entirely surprised if it's a Go bug either.)

CC @ianlancetaylor @cagedmantis

@bcmills
Copy link
Contributor Author

bcmills commented Apr 22, 2020

@bcmills
Copy link
Contributor Author

bcmills commented Apr 30, 2020

@bcmills bcmills changed the title path/filepath: TestEvalSymlinksAboveRoot failure on darwin-amd64-race builder path/filepath: TestEvalSymlinksAboveRoot failures on darwin-amd64-race builder Apr 30, 2020
@bcmills bcmills changed the title path/filepath: TestEvalSymlinksAboveRoot failures on darwin-amd64-race builder path/filepath: TestEvalSymlinksAboveRoot failures on darwin-amd64 builders Nov 9, 2020
@dmitshur
Copy link
Contributor

I've run into this failure on darwin/arm64 as well, so it's not just darwin/amd64.

It seems to be quite easy to reproduce when the system is under load with:

$ go version
go version devel +7716a2fbb7 Sun Nov 22 11:44:49 2020 -0500 darwin/arm64  # CL 272258 PS 1
$ go test path/filepath -run=TestEvalSymlinksAboveRoot -count=1000
--- FAIL: TestEvalSymlinksAboveRoot (0.00s)
    path_test.go:1485: EvalSymlinks("/private/var/folders/_0/h0671fcn4rgb5pn9c745dx2h0000gn/T/TestEvalSymlinksAboveRoot880924197/../../../../../../../private/var/folders/_0/h0671fcn4rgb5pn9c745dx2h0000gn/T/TestEvalSymlinksAboveRoot880924197/b/file") = "/private/var/folders/_0/h0671fcn4rgb5pn9c745dx2h0000gn/T/TestEvalSymlinksAboveRoot880924197/a/file"
    path_test.go:1481: EvalSymlinks("/private/var/folders/_0/h0671fcn4rgb5pn9c745dx2h0000gn/T/TestEvalSymlinksAboveRoot880924197/../../../../../../../../private/var/folders/_0/h0671fcn4rgb5pn9c745dx2h0000gn/T/TestEvalSymlinksAboveRoot880924197/b/file") failed: lstat /private/../../private/var/folders/_0/h0671fcn4rgb5pn9c745dx2h0000gn/T: no such file or directory
    path_test.go:1481: EvalSymlinks("/private/var/folders/_0/h0671fcn4rgb5pn9c745dx2h0000gn/T/TestEvalSymlinksAboveRoot880924197/../../../../../../../../../private/var/folders/_0/h0671fcn4rgb5pn9c745dx2h0000gn/T/TestEvalSymlinksAboveRoot880924197/b/file") failed: lstat /private/../../../private: no such file or directory
FAIL
FAIL	path/filepath	2.797s
FAIL

But hard to reproduce when the system isn't under load.

@dmitshur dmitshur changed the title path/filepath: TestEvalSymlinksAboveRoot failures on darwin-amd64 builders path/filepath: TestEvalSymlinksAboveRoot failures on macOS Nov 23, 2020
@gopherbot
Copy link

Change https://golang.org/cl/332009 mentions this issue: path/filepath: deflake TestEvalSymlinksAboveRoot on darwin

gopherbot pushed a commit that referenced this issue Jun 30, 2021
On darwin, under load, it appears that the system occasionally
deletes the temp dir mid-test. Don't fail the test when that happens.

It would be nice to fix this in a deeper way.
See golang.org/cl/332009 for some discussion.

In the meantime, this will at least stop the flakiness.

Updates #37910

Change-Id: I6669e466fed9abda4a87ca88345c04cd7986b41e
Reviewed-on: https://go-review.googlesource.com/c/go/+/332009
Trust: Josh Bleecher Snyder <josharian@gmail.com>
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
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. OS-Darwin
Projects
None yet
Development

No branches or pull requests

3 participants