-
Notifications
You must be signed in to change notification settings - Fork 408
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
Infinite loop when trying to allocate large object (v8.2.8) #691
Comments
Although I don't think it is fixed, please recheck it on release-8_2 branch. If reproducible, then I think it exists on master as well (but not possible to reproduce on master as the alloc logic has been changed significantly). |
I still haven't been able to reproduce using the I'm trying the |
I reproduced twice with the I still can't reproduce with the |
No need to reproduce on master, release-8_2 branch is OK. It is better to spend efforts to figure out how to fix it. (Maybe will look at it this week, but I am not sure.) |
Looks like the scenario that breaks the heuristic. (master branch has a bit different heuristic and thus you can't reproduce it with the given scenario) |
I regularly reproduce an issue with v8.2: when trying to allocate a large object, the following loop repeats infinitely:
bdwgc/malloc.c
Lines 66 to 69 in e7f6ef3
strace
repeatedly prints the following:Here's a backtrace from a
gdb
session:Trying to step in
gdb
:GC_collect_or_expand
never tries to collect and keeps expanding the memory;GC_expand_hp_inner(blocks_to_get)
always returns TRUE;GC_allochblk
andGC_allochblk_nth
keep returning0
(note thatsplit_limit
andstart_list
are both set to60
).Environment information:
Linux 6.9 / glibc 2.35 / Pop OS (Ubuntu 22.04)
BDWGC 8.2.8 compiled as a static lib and otherwise using configuration defaults (mmap, munmap, disclaim, parallel mark, etc). So far I haven't been able to reproduce with the current
master
branch (but no guarantee).It started happening in a branch of the crystal language related to multi-threading. It doesn't change anything to GC or memory allocation in general or even threads: I reproduce while running the std test suite in a single thread, and it happens with no other threads (except for the waiting GC threads).I just reproduced on the master branch of Crystal.The text was updated successfully, but these errors were encountered: