chromecast: tracing: transferMode: ReturnAsStream can fail due to limited /tmp space |
|||
Issue description
Large traces captured from chromecast devices by chrome fail when the "ReturnAsStream" transfer mode is in use, as this writes the trace to /tmp and there is limited space available. ENOSPC causes the trace to fail.
Thus causes "Read failed" with error -32000:
chromecast/tools/trace.py
Connect to ws://127.0.0.1:9222/devtools/browser/da4e0932-4a55-4b4f-be99-ef102c12d8a4 ...
Capturing trace. Press Enter to stop...
ERROR:root:Tracing error: {u'message': u'Read failed', u'code': -32000}
Done
,
Dec 4 2017
,
Dec 6 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/90ecf2f439bb7d6dc3559232e0c818b3a3bfe723 commit 90ecf2f439bb7d6dc3559232e0c818b3a3bfe723 Author: Michael Spang <spang@chromium.org> Date: Wed Dec 06 01:33:15 2017 devtools: tracing: Add support for compressing the trace Tracing can generate large output files (over 50M) especially if system tracing is enabled, and are very compressible. Add an option to compress them using the same machinery that chrome://tracing uses. This also uses less /tmp space to store the stream. Storing large files in /tmp was causing problems for chromecast, as space is /tmp is very limited. BUG= 791708 Change-Id: Icbaac91cccb825a305431569bf6f42011d3cfbea Reviewed-on: https://chromium-review.googlesource.com/807384 Commit-Queue: Michael Spang <spang@chromium.org> Reviewed-by: Andrey Kosyakov <caseq@chromium.org> Reviewed-by: Dmitry Gozman <dgozman@chromium.org> Cr-Commit-Position: refs/heads/master@{#521939} [modify] https://crrev.com/90ecf2f439bb7d6dc3559232e0c818b3a3bfe723/content/browser/devtools/devtools_io_context.cc [modify] https://crrev.com/90ecf2f439bb7d6dc3559232e0c818b3a3bfe723/content/browser/devtools/devtools_io_context.h [modify] https://crrev.com/90ecf2f439bb7d6dc3559232e0c818b3a3bfe723/content/browser/devtools/protocol/tracing_handler.cc [modify] https://crrev.com/90ecf2f439bb7d6dc3559232e0c818b3a3bfe723/content/browser/devtools/protocol/tracing_handler.h [modify] https://crrev.com/90ecf2f439bb7d6dc3559232e0c818b3a3bfe723/third_party/WebKit/Source/core/inspector/InspectorTracingAgent.cpp [modify] https://crrev.com/90ecf2f439bb7d6dc3559232e0c818b3a3bfe723/third_party/WebKit/Source/core/inspector/InspectorTracingAgent.h [modify] https://crrev.com/90ecf2f439bb7d6dc3559232e0c818b3a3bfe723/third_party/WebKit/Source/core/inspector/browser_protocol.json [modify] https://crrev.com/90ecf2f439bb7d6dc3559232e0c818b3a3bfe723/third_party/WebKit/Source/core/inspector/browser_protocol.pdl
,
Dec 7 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/1b678864fae8c875d5531cd31ae56745921dfe12 commit 1b678864fae8c875d5531cd31ae56745921dfe12 Author: Michael Spang <spang@chromium.org> Date: Thu Dec 07 01:59:35 2017 chromecast: trace.py: Add support for requesting compressed traces This adds the ability for trace.py to request compression of traces, giving us much more headroom in /tmp. Compressed traces are about 1/10th the size of uncompressed traces. Compressed traces have to be base64 decoded when read from the websocket, since those have a bizarre requirement that the payload be valid utf-8. BUG= 791708 Change-Id: I22f0c4aa70e22d9a33e3f2d3dd9a2180df33a815 Reviewed-on: https://chromium-review.googlesource.com/812012 Reviewed-by: Luke Halliwell <halliwell@chromium.org> Commit-Queue: Michael Spang <spang@chromium.org> Cr-Commit-Position: refs/heads/master@{#522304} [modify] https://crrev.com/1b678864fae8c875d5531cd31ae56745921dfe12/chromecast/tools/trace.py [modify] https://crrev.com/1b678864fae8c875d5531cd31ae56745921dfe12/chromecast/tools/tracinglib.py
,
Dec 7 2017
|
|||
►
Sign in to add a comment |
|||
Comment 1 by spang@chromium.org
, Dec 4 2017