Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(323)

Issue 636273004: Make TimeoutRetryThread's stoppable (Closed)

Created:
6 years, 2 months ago by perezju
Modified:
6 years, 1 month ago
Reviewers:
jbudorick
CC:
chromium-reviews, klundberg+watch_chromium.org, yfriedman+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Improvements of TimeoutRetryThread so that it is possible to stop threads which have already timed out (instead of keeping them like zombie threads running in the background). Provides a timeout_retry.WaitFor to wait until a condition becomes true. Also migrates some DeviceUtils methods to use the new adb_wrapper: - WaitUntilFullyBooted - GetProp/SetProp - GetApplicationPath BUG=267773 Committed: https://crrev.com/8851b7f06044d506745f0a0547e247cb6660f1d9 Cr-Commit-Position: refs/heads/master@{#302250}

Patch Set 1 #

Total comments: 20

Patch Set 2 : some fixes, tests ready #

Total comments: 22

Patch Set 3 : moved check for timed out thread into adb_wrapper #

Total comments: 10

Patch Set 4 : improved TimeoutRetryThread and timeouts in adb_wrapper #

Patch Set 5 : do not catch CommandFailedError in _WaitFor #

Total comments: 23

Patch Set 6 : more improvements on TimeoutRetryThread #

Total comments: 2

Patch Set 7 : fixed nit #

Unified diffs Side-by-side diffs Delta from patch set Stats (+417 lines, -197 lines) Patch
M build/android/pylib/device/adb_wrapper.py View 1 2 3 4 5 2 chunks +4 lines, -2 lines 0 comments Download
M build/android/pylib/device/device_utils.py View 1 2 3 4 5 13 chunks +100 lines, -37 lines 0 comments Download
M build/android/pylib/device/device_utils_test.py View 1 2 3 4 5 10 chunks +174 lines, -144 lines 0 comments Download
M build/android/pylib/utils/reraiser_thread.py View 1 2 3 4 5 5 chunks +6 lines, -4 lines 0 comments Download
M build/android/pylib/utils/timeout_retry.py View 1 2 3 4 5 6 2 chunks +120 lines, -7 lines 0 comments Download
M build/android/pylib/utils/watchdog_timer.py View 1 2 3 4 5 6 1 chunk +13 lines, -3 lines 0 comments Download

Messages

Total messages: 19 (2 generated)
perezju
John, this is very much a work in progress (tests are still missing), but wanted ...
6 years, 2 months ago (2014-10-24 16:30:06 UTC) #2
jbudorick
While I generally like this approach, I'm not sure I like the stop mechanism as ...
6 years, 2 months ago (2014-10-24 17:30:52 UTC) #3
perezju
https://codereview.chromium.org/636273004/diff/1/build/android/pylib/device/device_utils.py File build/android/pylib/device/device_utils.py (right): https://codereview.chromium.org/636273004/diff/1/build/android/pylib/device/device_utils.py#newcode253 build/android/pylib/device/device_utils.py:253: logging.warning('%s: condition %r met (%1.2f) at %s', str(self), On ...
6 years, 1 month ago (2014-10-27 11:07:07 UTC) #4
perezju
A new stab at _WaitFor, which makes sure to stop threads that have timed out. ...
6 years, 1 month ago (2014-10-27 17:43:34 UTC) #5
jbudorick
https://codereview.chromium.org/636273004/diff/1/build/android/pylib/device/device_utils.py File build/android/pylib/device/device_utils.py (right): https://codereview.chromium.org/636273004/diff/1/build/android/pylib/device/device_utils.py#newcode959 build/android/pylib/device/device_utils.py:959: def SetProp(self, property_name, value, check=False, timeout=None, On 2014/10/27 11:07:07, ...
6 years, 1 month ago (2014-10-27 19:15:37 UTC) #6
perezju
Ok, another try at improving the TimeoutRetry mechanism. This time moved the checks into adb_wrapper, ...
6 years, 1 month ago (2014-10-28 14:31:18 UTC) #7
jbudorick
I like this better, and naming it "RequestThreadTimeout" (or similar) is definitely a good step. ...
6 years, 1 month ago (2014-10-28 17:28:46 UTC) #8
perezju
On 2014/10/28 17:28:46, jbudorick wrote: > Ideally, I think we should either: > - Have ...
6 years, 1 month ago (2014-10-29 12:48:40 UTC) #9
jbudorick
On 2014/10/29 12:48:40, perezju wrote: > On 2014/10/28 17:28:46, jbudorick wrote: > > Ideally, I ...
6 years, 1 month ago (2014-10-29 14:08:00 UTC) #10
perezju
As discussed, the new approach to stop a TimeoutRetryThread. https://codereview.chromium.org/636273004/diff/80001/build/android/pylib/device/device_utils.py File build/android/pylib/device/device_utils.py (right): https://codereview.chromium.org/636273004/diff/80001/build/android/pylib/device/device_utils.py#newcode243 build/android/pylib/device/device_utils.py:243: ...
6 years, 1 month ago (2014-10-29 18:16:50 UTC) #11
jbudorick
Can't sign off on this yet, unfortunately. https://codereview.chromium.org/636273004/diff/80001/build/android/pylib/device/adb_wrapper.py File build/android/pylib/device/adb_wrapper.py (right): https://codereview.chromium.org/636273004/diff/80001/build/android/pylib/device/adb_wrapper.py#newcode51 build/android/pylib/device/adb_wrapper.py:51: """Wait for ...
6 years, 1 month ago (2014-10-30 02:27:03 UTC) #12
perezju
John, thanks for pushing back on the review yesterday. It did give me time to ...
6 years, 1 month ago (2014-10-30 18:44:45 UTC) #13
jbudorick
lgtm w/ nit Let's try to keep the CLs a little smaller next time :) ...
6 years, 1 month ago (2014-10-30 19:00:14 UTC) #14
jbudorick
On 2014/10/30 19:00:14, jbudorick wrote: > lgtm w/ nit > > Let's try to keep ...
6 years, 1 month ago (2014-10-30 19:53:12 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/636273004/120001
6 years, 1 month ago (2014-10-31 11:07:29 UTC) #17
commit-bot: I haz the power
Committed patchset #7 (id:120001)
6 years, 1 month ago (2014-10-31 12:00:46 UTC) #18
commit-bot: I haz the power
6 years, 1 month ago (2014-10-31 12:01:21 UTC) #19
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/8851b7f06044d506745f0a0547e247cb6660f1d9
Cr-Commit-Position: refs/heads/master@{#302250}

Powered by Google App Engine
This is Rietveld 408576698