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

Issue 602089 link

Starred by 2 users

Issue metadata

Status: WontFix
Owner: ----
Closed: Apr 2016
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

about:tracing frequently crashes when taking memory-infra traces

Project Member Reported by jochen@chromium.org, Apr 10 2016

Issue description

when trying to take a trace with the memory-infra category, about:tracing frequently dies.

I'm not sure why this happens, I could imagine that we're trying to load too big strings (i.e. a huge JSON string). We had a similar problem with devtools when trying to take heap snapshots of big tabs (where the snapshot itself is a JSON string). To work around this, devtools parses the JSON in javascript while receiving the string from C++ one chunk at a time.

Another possibility could be that collecting the data from all tabs is just too much? Since I already know from the task manager which tab I'm interested in, just restricting the trace collection to that tab might already help.



 
Cc: petrcermak@chromium.org
There are a bunch of reasons for this, being worked on.
1) The traces are just too big (> 256M) and that hits some limit about string length in v8 (petrcermak has more context). I think this might also be related with https://bugs.chromium.org/p/v8/issues/detail?id=4786
2) The traces are big (but not too big to not get loaded) and trace viewer OOMs while processing all the data in it. The A.I. here is to simplify the traces. I suspect some probes are injecting too much data.

The long term plan for both cases is to move away from the JSON format. It is damn redundant.
We are discussing this with oysteine@ at the moment (One-pager doc https://docs.google.com/document/d/1EP9P2dm66V7SiNHWty_cIiyeq3ooKcpTRMgpztlRCCk/edit), might be some protobuf based solution or similar, and work through Q2. oysteine@ and I will send out a full doc out in the ML once we have a finalized design.

+petrcermak for more context. I thought we solved most of the outstanding OOM issues in traceviewer.

> Another possibility could be that collecting the data from all tabs is just too much?
Hmm that might break the current trace-viewer design, require new UI etc. Might be just easier make tracing scale by fixing all its dumbness.
primiano: The problem is not the size of the JSON itself, but the fact that there's no way to parse it in chunks. We have to load the whole JSON file into a single string, which at some point exceeds the maximum string length in v8 (268,435,440 characters ~ 256 MiB).

jochen: Could you please provide more details on when the failures happen (number of tabs, possibly which URLs, how long do you trace for, which categories are enabled)? When does chrome:tracing crash? If it's during import, what is the last message that you see on the import dialog before the crash?

Re #2: right, this is what we are going to fix with protobuf or whatever will come with tracing v2 as part of ChromeTap.


Labels: -OS-Mac
This bug is not Mac-specific, I think.

Comment 5 by jochen@chromium.org, Apr 14 2016

Since I filed this bug, I restarted my chrome, and now it no longer crashes when taking memory infra traces...

anyway, feel free to close, I'll reopen when this happens again.
did chrome://crashes record anything? I wonder at this point if this was really a OOM or some codebase related with tracing ending up in a weird state.
Status: WontFix (was: Unconfirmed)
There we go.
The key fix petrcermak did is https://codereview.chromium.org/1739663003 which solved a pretty endemic tracing problem.
That fix rolled in chrome in https://codereview.chromium.org/1737163002,
which in chrome releases appeared first in 50.0.2660.0.
From the crash report it seems you were running 50.0.2659.0, so I guess restarting chrome brought you past 50.0.2660.0 (you missed that by one day)

On an unrelated note, how can you be on 50.0.2660.0 ? The stable/beta channel is 50.0.2661 (which fortunately got petr's fix by one day).
You look like a dev/canary who doesn't restart chrome that often :P

At this point closing this as wont fix. The endemic bug was fixed, and a general tracing rearchitecture is going to come in Q2.

Sign in to add a comment