Ticket #694 (closed defect: fixed)
Infinite loop in the slave with Mercurial
| Reported by: | kalessin | Owned by: | |
|---|---|---|---|
| Priority: | critical | Milestone: | 0.8.0 |
| Version: | 0.7.11 | Keywords: | slave, mercurial, infinite loop |
| Cc: | macke@…, tyl.e.rod.er.kir.k@… |
Description
Hello,
I have set up a buildbot for my first time (you do cool things !) and I have fallen into a nasty bug.
I'm using buidlbot (slave and master) on Debian squeeze with mercurial:
(chroot)root@kalessin:/tmp# buildbot --version Buildbot version: 0.7.11p3 Twisted version: 9.0.0 (chroot)root@kalessin:/tmp# hg --version Mercurial Distributed SCM (version 1.4.1) Copyright (C) 2005-2009 Matt Mackall <mpm@selenic.com> and others This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. (chroot)root@kalessin:/tmp#
Whenever a new build was launched the slave started an infinite loop. The reason was here :
http://github.com/djmitche/buildbot/blob/master/buildbot/slave/commands.py#L2915
You compare two directories paths, but done this way /foo/bar and /foo/bar/ appears to be differents. In my case when the condition was true, the slave restarted a complete checkout of the code, falling again in the condition, and again, and again, and again...
I have resolved the problem, by setting my repourl in my master.cfg without the ending slash :
from buildbot.process import factory from buildbot.steps.source import Mercurial from buildbot.steps.shell import Compile, Configure, Test f1 = factory.BuildFactory() f1.addStep(Mercurial(repourl="/tmp/zia")) f1.addStep(Configure(command=["cmake", "."])) # do not use configure f1.addStep(Compile()) # make all f1.addStep(Test()) # make test
A more robust way to compare directories paths should be used.
Please, find the log from both the slave and the master attached with this ticket. (due to the loop I have truncated them).
Best Regards -- Louis Opter <kalessin@…>
![[Buildbot Logo]](/trac/chrome/site/header-text-transparent.png)
