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

Issue 2302193002: Change daemonize logic in watchdog and add timeout to file system read. (Closed)

Created:
4 years, 3 months ago by bpastene
Modified:
4 years, 3 months ago
Reviewers:
dnj
CC:
chromium-reviews, infra-reviews+infra_chromium.org
Target Ref:
refs/heads/master
Project:
infra
Visibility:
Public.

Description

Change daemonize logic in watchdog and add timeout to file system read. Daemonize via fork made goroutines behave strangely, so this uses exec instead. Reading from /proc/uptime can hang indefinitely on some phones. This adds a timeout. BUG=632895 Committed: https://chromium.googlesource.com/infra/infra/+/d026d656c86ae12a6e180630fd3f6185c788ca28

Patch Set 1 #

Total comments: 9

Patch Set 2 : Move getuptime to a single goroutine that responds to RPCs #

Total comments: 18

Patch Set 3 : comments #

Patch Set 4 : Use github.com/VividCortex/godaemon instead of home-spun version. #

Patch Set 5 : rebase #

Patch Set 6 : pin gocloud to bdbde4d... #

Patch Set 7 : add todo #

Unified diffs Side-by-side diffs Delta from patch set Stats (+86 lines, -59 lines) Patch
M go/deps.lock View 1 2 3 4 5 6 chunks +12 lines, -9 lines 0 comments Download
M go/deps.yaml View 1 2 3 4 5 6 2 chunks +6 lines, -1 line 0 comments Download
M go/src/infra/tools/device_watchdog/main.go View 1 2 3 5 chunks +68 lines, -49 lines 0 comments Download

Messages

Total messages: 26 (11 generated)
bpastene
ptal whenever you get a chance :) https://codereview.chromium.org/2302193002/diff/1/go/src/infra/tools/device_watchdog/main.go File go/src/infra/tools/device_watchdog/main.go (right): https://codereview.chromium.org/2302193002/diff/1/go/src/infra/tools/device_watchdog/main.go#newcode142 go/src/infra/tools/device_watchdog/main.go:142: go getDeviceUptime(c) ...
4 years, 3 months ago (2016-09-02 00:05:22 UTC) #2
dnj
https://codereview.chromium.org/2302193002/diff/1/go/src/infra/tools/device_watchdog/main.go File go/src/infra/tools/device_watchdog/main.go (right): https://codereview.chromium.org/2302193002/diff/1/go/src/infra/tools/device_watchdog/main.go#newcode65 go/src/infra/tools/device_watchdog/main.go:65: func daemonize(maxUptime int) (int, error) { This isn't a ...
4 years, 3 months ago (2016-09-02 16:17:32 UTC) #3
bpastene
I'll look into splitting the RPC logic into its own package and then adding tests ...
4 years, 3 months ago (2016-09-02 23:02:13 UTC) #4
dnj
Looking pretty good, a few comments. https://codereview.chromium.org/2302193002/diff/20001/go/src/infra/tools/device_watchdog/main.go File go/src/infra/tools/device_watchdog/main.go (right): https://codereview.chromium.org/2302193002/diff/20001/go/src/infra/tools/device_watchdog/main.go#newcode74 go/src/infra/tools/device_watchdog/main.go:74: func daemonize(maxUptime int) ...
4 years, 3 months ago (2016-09-03 00:48:08 UTC) #5
bpastene
https://codereview.chromium.org/2302193002/diff/20001/go/src/infra/tools/device_watchdog/main.go File go/src/infra/tools/device_watchdog/main.go (right): https://codereview.chromium.org/2302193002/diff/20001/go/src/infra/tools/device_watchdog/main.go#newcode74 go/src/infra/tools/device_watchdog/main.go:74: func daemonize(maxUptime int) (int, error) { On 2016/09/03 00:48:07, ...
4 years, 3 months ago (2016-09-09 00:51:43 UTC) #6
bpastene
https://codereview.chromium.org/2302193002/diff/20001/go/src/infra/tools/device_watchdog/main.go File go/src/infra/tools/device_watchdog/main.go (right): https://codereview.chromium.org/2302193002/diff/20001/go/src/infra/tools/device_watchdog/main.go#newcode75 go/src/infra/tools/device_watchdog/main.go:75: ret, _, errno := syscall.Syscall(syscall.SYS_FORK, 0, 0, 0) On ...
4 years, 3 months ago (2016-09-09 19:38:53 UTC) #7
dnj
lgtm https://codereview.chromium.org/2302193002/diff/20001/go/src/infra/tools/device_watchdog/main.go File go/src/infra/tools/device_watchdog/main.go (right): https://codereview.chromium.org/2302193002/diff/20001/go/src/infra/tools/device_watchdog/main.go#newcode133 go/src/infra/tools/device_watchdog/main.go:133: func getUptime(requestQueue chan<- chan uptimeResult, timeoutPeriod time.Duration) (time.Duration, ...
4 years, 3 months ago (2016-09-09 19:40:57 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2302193002/60001
4 years, 3 months ago (2016-09-09 19:52:33 UTC) #10
commit-bot: I haz the power
Try jobs failed on following builders: Infra Linux Trusty 64 Tester on luci.infra.try (JOB_FAILED, https://luci-milo.appspot.com/swarming/task/312953eab1048610) ...
4 years, 3 months ago (2016-09-09 19:54:03 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2302193002/80001
4 years, 3 months ago (2016-09-09 20:06:09 UTC) #15
commit-bot: I haz the power
Try jobs failed on following builders: Infra Linux Trusty 64 Tester on luci.infra.try (JOB_FAILED, https://luci-milo.appspot.com/swarming/task/31296067c207ac10)
4 years, 3 months ago (2016-09-09 20:19:39 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2302193002/80001
4 years, 3 months ago (2016-09-09 21:11:30 UTC) #19
commit-bot: I haz the power
Try jobs failed on following builders: Infra Win Tester on luci.infra.try (JOB_FAILED, https://luci-milo.appspot.com/swarming/task/31299ccd3a77ca10)
4 years, 3 months ago (2016-09-09 21:21:13 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2302193002/120001
4 years, 3 months ago (2016-09-09 21:58:08 UTC) #24
commit-bot: I haz the power
4 years, 3 months ago (2016-09-09 22:12:51 UTC) #26
Message was sent while issue was closed.
Committed patchset #7 (id:120001) as
https://chromium.googlesource.com/infra/infra/+/d026d656c86ae12a6e180630fd3f6...

Powered by Google App Engine
This is Rietveld 408576698