New issue
Advanced search Search tips

Issue 865896 link

Starred by 1 user

Issue metadata

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



Sign in to add a comment

Sometimes a benchmark crash in run_telemetry_benchmark_as_googletest.py interrupt other benchmarks' run

Project Member Reported by nednguyen@chromium.org, Jul 20

Issue description

Based on the log in https://chrome-swarming.appspot.com/task?id=3ece17e32a46a710&refresh=10&show_raw=1, the failure of memory.desktop benchmark caused the whole benchmark run loop to stop. 

The failing stack is:
Traceback (most recent call last):
  File "..\..\testing\scripts\run_performance_tests.py", line 268, in <module>
    sys.exit(main())
  File "..\..\testing\scripts\run_performance_tests.py", line 244, in main
    False, stories=stories) or return_code)
  File "..\..\testing\scripts\run_performance_tests.py", line 132, in execute_benchmark
    args, per_benchmark_args, is_histograms))
  File "c:\b\s\w\ir\testing\scripts\run_telemetry_benchmark_as_googletest.py", line 170, in run_benchmark
    shutil.rmtree(tempfile_dir)
  File "c:\b\s\w\ir\.swarming_module\bin\Lib\shutil.py", line 252, in rmtree
    onerror(os.remove, fullname, sys.exc_info())
  File "c:\b\s\w\ir\.swarming_module\bin\Lib\shutil.py", line 250, in rmtree
    os.remove(fullname)
WindowsError: [Error 32] The process cannot access the file because it is being used by another process: 'c:\\b\\s\\w\\itebecpm\\tmp6yz3tctelemetry\\benchmark_log.txt'
Failed to delete c:\b\s\w\ir (32 files remaining).
  Maybe the test has a subprocess outliving it.
  Sleeping 2 seconds.
Failed to delete c:\b\s\w\ir (32 files remaining).
  Maybe the test has a subprocess outliving it.
  Sleeping 4 seconds.


So the root cause is even the benchmark run subprocess crashes, it has some leaky subprocesses that are holding opened file handles to the temp directory that we want to remove

The short term fix for this is to add ignore_errors to rmtree function call. Longer term, we should make sure run_telemetry_benchmark_as_googletest clean up all subprocesses of test
 
Project Member

Comment 1 by bugdroid1@chromium.org, Jul 20

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

commit afc2ba2290f9960d3f7b8af422256234eb73237c
Author: Ned Nguyen <nednguyen@google.com>
Date: Fri Jul 20 14:39:53 2018

Add ignore_true to rmtree in run_telemetry_benchmark_as_googletest

NOTRY=true  # webkit_layout_test flake

Bug: 865896
Change-Id: I388b256c6d39c0d3978bc17dad20cc5450ef3628
Reviewed-on: https://chromium-review.googlesource.com/1144726
Commit-Queue: Ned Nguyen <nednguyen@google.com>
Reviewed-by: John Budorick <jbudorick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#576858}
[modify] https://crrev.com/afc2ba2290f9960d3f7b8af422256234eb73237c/testing/scripts/run_telemetry_benchmark_as_googletest.py

Sign in to add a comment