[Buildbot-commits] buildbot/buildbot/status builder.py,1.62,1.63
Brian Warner
warner at users.sourceforge.net
Tue Aug 9 00:43:37 UTC 2005
Update of /cvsroot/buildbot/buildbot/buildbot/status
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26164/buildbot/status
Modified Files:
builder.py
Log Message:
Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-268
Creator: Brian Warner <warner at monolith.lothar.com>
fix the large-logfile-hang against twisted-1.3.0
* buildbot/status/builder.py (LogFileProducer.resumeProducing):
put off the actual resumeProducing for a moment with
reactor.callLater(0). This works around a twisted-1.3.0 bug which
causes large logfiles to hang midway through.
* buildbot/test/test_status.py (Log.testMerge3): update to match new
addEntry merging (>=chunkSize) behavior
(Log.testConsumer): update to handle new callLater(0) behavior
* buildbot/test/test_web.py: rearrange tests a bit, add test for
both the MAX_LENGTH bugfix and the resumeProducing hang.
--This line, and those below, will be ignored--
Files to commit:
<can't compute list>
This list might be incomplete or outdated if editing the log
message was not invoked from an up-to-date changes buffer!
Index: builder.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/status/builder.py,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -d -r1.62 -r1.63
--- builder.py 8 Aug 2005 21:39:46 -0000 1.62
+++ builder.py 9 Aug 2005 00:43:35 -0000 1.63
@@ -88,6 +88,7 @@
allowed to call stopProducing, pauseProducing, and resumeProducing on the
producer instance it is given. """
+ paused = False
subscribed = False
BUFFERSIZE = 2048
@@ -149,6 +150,17 @@
self.paused = True
def resumeProducing(self):
+ # Twisted-1.3.0 has a bug which causes hangs when resumeProducing
+ # calls transport.write (there is a recursive loop, fixed in 2.0 in
+ # t.i.abstract.FileDescriptor.doWrite by setting the producerPaused
+ # flag *before* calling resumeProducing). To work around this, we
+ # just put off the real resumeProducing for a moment. This probably
+ # has a performance hit, but I'm going to assume that the log files
+ # are not retrieved frequently enough for it to be an issue.
+
+ reactor.callLater(0, self._resumeProducing)
+
+ def _resumeProducing(self):
self.paused = False
if not self.chunkGenerator:
return
More information about the Commits
mailing list