-
Notifications
You must be signed in to change notification settings - Fork 18k
runtime: TestArenaCollision flaky on windows-amd64-race builder #25698
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
Comments
@bcmills I suspect these will be fixed once we update windows race syso files. @dvyukov tried to update windows race syso file (see https://go-review.googlesource.com/c/build/+/101137 ), but I don't think you need CL 101137 changes - you just need your gcc bin directory listed in your PATH. Let me know, if you want me to try and build windows race syso file here. But I agree, that race build is broken at this moment, so this issue needs to be fixed before go1.11 is released. Alex |
The syso files were updated in https://golang.org/cl/112896. I had to run the Windows build several times due to test flakes, and I'm pretty sure |
Good to know.
I cannot help you much with this. I suppose you need to look at the source of ThreadSanitizer. Just quick look at the stack trace
My guess is that "error code: 87" is for ERROR_INVALID_PARAMETER (see https://msdn.microsoft.com/en-us/library/windows/desktop/ms681382(v=vs.85).aspx ). And "failed to allocate" is probably because some of WIndows memory allocation APIs was called with wrong parameters (therefore ERROR_INVALID_PARAMETER). But you would have to reproduce this to be sure. Alex |
Change https://golang.org/cl/123175 mentions this issue: |
Looking over the failures, they all have the same address, size, and error:
This message is printed by MmapFixedNoReserve and indicates an But what strikes me as more weird is that these fixed addresses aren't in the tsan runtime's memory map, which ends at 0x07d000000000. The region just before this is "metainfo" aka "MetaShadow". If we assume it's trying to map the MetaShadow and back out the corresponding heap mapping, we get 0x020000000000 and 0x028000000000, which are both well outside where we'd expect to see the Go heap mapped. @dvyukov, any thoughts on this? There's also the question of why this failure leads to split stack overflow. There I have a hunch: |
I was able to reproduce this quickly, though only once in 350 runs with: VM=$(gomote create windows-amd64-race) && gomote push $VM && gomote run $VM go/src/make.bat && gomote run $VM go/bin/go test -c runtime -race
stress -p 1 gomote run $VM go/bin/runtime.test.exe -test.run TestArenaCollision |
Oh. The "ThreadSanitizer failed to allocate" always happens. It's just that most of the time it doesn't seem to matter, and sometimes we crash hard after that. E.g., here's a "successful" run (with a little extra debugging):
In contrast, a "failed" run:
|
I think I understand. If we go past even the first hint, we're already outside of TSAN's accepted heap space. The second hint is 0x01c000000000, which is outside TSAN's heap [0x00c000000000, 0x00e000000000). I'm not sure how we wound up at 0x080000000000, since you'd expect this to correspond to a MapShadow of (0x1c000000000 - 0xc000000000) // 8 * 4 + 0x076000000000 => 0x07e000000000. I remember when I wrote this code I was thinking the hints were at 0x00cX00000000, not 0x0Xc000000000. We could just do that for race mode. Arguably this has always been wrong for race mode, since |
Change https://golang.org/cl/123740 mentions this issue: |
Change https://golang.org/cl/123780 mentions this issue: |
Possibly related to #24133.
Examples:
https://build.golang.org/log/6d737e6c59f640a2f98ccb898b598d34a898d1d6
https://build.golang.org/log/9b656635a90cc9112f7c2c136d35bc8116af26c3
Detail:
The text was updated successfully, but these errors were encountered: