[Buildbot] #3024: logfilewatcher is not synchronously finished at the end of the command

Buildbot trac trac at buildbot.net
Thu Nov 13 18:49:01 UTC 2014


#3024: logfilewatcher is not synchronously finished at the end of the command
-------------------+--------------------
Reporter:  tardyp  |       Owner:
    Type:  defect  |      Status:  new
Priority:  major   |   Milestone:  0.9.+
 Version:  0.8.9   |  Resolution:
Keywords:          |
-------------------+--------------------
Changes (by sa2ajj):

 * type:  undecided => defect
 * milestone:  undecided => 0.9.+


Old description:

> as per runprocess.py line 732 of buildslave:
>
>     def finished(self, sig, rc):
>         self.elapsedTime = util.now(self._reactor) - self.startTime
>         log.msg("command finished with signal %s, exit code %s,
> elapsedTime: %0.6f" % (sig, rc, self.elapsedTime))
>         for w in self.logFileWatchers:
>             # this will send the final updates
>             w.stop()
>
> the stop of the file watcher is done without waiting at any potencial
> defered. This effectively means the last chunks of the log is sent at the
> same time as the effective finish of the step.
>
> Thus if someone wants to parse the log in the end of the step, it will
> get unfinished log.
>
> in nine, this is even worse, as logfiles are forced terminated at the end
> of the step, the result is probably that the last chunk will be just
> dropped, with a nice exception in twistd.log.
>

> This will be hard to fix as we try to avoid changing buildslave. a
> workaround is to poll until all polled logs are finished in master at the
> end of a remotecommand.

New description:

 as per runprocess.py line 732 of buildslave:

 {{{
     def finished(self, sig, rc):
         self.elapsedTime = util.now(self._reactor) - self.startTime
         log.msg("command finished with signal %s, exit code %s,
 elapsedTime: %0.6f" % (sig, rc, self.elapsedTime))
         for w in self.logFileWatchers:
             # this will send the final updates
             w.stop()
 }}}

 the stop of the file watcher is done without waiting at any potencial
 defered. This effectively means the last chunks of the log is sent at the
 same time as the effective finish of the step.

 Thus if someone wants to parse the log in the end of the step, it will get
 unfinished log.

 in nine, this is even worse, as logfiles are forced terminated at the end
 of the step, the result is probably that the last chunk will be just
 dropped, with a nice exception in twistd.log.


 This will be hard to fix as we try to avoid changing buildslave. a
 workaround is to poll until all polled logs are finished in master at the
 end of a remotecommand.

--

--
Ticket URL: <http://trac.buildbot.net/ticket/3024#comment:1>
Buildbot <http://buildbot.net/>
Buildbot: build/test automation


More information about the bugs mailing list