Closed Bug 909206 Opened 11 years ago Closed 9 years ago

jemalloc.c:6769: Failed assertion: "stats->mapped >= stats->allocated + stats->waste + stats->page_cache + stats->bookkeeping

Categories

(Core :: Memory Allocator, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: n.nethercote, Unassigned)

References

Details

jemalloc.c:6769: Failed assertion: "stats->mapped >= stats->allocated + stats->waste + stats->page_cache + stats->bookkeeping"
Hit MOZ_CRASH() at /home/njn/moz/mi1/memory/build/jemalloc_config.c:33
I'm hitting this in a local build every time I hit "Measure" in about:memory.

Here are the numbers from one run.

(gdb) p *stats
$1 = {opt_abort = 1 '\001', opt_junk = 1 '\001', opt_utrace = 0 '\000', 
  opt_sysv = 0 '\000', opt_xmalloc = 0 '\000', opt_zero = 0 '\000', 
  narenas = 1, balance_threshold = 18446744073709551615, quantum = 16, 
  small_max = 512, large_max = 1040384, chunksize = 1048576, dirty_max = 1024, 
  mapped = 56623104, allocated = 52504864, waste = 2909920, 
  page_cache = 1478656, bookkeeping = 4096}
(gdb) p stats->mapped
$2 = 56623104
(gdb) p stats->allocated + stats->waste + stats->page_cache + stats->bookkeeping
$3 = 56897536
Blocks: 903420
> I'm hitting this in a local build every time I hit "Measure" in about:memory.

Just to clarify... I'm not getting this on a trunk build.  But I'm working on a patch that removes nsIMemoryReporter and I'm getting it consistently there.  I haven't changed the innards of HeapAllocatedReporter.  However, it's pretty likely that the memory reporters are running in a substantially different order than they were previously.  In particular, the HeapAllocatedReporter may well be getting called much later than it previously was.
This could be because of bug 908971.
That's in jemalloc_print_stats, which isn't the same as jemalloc_stats_impl.
Haven't seen this for a long time.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.