-
Notifications
You must be signed in to change notification settings - Fork 18k
runtime: fatal error: sweep increased allocation count #15762
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
/cc @aclements |
Looks like it's not related to race detector. Sorry for the noise, Dmitry. |
and the same crash: https://build.golang.org/log/a4d48c3831004aae0a064e53c67558d84864cd00 |
/cc @RLH |
Another appearance: https://build.golang.org/log/da60bdb4e8f5429bba33b4a6407b514ae8b31917
|
That last failure isn't obviously the same, though the first failure could indicate we're freeing objects we shouldn't be (if things go wrong, but not wrong enough for that check to catch), which could conceivably lead to just about anything. |
I can reproduce this on the linux-amd64-nocgo builder in a few minutes with the following:
Simply running the httplex test in a loop doesn't seem to do it. Also no luck yet reproducing on my linux/amd64 laptop (even with cgo disabled). |
This is happening because we're greying an unallocated object, so sweep sees an object that was marked by the last GC cycle but not before that and detects that the "allocated object" count has increased. The following is with a tweak to set the alloc bit on allocation and check it in greyobject:
It typically occurs with elemsize=128, but not always. I think when it doesn't occur with elemsize=128, it's occurring because the "base" object shown above is itself not allocated and we're finding that. |
This failure happens even in stop-the-world mode, which indicates that there's some root we're not finding on one GC cycle, but we then find the pointer on the next GC cycle (either because we do find the root then, or because the object has been made reachable some other way). In particular, in STW mode, it looks like the object we're missing is being found on the stack in the second cycle. One possible explanation could be that the liveness maps are wrong. If this is the case, this is probably the same bug as #15747 and may have been caused by 3572c64. |
This failure does not occur at 3572c64^, but does at 3572c64, and the hacky (and somewhat incorrect) workaround for #15747 works for this test case, too, so I'm declaring this a duplicate of #15747. We'll double check this test case once we have a fix for #15747 (the test case over there is apparently easier to reproduce). |
See https://build.golang.org/log/a4d48c3831004aae0a064e53c67558d84864cd00
The text was updated successfully, but these errors were encountered: