New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 633309 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Last visit 15 days ago
Closed: May 2018
Cc:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 1
Type: Bug



Sign in to add a comment

Linux release build crashes during startup tracing

Project Member Reported by dskiba@chromium.org, Aug 1 2016

Issue description

Linux release build crashes when heap profiling + native stack traces used together with startup tracing.


 
When startup tracing is enabled heap profiler is activated earlier and captures way more allocations.

I added logging in AllocationRegister and got the following:

Without startup tracing at 15th second browser process had 11256 backtraces and 42697 allocations. Heap profiler captured 7 MiB in 52K allocations.

With startup tracing at 15th second browser process had 34535 backtraces and 121419 allocations. Heap profiler captured 17 MiB in 125K allocations.


Note that to get data for startup tracing I had to increase backtrace hash map capacity from 32K to 64K. This is OK short-term fix for Linux where we have lot's of memory, but in the long term we need to allocate memory in chunks, because generally ~30% or less of 32K is used. For example the renderer process has several AllocationRegisters:

143236: AllocationRegister(0x7f8e9f8c1070): 425465 allocations, 11495 backtraces.
143236: AllocationRegister(0x7f8e9f8c1310): 94686 allocations, 2760 backtraces.
143236: AllocationRegister(0x7f8e9f8c12a0): 202372 allocations, 2853 backtraces.

Each AllocationRegister allocated space for 1.5M allocations and 32K backtraces, and we're using 30% at most.
linux-trace.json.gz
2.5 MB Download
linux-trace-startup.json.gz
621 KB Download
Android however is not affected by this issue:

Startup tracing: 16545 backtraces / 39907 allocations

NO startup tracing: 5294 backtraces / 8411 allocations

I.e. even with startup tracing we're using ~60% of backtrace capacity.
Even with increased AllocationRegister backtrace capacity we still crash 50% of the time when specifying both startup tracing and url to open from the command line, see  crbug.com/617730#c1 
Project Member

Comment 4 by bugdroid1@chromium.org, Aug 5 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ece847f3cd16baa05a9b896ba7ae58b23540a178

commit ece847f3cd16baa05a9b896ba7ae58b23540a178
Author: dskiba <dskiba@google.com>
Date: Fri Aug 05 22:50:40 2016

[tracing] Increase backtrace map capacity on Linux.

On Linux when startup tracing is used with native heap profiling, ~45K
unique backtraces are generated, while backtrace map only allows for 32K.
This CL bumps the max number of unique backtraces.

BUG= 633309 

Review-Url: https://codereview.chromium.org/2204743003
Cr-Commit-Position: refs/heads/master@{#410203}

[modify] https://crrev.com/ece847f3cd16baa05a9b896ba7ae58b23540a178/base/trace_event/heap_profiler_allocation_register.h

Comment 5 by dskiba@chromium.org, May 18 2018

Status: Fixed (was: Started)

Sign in to add a comment