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

Issue 681129 link

Starred by 1 user

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug-Regression



Sign in to add a comment

Failure to remove trace file at the end of tests, possible backward order of operations in telemetry.

Project Member Reported by aiolos@chromium.org, Jan 13 2017

Issue description

While looking at red win bots on the waterfall, I noticed multiple errors where the test is unable to delete the trace file because some other process was using it. Note that the info log that we successfully shut down the browser happens *after* telemetry fails to delete the log.

Should we be waiting until after Chrome is shut down to remove the trace files?

Example:
INFO:root:Chrome version: 2981
ERROR:root:Error when deleting c:\b\s\w\itdsvdhw\tmpvakwko, will try again at exit.
Traceback (most recent call last):
  File "c:\b\s\w\iryqshpv\third_party\catapult\telemetry\telemetry\internal\platform\tracing_controller_backend.py", line 272, in CollectAgentTraceData
    os.remove(self._trace_log)
WindowsError: [Error 32] The process cannot access the file because it is being used by another process: 'c:\\b\\s\\w\\itdsvdhw\\tmpvakwko'
INFO:root:Trace sizes in bytes: {TraceDataPart("traceEvents"): 18579672L, TraceDataPart("telemetry"): 48440L, TraceDataPart("tabIds"): 40L}
[ RUN      ] c:\b\s\w\itdsvdhw\tmp52t0zz.html
[       OK ] c:\b\s\w\itdsvdhw\tmp52t0zz.html (26909 ms)
[       OK ] load:tools:weather (105107 ms)
INFO:root:Successfully shut down browser cooperatively


From test stdio log: https://uberchromegw.corp.google.com/i/chromium.perf/builders/Win%20Zenbook%20Perf/builds/176/steps/system_health.common_desktop%20on%20Intel%20GPU%20on%20Windows%20on%20Windows-10-10240/logs/stdio

 
Labels: -Pri-1 Pri-2
Owner: rnep...@chromium.org
I think the order of things are:

Start Browser
Start Collecting Trace
Run Test
Stop Collecting Trace
Compute metric from trace
Remove trace
Stop the browser

That error is a warning for failure to remove file. I suspect that is because we use a temp file to represent a trace & the handle to the file is still opened when we try to remove it. Though this is not a fatal error due to the try catch in https://github.com/catapult-project/catapult/blob/master/telemetry/telemetry/internal/platform/tracing_controller_backend.py#L274, so downgrade this to P2.

@Randy: I remember you touch this code last time, can you take a look?
Status: Assigned (was: Untriaged)
Owner: ----
Status: Available (was: Assigned)
Cc: -eakuefner@chromium.org
Components: Test>Telemetry
Components: -Tests>Telemetry

Sign in to add a comment