cmd/go: TestScript/get_brace: path "$WORK/tmp/ssh-wwIxCtBYvdEE/agent.13077" too long for Unix domain socket #43635
Comments
Couldn't reproduce on darwin/arm64 or amd64. It doesn't look like it's happening in CI either. But the cause seems straightforward, and we could shorten the cc @matloob |
Have you tried it on MacOS directly? Did. you examine what your TMPDIR variable was set to? MacOS sets this variable apparently as part of its login process. I have verified this with a new account on MacOS. This is not new in MacOS 11, this also gets set on MacOS 10.15 (I checked) and as far back as I remember. I assume it will be reproducible on Intel Macs as well. This issue is new for Go, however. I built a Go toolchain when I first got my Mac mini and did not have this issue. Note that the Go appended part is within 14 bytes of being too long itself. Setting TMPDIR to /tmp is a good initial fix but eventually it should be looked into if you really need 3 additional levels of tmp directories or not. Anyhow, thank you for looking into it and that you will take action so I don't have to remember to set it each time :-) |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Pulled latest version of go and built using
./all.bash
on an Apple Silicon Mac miniWhat did you expect to see?
What did you see instead?
The path being used is 138 bytes long:
From the UNIX(4) manual page on MacOS says:
UNIX-domain addresses are variable-length filesystem pathnames of at most 104 characters.
On Linux the same manual page says:
The sun_family field always contains AF_UNIX. On Linux sun_path is 108 bytes in size; see also NOTES, below.
The value of TMPDIR is
/var/folders/nv/mw87lzt57nbbmpnpv5rvchj40000gn/T
. The part that Go is adding is 90 bytes long.Building using the following:
Does work.
This test's multiple levels of unique temporary directories seems a bit excessive.
The text was updated successfully, but these errors were encountered: