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

Issue 903449 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Closed: Dec 3
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Bug

Blocked on:
issue 903204
issue 906540



Sign in to add a comment

Perfetto: Occasional missing threadnames in traces

Project Member Reported by oysteine@chromium.org, Nov 8

Issue description

Examples:

https://bugs.chromium.org/p/chromium/issues/detail?id=900927

The symptom is that some metrics for some benchmarks will occasionally flake down to 0, as the metric is looking for trace events from specific named tracks in the trace and can't find them (the trace will only list TIDs, not names, for some of the threads).

Example trace: https://console.developers.google.com/m/cloudstorage/b/chrome-telemetry-output/o/balls_svg_animations_2018-11-03_07-56-36_46552.html
 
Looks like thread names and process labels are added when the trace is stopped [1]. Maybe we're missing a final flush, or some such.

[1] https://cs.chromium.org/chromium/src/base/trace_event/trace_log.cc?type=cs&g=0&l=1576
Status: Available (was: Untriaged)
Owner: eseckler@chromium.org
Status: Assigned (was: Available)
Project Member

Comment 4 by bugdroid1@chromium.org, Nov 16

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

commit c69179d52b614df11977d8481b4045fee62f4644
Author: Eric Seckler <eseckler@chromium.org>
Date: Fri Nov 16 22:02:43 2018

perfetto: Stop tracing on threads more reliably

Moves resetting of TraceEventDataSource fields before flushing threads.
This way, the thread's flush no longer races with the field resets.

(If flushing occurs before the field resets, another thread may
theoretically recreate its ThreadLocalEventSink before the resets, too.)

Also flush the disabling thread in the same task, as a future task may
be executed on a different worker thread.

Bug:  903449 
Change-Id: I13eb0d0a330ec66ffd826791f842c6fa7f8bd717
Reviewed-on: https://chromium-review.googlesource.com/c/1340325
Commit-Queue: oysteine <oysteine@chromium.org>
Reviewed-by: oysteine <oysteine@chromium.org>
Cr-Commit-Position: refs/heads/master@{#608972}
[modify] https://crrev.com/c69179d52b614df11977d8481b4045fee62f4644/services/tracing/public/cpp/perfetto/trace_event_data_source.cc

Blockedon: 903204
Given  crbug.com/907067  and  crbug.com/907069 , I'm now pretty convinced that flush on worker threads is currently necessary - and that the above patch should fix the missing thread names issue.

There's no way to verify this right now though, because the android webview bots that we saw the issue on most often are currently inactive / failing, see crbug.com/903204
Blockedon: 906540
Cc: lwsong@google.com sadrul@chromium.org
It sounds like this is still happening for rendering.desktop benchmark when running locally. Is there some way to debug/diagnose the issue?
Cc: vmi...@chromium.org
Everything is back to normal now so I think this bug is fixed. Thanks!
The missing thread names issue should be resolved (thought I'm still waiting for new benchmark results to verify), but events from some worker threads may be still be missing, see  issue 907067 . 
Status: Verified (was: Assigned)
Looks like one of the very flaky graphs has returned and was stable over the weekend.

Sign in to add a comment