Closed
Bug 1142412
Opened 9 years ago
Closed 9 years ago
<jemalloc>: Error in VirtualFree(): Attempt to access invalid address
Categories
(Core :: Memory Allocator, defect)
Tracking
()
RESOLVED
FIXED
mozilla43
Tracking | Status | |
---|---|---|
firefox43 | --- | fixed |
People
(Reporter: glandium, Assigned: glandium)
References
Details
Attachments
(3 files, 1 obsolete file)
1010.30 KB,
patch
|
n.nethercote
:
review+
|
Details | Diff | Splinter Review |
28.86 KB,
patch
|
n.nethercote
:
review+
|
Details | Diff | Splinter Review |
10.87 KB,
patch
|
mshal
:
review+
|
Details | Diff | Splinter Review |
The error comes from: https://dxr.mozilla.org/mozilla-central/source/memory/jemalloc/src/src/chunk_mmap.c#73 It is due to a code path that tries to unmap trailing pages when shrinking huge allocations. That is: foo = malloc(16 * 1024 * 1024); foo = realloc(foo, 10 * 1024 * 1024); makes jemalloc want to pages_unmap the last 6MB of the allocation, but that's not possible on Windows, and that's what the error message is about. On jemalloc with --enable-debug, this also abort()s, so this turns several tests orange with the patch from bug 1142403 applied. It is worth noting, though, that if foo is further free()ed, the entire 16MB are correctly unmapped. That still wastes address space if we hold on to foo.
Comment 1•9 years ago
|
||
Looks like we're waiting for an upstream fix: https://github.com/jemalloc/jemalloc/issues/213
Assignee | ||
Comment 2•9 years ago
|
||
For patch readability, this doesn't actually include the jemalloc update, which will be in a separate patch.
Assignee: nobody → mh+mozilla
Attachment #8646769 -
Flags: review?(n.nethercote)
Assignee | ||
Comment 3•9 years ago
|
||
Attachment #8646770 -
Flags: review?(n.nethercote)
Assignee | ||
Comment 4•9 years ago
|
||
Updated configure.in to actually work properly. Turns out tast minute fixups don't always work.
Attachment #8646769 -
Attachment is obsolete: true
Attachment #8646769 -
Flags: review?(n.nethercote)
Attachment #8646853 -
Flags: review?(n.nethercote)
Comment 5•9 years ago
|
||
Comment on attachment 8646853 [details] [diff] [review] Update memory/jemalloc to current dev tip (1f27abc) Review of attachment 8646853 [details] [diff] [review]: ----------------------------------------------------------------- rs=me
Attachment #8646853 -
Flags: review?(n.nethercote) → review+
Comment 6•9 years ago
|
||
Comment on attachment 8646770 [details] [diff] [review] Apply update.sh Review of attachment 8646770 [details] [diff] [review]: ----------------------------------------------------------------- rs=me
Attachment #8646770 -
Flags: review?(n.nethercote) → review+
Assignee | ||
Comment 7•9 years ago
|
||
Attachment #8647264 -
Flags: review?(mshal)
Comment 8•9 years ago
|
||
Comment on attachment 8647264 [details] [diff] [review] Remove last jemalloc patch by using a workaround when running its configure Review of attachment 8647264 [details] [diff] [review]: ----------------------------------------------------------------- ::: configure.in @@ +9205,5 @@ > if ! test -e memory/jemalloc; then > mkdir -p memory/jemalloc > fi > > + (PATH="$srcdir/memory/jemalloc/helper:$PATH"; A comment here pointing to the comment in memory/jemalloc/helper/git would be helpful. I had no idea what this was for until I read that comment.
Comment 9•9 years ago
|
||
The only downside of this is that next time someone has to introduce a local patch, they won't have an existing one to cargo-cult from :)
Comment 10•9 years ago
|
||
Comment on attachment 8647264 [details] [diff] [review] Remove last jemalloc patch by using a workaround when running its configure Looks good, though I agree with #c8 that a comment about why the PATH change is there would be helpful.
Attachment #8647264 -
Flags: review?(mshal) → review+
Comment 11•9 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/c94b259b603e https://hg.mozilla.org/integration/mozilla-inbound/rev/def7cf4cfbcc
Comment 12•9 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/c94b259b603e https://hg.mozilla.org/mozilla-central/rev/def7cf4cfbcc
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox43:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla43
Comment 13•9 years ago
|
||
(In reply to Eric Rahm [:erahm] from comment #1) > Looks like we're waiting for an upstream fix: > https://github.com/jemalloc/jemalloc/issues/213 just curious, this is fixed in v4.0.0 upstream, so we are going to have jemalloc3 or jemalloc4?
Assignee | ||
Comment 14•9 years ago
|
||
(In reply to marvinhk from comment #13) > (In reply to Eric Rahm [:erahm] from comment #1) > > Looks like we're waiting for an upstream fix: > > https://github.com/jemalloc/jemalloc/issues/213 > > just curious, this is fixed in v4.0.0 upstream, so we are going to have > jemalloc3 or jemalloc4? What landed is jemalloc 4.
You need to log in
before you can comment on or make changes to this bug.
Description
•