[Buildbot-devel] Minor bug: buildbot fails to follow twistd.log on OSX

Benoit Sigoure tsuna at lrde.epita.fr
Tue Nov 13 10:52:44 UTC 2007


Hi list,
this is a problem I observed only on OSX so I suspect it's due to  
some portability issue on this OS.

------------------------------------------------------------------------ 
--
$ buildbot restart .
buildbot process 24190 is dead
now restarting buildbot process..
Following twistd.log until startup finished..

The buildmaster took more than 10 seconds to start, so we were unable to
confirm that it started correctly. Please 'tail twistd.log' and look  
for a
line that says 'configuration update complete' to verify correct  
startup.
------------------------------------------------------------------------ 
--

I *always* get this error, for both the buildmaster and the  
buildslaves, it's systematic.  However, the buildmaster/buildslave  
always starts properly.  I think the error is solely due to the fact  
that buildbot fails to track the content of twistd.log, for some reason.

I patched my installation with the following patch:
------------------------------------------------------------------------ 
--
--- buildbot/scripts/logwatcher.py      2007-10-01 04:48:39.000000000  
+0200
+++ _inst/lib/python2.4/site-packages/buildbot/scripts/ 
logwatcher.py    2007-11-13 11:48:30.000000000 +0100
@@ -27,6 +27,7 @@
          self.transport = FakeTransport()
          self.f = None
          self.processtype = "buildmaster"
+        print "LogWatcher ctor"
      def start(self):
          # return a Deferred that fires when the reconfig process has
@@ -36,6 +37,7 @@
          # an IOError.
          self.running = True
          d = defer.maybeDeferred(self._start)
+        print "LogWatcher start"
          return d
      def _start(self):
@@ -48,6 +50,7 @@
          reactor.callLater(self.TIMEOUT_DELAY, self.timeout)
          self.poller = task.LoopingCall(self.poll)
          self.poller.start(self.POLL_INTERVAL)
+        print "LogWatcher _start, logfile=" + self.logfile
          return self.d
      def timeout(self):
@@ -62,7 +65,9 @@
          self.d.callback(results)
      def lineReceived(self, line):
+        print "lineReceived"
          if not self.running:
+            print "not self.running"
              return
          if "Log opened." in line:
              self.in_reconfig = True
@@ -72,6 +77,7 @@
              self.processtype = "buildslave"
          if self.in_reconfig:
+            print "not self.in_reconfig"
              print line
          if "message from master: attached" in line:
@@ -90,6 +96,8 @@
          while True:
              data = self.f.read(1000)
              if not data:
+                print "LogWatcher poll not data: " + str(data)
                  return
+            print "LogWatcher poll HAS data"
              self.dataReceived(data)

------------------------------------------------------------------------ 
--

And this yields:
------------------------------------------------------------------------ 
--
$ buildbot restart .
buildbot process 24305 is dead
now restarting buildbot process..
Following twistd.log until startup finished..
LogWatcher ctor
LogWatcher poll not data:
LogWatcher _start, logfile=twistd.log
LogWatcher start
LogWatcher poll not data:
[same line repeated many times]
LogWatcher poll not data:

The buildmaster took more than 10 seconds to start, so we were unable to
confirm that it started correctly. Please 'tail twistd.log' and look  
for a
line that says 'configuration update complete' to verify correct  
startup.

LogWatcher poll not data:
------------------------------------------------------------------------ 
--

I don't have time to trace the problem further but if someone wants  
me to try something else, let me know.

Version Information
Buildbot: 0.7.6
Twisted: 2.5.0
Python: 2.4.3 (#1, Mar 22 2007, 02:04:59) [GCC 4.0.1 (Apple Computer,  
Inc. build 5367)]
Buildmaster platform: darwin

Cheers,

-- 
Benoit Sigoure aka Tsuna
EPITA Research and Development Laboratory


-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
URL: <http://buildbot.net/pipermail/devel/attachments/20071113/e2a92fe8/attachment.bin>


More information about the devel mailing list