-
-
Notifications
You must be signed in to change notification settings - Fork 5.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
Allocating ridiculous amounts of memory hangs in GC #51242
Comments
I believe the issue is that we don't check if we actually got an allocation or not before increasing the counters, and the GC will then think it has a massive amount of memory allocated and will run very often. Though i'm not sure what can we do here, because a null check might not be good enough because the OS might give us a pointer and then segfault later. |
Could you elaborate? We should at least handle the NULL case. |
The problem is that the OS might not actually give us the pages until we touch them so it's possible for the maloc to succeed but for us to get a segfault once we actually try to fill it with data. |
I know how memory overcommit works, but I haven't seen it segfault, only OOM kills. In any case, this doesn't matter here, as |
I guess it won't segfault, but it will fail. In any case I have a PR that at least checks null l. |
Interrupting the process shows that it seems to be stuck doing GC, which doesn't make sense here. Maybe an issue with the GC counters?
There also seems to be a difference between doing this from the REPL, and via
--eval
:Bisected to 8cfb350 on the backports branch, so #50682 is probably the culprit.
The text was updated successfully, but these errors were encountered: