-
Notifications
You must be signed in to change notification settings - Fork 18k
runtime: VirtualFree of 0 bytes failed with errno=487 (ERROR_INVALID_ADDRESS) #35465
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
The 0 bytes thing is a red herring, the code tries to decommit successively smaller chunks because of how windows mapping works. It's almost certainly related to my code somehow, and maybe related to #35445. |
On second thought... probably not related to #35445. The page size on 386 is 4 KiB. |
@heschik have you been seeing this often? Do you have more examples? I've been unable to reproduce thus far, and also I don't see it happening at all in CI which leads me to believe it's fairly rare. I have one suspicion: the background scavenger is scavenging unreserved memory. The evidence here is that:
There is a check that guards against this though, so if this is indeed the case, that must be erroneously passing. But if that check is erroneously passing, then it's possible to allocate into unmapped memory, which is not a failure mode I've seen yet (though certainly possible). |
It happens frequently on the x/tools builders: edit: looking more closely, https://build.golang.org/log/3738682eca81e0e3ff0a89a72c74c27158fe78d0 is a different crash in the same place. Suspicious? |
Ah, excellent. Thank you @heschik. This supports my hypothesis, though it's curious that it's the same test every time. It's probably just quite good at tickling some edge case. I was able to reproduce once in a gomote (unfortunately it dumped the output into my terminal window and I lost all the useful info) but it's timing out now. Now that I can reproduce though it should be easier to get to the bottom of this. |
I think I found the problem. Will push a fix in a bit. |
Change https://golang.org/cl/206978 mentions this issue: |
@heschik confirmed this fixes the problem in the x/tools test (10 consecutive runs and no failure; the tests in that package take a while to run). It's a bit wild to me how consistently that test was able to trigger this, but it was nice to have a consistent reproducer. :) |
Funny looking trybot failure on 32-bit Windows: https://storage.googleapis.com/go-build-log/0c8f6cc0/windows-386-2008_c0fd3e00.log
cc @mknyszek maybe?
The text was updated successfully, but these errors were encountered: