-
Notifications
You must be signed in to change notification settings - Fork 17.5k
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
runtime/race: race detector truncates command-line arguments on ppc64le #43883
Comments
Change https://golang.org/cl/286173 mentions this issue: |
The race detector on ppc64le corrupts command-line arguments lists if they contain an empty string, and cmd/go often generates compiler argument lists containing `-D ""`. Since this is equivalent to not specifying the `-D` flag at all, just do that. This allows using a race-detector-enabled cmd/compile on ppc64le. Updates #43883. Change-Id: Ifac5cd9a44932129438b9b0b3ecc6101ad3716b2 Reviewed-on: https://go-review.googlesource.com/c/go/+/286173 Trust: Matthew Dempsky <mdempsky@google.com> Run-TryBot: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Bryan C. Mills <bcmills@google.com> Reviewed-by: Jay Conrod <jayconrod@google.com> TryBot-Result: Go Bot <gobot@golang.org>
Just a guess: on some architectures, TSAN may re-exec the program (e.g. with ASLR disabled because it wants a specific memory layout). That re-exec might eat args. Maybe you could strace it to see if it re-exec? What is the output of |
That does seem like the culprit:
|
It's probably ASLR. Maybe you could try disable ASLR? It is probably a bug in the re-exec code in TSAN. |
Yeah, looks like it's from TSAN working around ASLR:
|
When the program below is run with the race detector enabled, it truncates the command-line arguments list at the
""
argument. In particular, this prevents using a race-detector-enabled cmd/compile on ppc64le, because cmd/go typically passes-D ""
.I only see this on linux/ppc64le. I'm not able to reproduce the issue on linux/amd64.
/cc @dvyukov
The text was updated successfully, but these errors were encountered: