assert failed when destory an arena that has a slab in slabs_nonfull
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 11.2k
- Forks
- 1.6k
- Avg merge
- 4d 8h
- Merged PRs (30d)
- 13
Description
In ctl_arena_stats_sdmerge , this assert checks that all bins which is in a destoryed arena must
satisfy bin.nonfull_slabs==0 .
https://github.com/jemalloc/jemalloc/blob/4f8efba8248aaafa2200e3538bae126729e0407d/src/ctl.c#L957
However the arena_bin_reset doesn't set nonfull_slabs to zero.
https://github.com/jemalloc/jemalloc/blob/4f8efba8248aaafa2200e3538bae126729e0407d/src/arena.c#L610
Then we will meet a assert failure when we destory an arena that slabs_nonfull!=0 (has a slab in slabs_nonfull).
POC: https://github.com/wangxiyu191/jemalloc/commit/c07909813f412ee71b5e72e0eae8dcf9b4de708e
Possible fix: https://github.com/wangxiyu191/jemalloc/commit/888281462d23887905343d02f4379238516eb25a
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at ctl_arena_stats_sdmerge in src/ctl.c around line 957 and arena_bin_reset in src/arena.c around line 610; compare the assertion with the reset behavior and review the linked POC and possible-fix commits. Done means destroying an arena containing a slab in slabs_nonfull no longer triggers the assertion.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100