[Buildbot-devel] buildbot dependent scheduler firing twice for each upstream build

Mark A. Grondona mgrondona at llnl.gov
Tue Dec 9 22:55:56 UTC 2008

I've added some debug statements to the buildbot code in order to
make some progress on this.

I first added a log message in BaseUpstreamScheduler::submitBuildSet

          log.msg ("%s.submitBuildSet (%s)" % (self.name, bs.reason))

to see if this function was indeed being called twice for my Dependent
schedulers. Indeed, from the logs I saw this was true:

 2008/12/09 11:54 -0700 [-] announce4.submitBuildSet (None)

 2008/12/09 11:54 -0700 [-] announce4.submitBuildSet (None)

I then added another log message in the buildSetFinished routine, here:

        if bss.getResults() == builder.SUCCESS:
            ss = bss.getSourceStamp()
            log.msg ("%s.buildSetFinished: calling %d success watchers" %
                     (self.name, len (self.successWatchers)))
            for w in self.successWatchers:

to see if buildSetFinished was being called more than once, or if the
annouce4 'watcher' was somehow added to the successWatchers list twice.
I'm seeing the following after a build has finished:

 2008/12/09 11:54 -0700 [-] rpms.chaos-dchroot.buildSetFinished: calling 1 success watchers

 2008/12/09 11:54 -0700 [-] rpms.buildSetFinished: calling 1 success watchers

Somehow buildSetFinished is being called twice. The base name of this upstream
Scheduler should be just 'rpms'. However, I am seeing an extra Scheduler 
instance calling its buildSetFinished method, and that one has 'chaos-dchroot'
appended to its name. In this case 'chaos-dchroot' should be the 'branch' 
attribute of the buildSet.

Looking further back in the logs, I do see that submitBuildSet was called
for each of these Schedulers:

 2008/12/09 11:53 -0700 [-] rpms.chaos-dchroot.submitBuildSet (None)
 2008/12/09 11:53 -0700 [-] rpms.submitBuildSet (None)

Remember that the 'rpms' Scheduler is an AnyBranch scheduler, and from the 
comments I see

    """This Scheduler will handle changes on a variety of branches. It will
    accumulate Changes for each branch separately. It works by creating a
    separate Scheduler for each new branch it sees."""

So it seems to me like the rpms.<branch> scheduler is only one that should be 
active during these builds, if I understand that comment correctly.

So, does anyone know why this extra scheduler is active and triggers
my dependent builds? BTW, I am _not_ seeing an extra actual build, just
an extra trigger of the dependent build. 


> Hi,
> We've been using buildbot for automated builds for awhile now, and
> I've recently upgraded from 0.7.7 to 0.7.9 in order to hopefully
> get support for exclusive/shared (r/w) locks. 
> However, once I upgraded the buildbot code -- using the same master.cfg --
> I am running into a new problem. The dependent schedulers I use seem
> to be firing two builds per one upstream build, instead of one.
> The key portion of my master.cfg looks something like:
> build = AnyBranchScheduler ("rpms", None, 0,
>                             fileIsImportant=isImportant,
>                             builderNames=['x86_64', 'i386'])
> announce = Dependent ("announce", build, ['annnounce'])
> What we had working in buildbot-0.7.7 was that a 'build' 
> triggered builds on both x86-64 and i386 builders, and if
> each of these completed successfully, the announcement
> build was triggered.
> However, now we see two announce builds triggered for each 'build'.
> Have there been any changes in dependent schedulers of which we should
> be aware, or any other places in master.cfg to check for errors on our
> part? I tried looking in the twistd.log, but there are no clues as to
> how the announce builder is being triggered.
> Thanks,
> mark
> -----------------------------------------------------------------------------
> -
> SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
> The future of the web can't happen without you.  Join us at MIX09 to help
> pave the way to the Next Web now. Learn more and register at
> http:// ad.doubleclick.net/clk;208669438;13503038;i?http:// 2009.visitmix.com
> /
> _______________________________________________
> Buildbot-devel mailing list
> Buildbot-devel at lists.sourceforge.net
> https:// lists.sourceforge.net/lists/listinfo/buildbot-devel

More information about the devel mailing list