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

Side by Side Diff: third_party/buildbot_slave_8_4/README.chromium

Issue 325963006: Kill builds that produce too much output (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 URL: http://buildbot.net/trac 1 URL: http://buildbot.net/trac
2 Version: 0.8.4p1 2 Version: 0.8.4p1
3 License: GNU General Public License (GPL) Version 2 3 License: GNU General Public License (GPL) Version 2
4 4
5 This is a forked copy of buildbot v0.8.4p1. 5 This is a forked copy of buildbot v0.8.4p1.
6 6
7 Reboot after a step times out and fails to recover. 7 Reboot after a step times out and fails to recover.
8 8
9 diff --git a/third_party/buildbot_slave_8_4/buildslave/runprocess.py b/third_par ty/buildbot_slave_8_4/buildslave/runprocess.py 9 diff --git a/third_party/buildbot_slave_8_4/buildslave/runprocess.py b/third_par ty/buildbot_slave_8_4/buildslave/runprocess.py
10 index 75d6cc4..6a96b03 100644 10 index 75d6cc4..6a96b03 100644
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 self.timer = None 73 self.timer = None
74 self.sendStatus({'header': "SIGKILL failed to kill process\n"}) 74 self.sendStatus({'header': "SIGKILL failed to kill process\n"})
75 if self.sendRC: 75 if self.sendRC:
76 self.sendStatus({'header': "using fake rc=-1\n"}) 76 self.sendStatus({'header': "using fake rc=-1\n"})
77 self.sendStatus({'rc': -1}) 77 self.sendStatus({'rc': -1})
78 + slave.reboot_tools.Reboot() 78 + slave.reboot_tools.Reboot()
79 + # In production, Reboot() does not return, and failed() is 79 + # In production, Reboot() does not return, and failed() is
80 + # never called. In testing mode, Reboot() returns immediately 80 + # never called. In testing mode, Reboot() returns immediately
81 + # with no effect, and we need to recover. 81 + # with no effect, and we need to recover.
82 self.failed(RuntimeError("SIGKILL failed to kill process")) 82 self.failed(RuntimeError("SIGKILL failed to kill process"))
83
84 diff --git a/third_party/buildbot_slave_8_4/buildslave/runprocess.py b/third_par ty/buildbot_slave_8_4/buildslave/runprocess.py
85 index 6a96b03..1b79a17 100644
86 --- a/third_party/buildbot_slave_8_4/buildslave/runprocess.py
87 +++ b/third_party/buildbot_slave_8_4/buildslave/runprocess.py
88 @@ -212,6 +212,7 @@ class RunProcess:
89 BACKUP_TIMEOUT = 5
90 KILL = "KILL"
91 CHUNK_LIMIT = 128*1024
92 + OUTPUT_LIMIT = 50*1024*1024
93
94 # Don't send any data until at least BUFFER_SIZE bytes have been collected
95 # or BUFFER_TIMEOUT elapsed
96 @@ -322,6 +323,7 @@ class RunProcess:
97 self.buffered = deque()
98 self.buflen = 0
99 self.buftimer = None
100 + self.totalOutputLength = 0
101
102 if usePTY == "slave-config":
103 self.usePTY = self.builder.usePTY
104 @@ -621,6 +623,11 @@ class RunProcess:
105 """
106 n = len(data)
107
108 + self.totalOutputLength += n
109 + if self.totalOutputLength > self.OUTPUT_LIMIT:
110 + self.kill('output limit (%d) exceeded' % self.OUTPUT_LIMIT)
111 + return
112 +
113 self.buflen += n
114 self.buffered.append((logname, data))
115 if self.buflen > self.BUFFER_SIZE:
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698