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

Issue 756093 link

Starred by 1 user

Issue metadata

Status: Untriaged
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows , Mac
Pri: 3
Type: Bug



Sign in to add a comment

chrome:tracing allows users to record traces that are larger than trace viewer can handle

Project Member Reported by borisv@chromium.org, Aug 16 2017

Issue description

Chrome Version: (copy from chrome://version)
OS: (e.g. Win7, OSX 10.9.5, etc...)

What steps will reproduce the problem?
(1) Open tabs that use heavy CPU. For the current Canary, this is such one: https://au.answers.yahoo.com/question/index?qid=20160712231251AA4wGqI
(2) In another tab go to chrome://tracing
(3) Record a trace for "Java script and Rendering", enabling:
   - "Record as much as possible
   - System tracing
   - State sampling
(4) Record for ~30 seconds.

What is the expected result?
Trace working and UI displayed with the results

What happens instead?

Error message:

While importing:
RangeError: Invalid typed array length: 4556551394
    at typedArrayConstructByLength (<anonymous>)
    at new Uint8Array (native)
    at Object.flattenChunks (chrome://tracing/tracing.js:4452:35983)
    at m.onEnd (chrome://tracing/tracing.js:4452:35018)
    at m.push (chrome://tracing/tracing.js:4452:34822)
    at d (chrome://tracing/tracing.js:4452:33121)
    at Object.e [as inflateRaw] (chrome://tracing/tracing.js:4452:33206)
    at Object.c.uncompress (chrome://tracing/tracing.js:4452:7103)
    at Function.GzipImporter.inflateGzipData_ (chrome://tracing/tracing.js:4464:159)
    at GzipImporter.extractSubtraces (chrome://tracing/tracing.js:4469:262)

Please use labels and text to provide additional information.


For graphics-related bugs, please copy/paste the contents of the about:gpu
page at the end of this report.

 
Cc: primiano@chromium.org erikc...@chromium.org hjd@chromium.org ssid@chromium.org
Components: Platform>DevTools>Performance>Tracing
Labels: OS-Mac OS-Windows
Owner: ----

Comment 2 by borisv@chromium.org, Aug 16 2017

This happens on
macOS 10.12.6
Chrome Canary: 62.0.3187.0
Cc: charliea@chromium.org
+Charlie, this sounds suspiciously similar to  Issue 756003 

Comment 4 by l...@chromium.org, Aug 16 2017

Components: Speed>Tracing

Comment 5 by l...@chromium.org, Aug 17 2017

Components: -Platform>DevTools>Performance>Tracing
Removing DevTools, since it appears this is just in chrome://tracing
I think the main problem here is that chrome:tracing shouldn't allow you to collect a trace that's larger than what chrome:tracing can handle. 30s is a long time to collect a trace for when the CPU's being used heavily, but we're hoping to address use cases like that with Tracingv2, which would move tracing from being JSON-backed to protobuf-backed. 

I'd expect the behavior to be that we just only show the last X seconds of the trace, though - not that we just fail completely.
Summary: chrome:tracing allows users to record traces that are larger than trace viewer can handle (was: Chrome tracing is failing)
(Note that the trace recorded was 4.5GB, which is significantly larger than trace viewer can handle.)

Comment 8 by borisv@chromium.org, Aug 18 2017

If the trace data is too big, we should just up front fail and ask the user to collect a smaller sample. 
I think my ideal fix would be that we:

1) Record in a ring buffer that has a size limited by the length of trace that trace viewer can successfully open
1) Have a way that devtools can signal to Telemetry that the trace buffer overran. When this happens, then Telemetry can fail, but do so after uploading the incomplete trace. This will at least provide sheriffs with a trace that they can open and use trace viewer's built-in tools to investigate what's bloating the trace size.
Project Member

Comment 10 by bugdroid1@chromium.org, Nov 16 2017

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

commit 9ab2fe129db28836a96a964e585f501bd9fb69a0
Author: Victor Costan <pwnall@chromium.org>
Date: Thu Nov 16 20:53:37 2017

Replace cookie lines with net::CanonicalCookie in some APIs.

This CL replaces the std::string ("Set-Cookie:" HTTP header line)
argument to ContentBrowserClient::AllowSetCookie with a
net::CanonicalCookie and propagates the change throghout the codebase.
This is a prerequisite for using ContentBrowserClient::AllowSetCookie in
RestrictedCookieManagerImpl, which does not use HTTP header strings.

This CL stops propagating the change at
ChromeNetworkDelegate::OnCanSetCookie(). That will be done in a
follow-up CL, because it's expected to generate a non-trivial number of
changes, all isolated to //net.

RestrictedCookieManagerImpl is a part of the upcoming Network Service,
and is used by the Async Cookies API implementation.

Bug: 756093
Cq-Include-Trybots: master.tryserver.chromium.android:android_cronet_tester;master.tryserver.chromium.linux:linux_site_isolation;master.tryserver.chromium.mac:ios-simulator-cronet
Change-Id: I20eb818515dbec4dfb527ce90be52b61b0a2b739
Reviewed-on: https://chromium-review.googlesource.com/771510
Reviewed-by: Alex Clarke <alexclarke@chromium.org>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Reviewed-by: Bo <boliu@chromium.org>
Reviewed-by: Randy Smith <rdsmith@chromium.org>
Commit-Queue: Victor Costan <pwnall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#517179}
[modify] https://crrev.com/9ab2fe129db28836a96a964e585f501bd9fb69a0/android_webview/browser/aw_content_browser_client.cc
[modify] https://crrev.com/9ab2fe129db28836a96a964e585f501bd9fb69a0/android_webview/browser/aw_content_browser_client.h
[modify] https://crrev.com/9ab2fe129db28836a96a964e585f501bd9fb69a0/android_webview/browser/aw_cookie_access_policy.cc
[modify] https://crrev.com/9ab2fe129db28836a96a964e585f501bd9fb69a0/android_webview/browser/aw_cookie_access_policy.h
[modify] https://crrev.com/9ab2fe129db28836a96a964e585f501bd9fb69a0/chrome/browser/browsing_data/browsing_data_cookie_helper.cc
[modify] https://crrev.com/9ab2fe129db28836a96a964e585f501bd9fb69a0/chrome/browser/browsing_data/browsing_data_cookie_helper.h
[modify] https://crrev.com/9ab2fe129db28836a96a964e585f501bd9fb69a0/chrome/browser/browsing_data/browsing_data_cookie_helper_unittest.cc
[modify] https://crrev.com/9ab2fe129db28836a96a964e585f501bd9fb69a0/chrome/browser/chrome_content_browser_client.cc
[modify] https://crrev.com/9ab2fe129db28836a96a964e585f501bd9fb69a0/chrome/browser/chrome_content_browser_client.h
[modify] https://crrev.com/9ab2fe129db28836a96a964e585f501bd9fb69a0/chrome/browser/content_settings/tab_specific_content_settings.cc
[modify] https://crrev.com/9ab2fe129db28836a96a964e585f501bd9fb69a0/chrome/browser/content_settings/tab_specific_content_settings.h
[modify] https://crrev.com/9ab2fe129db28836a96a964e585f501bd9fb69a0/chrome/browser/content_settings/tab_specific_content_settings_unittest.cc
[modify] https://crrev.com/9ab2fe129db28836a96a964e585f501bd9fb69a0/chrome/browser/net/chrome_network_delegate.cc
[modify] https://crrev.com/9ab2fe129db28836a96a964e585f501bd9fb69a0/chrome/browser/ui/content_settings/content_setting_image_model_unittest.cc
[modify] https://crrev.com/9ab2fe129db28836a96a964e585f501bd9fb69a0/content/browser/frame_host/render_frame_message_filter.cc
[modify] https://crrev.com/9ab2fe129db28836a96a964e585f501bd9fb69a0/content/browser/frame_host/render_frame_message_filter.h
[modify] https://crrev.com/9ab2fe129db28836a96a964e585f501bd9fb69a0/content/public/browser/content_browser_client.cc
[modify] https://crrev.com/9ab2fe129db28836a96a964e585f501bd9fb69a0/content/public/browser/content_browser_client.h
[modify] https://crrev.com/9ab2fe129db28836a96a964e585f501bd9fb69a0/headless/lib/browser/headless_content_browser_client.cc
[modify] https://crrev.com/9ab2fe129db28836a96a964e585f501bd9fb69a0/headless/lib/browser/headless_content_browser_client.h
[modify] https://crrev.com/9ab2fe129db28836a96a964e585f501bd9fb69a0/net/cookies/canonical_cookie_unittest.cc

Project Member

Comment 11 by bugdroid1@chromium.org, Nov 20 2017

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

commit 70f8551db62e0285060875f11beee6ae4b681e07
Author: Victor Costan <pwnall@chromium.org>
Date: Mon Nov 20 16:14:46 2017

Replace cookie lines with CanonicalCookie in CanSetCookie delegates.

This is a follow-up of https://crrev.com/c/771510 and finishes the
replacement of the std::string ("Set-Cookie:" HTTP header line) argument
with net::CanonicalCookie in network delegates that give embedders an
opportunity to block cookies.

This CL removes duplicate parsing of Set-Cookie: HTTP header lines,
which was an opportunity for bugs.

Bug: 756093
Cq-Include-Trybots: master.tryserver.chromium.android:android_cronet_tester;master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
Change-Id: Ibe4ea727cb55665f1973483345c97e4b2122b7ea
Reviewed-on: https://chromium-review.googlesource.com/775606
Reviewed-by: Alex Clarke <alexclarke@chromium.org>
Reviewed-by: Mark Cogan <marq@chromium.org>
Reviewed-by: Bo <boliu@chromium.org>
Reviewed-by: Randy Smith <rdsmith@chromium.org>
Reviewed-by: Misha Efimov <mef@chromium.org>
Reviewed-by: Peter Beverloo <peter@chromium.org>
Commit-Queue: Victor Costan <pwnall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#517837}
[modify] https://crrev.com/70f8551db62e0285060875f11beee6ae4b681e07/android_webview/browser/aw_cookie_access_policy.cc
[modify] https://crrev.com/70f8551db62e0285060875f11beee6ae4b681e07/android_webview/browser/aw_cookie_access_policy.h
[modify] https://crrev.com/70f8551db62e0285060875f11beee6ae4b681e07/android_webview/browser/net/aw_network_delegate.cc
[modify] https://crrev.com/70f8551db62e0285060875f11beee6ae4b681e07/android_webview/browser/net/aw_network_delegate.h
[modify] https://crrev.com/70f8551db62e0285060875f11beee6ae4b681e07/chrome/browser/net/chrome_network_delegate.cc
[modify] https://crrev.com/70f8551db62e0285060875f11beee6ae4b681e07/chrome/browser/net/chrome_network_delegate.h
[modify] https://crrev.com/70f8551db62e0285060875f11beee6ae4b681e07/components/cronet/android/cronet_url_request_context_adapter.cc
[modify] https://crrev.com/70f8551db62e0285060875f11beee6ae4b681e07/content/shell/browser/shell_network_delegate.cc
[modify] https://crrev.com/70f8551db62e0285060875f11beee6ae4b681e07/content/shell/browser/shell_network_delegate.h
[modify] https://crrev.com/70f8551db62e0285060875f11beee6ae4b681e07/headless/lib/browser/headless_network_delegate.cc
[modify] https://crrev.com/70f8551db62e0285060875f11beee6ae4b681e07/headless/lib/browser/headless_network_delegate.h
[modify] https://crrev.com/70f8551db62e0285060875f11beee6ae4b681e07/ios/chrome/browser/net/ios_chrome_network_delegate.cc
[modify] https://crrev.com/70f8551db62e0285060875f11beee6ae4b681e07/ios/chrome/browser/net/ios_chrome_network_delegate.h
[modify] https://crrev.com/70f8551db62e0285060875f11beee6ae4b681e07/ios/web/shell/shell_network_delegate.cc
[modify] https://crrev.com/70f8551db62e0285060875f11beee6ae4b681e07/ios/web/shell/shell_network_delegate.h
[modify] https://crrev.com/70f8551db62e0285060875f11beee6ae4b681e07/ios/web_view/internal/web_view_network_delegate.cc
[modify] https://crrev.com/70f8551db62e0285060875f11beee6ae4b681e07/ios/web_view/internal/web_view_network_delegate.h
[modify] https://crrev.com/70f8551db62e0285060875f11beee6ae4b681e07/net/base/layered_network_delegate.cc
[modify] https://crrev.com/70f8551db62e0285060875f11beee6ae4b681e07/net/base/layered_network_delegate.h
[modify] https://crrev.com/70f8551db62e0285060875f11beee6ae4b681e07/net/base/layered_network_delegate_unittest.cc
[modify] https://crrev.com/70f8551db62e0285060875f11beee6ae4b681e07/net/base/network_delegate.cc
[modify] https://crrev.com/70f8551db62e0285060875f11beee6ae4b681e07/net/base/network_delegate.h
[modify] https://crrev.com/70f8551db62e0285060875f11beee6ae4b681e07/net/base/network_delegate_impl.cc
[modify] https://crrev.com/70f8551db62e0285060875f11beee6ae4b681e07/net/base/network_delegate_impl.h
[modify] https://crrev.com/70f8551db62e0285060875f11beee6ae4b681e07/net/cookies/cookie_store_test_helpers.cc
[modify] https://crrev.com/70f8551db62e0285060875f11beee6ae4b681e07/net/proxy/network_delegate_error_observer_unittest.cc
[modify] https://crrev.com/70f8551db62e0285060875f11beee6ae4b681e07/net/proxy/proxy_script_fetcher_impl_unittest.cc
[modify] https://crrev.com/70f8551db62e0285060875f11beee6ae4b681e07/net/url_request/url_request.cc
[modify] https://crrev.com/70f8551db62e0285060875f11beee6ae4b681e07/net/url_request/url_request.h
[modify] https://crrev.com/70f8551db62e0285060875f11beee6ae4b681e07/net/url_request/url_request_context_builder.cc
[modify] https://crrev.com/70f8551db62e0285060875f11beee6ae4b681e07/net/url_request/url_request_http_job.cc
[modify] https://crrev.com/70f8551db62e0285060875f11beee6ae4b681e07/net/url_request/url_request_job.cc
[modify] https://crrev.com/70f8551db62e0285060875f11beee6ae4b681e07/net/url_request/url_request_job.h
[modify] https://crrev.com/70f8551db62e0285060875f11beee6ae4b681e07/net/url_request/url_request_test_util.cc
[modify] https://crrev.com/70f8551db62e0285060875f11beee6ae4b681e07/net/url_request/url_request_test_util.h

Sign in to add a comment