[Buildbot-devel] `make clean' is too slow on buildbot
Weongyo Jeong
weongyo.jeong at gmail.com
Thu Apr 22 23:33:43 UTC 2010
Hello,
I'm using a buildbot for daily build but it looks running commands are
too slow for me, for example; make clean
2010-04-22 16:07:53-0700 [Broker,client] startCommand:shell [id 123]
2010-04-22 16:07:53-0700 [Broker,client] ShellCommand._startCommand
2010-04-22 16:07:53-0700 [Broker,client] make clean
2010-04-22 16:07:53-0700 [Broker,client] in dir /home/buildbot/slave/project/build (timeout 1200 secs)
2010-04-22 16:07:53-0700 [Broker,client] watching logfiles {}
2010-04-22 16:07:53-0700 [Broker,client] argv: ['make', 'clean']
2010-04-22 16:07:53-0700 [Broker,client] environment: {'LANG': 'en_US.UTF-8', 'TERM': 'linux', 'CONSOLE': '/dev/console', 'SHLVL': '4', 'PROJECT_PREFIX': '/home/buildbot/apps', 'RUNLEVEL': '3', 'LC_CTYPE': 'en_US.UTF-8', 'PREVLEVEL': 'N', 'PWD': '/home/buildbot/slave/project/build', 'INIT_VERSION': 'sysvinit-2.86', 'runlevel': '3', 'PATH': '/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/bin', 'SELINUX_INIT': 'YES', 'HOME': '/', '_': '/usr/bin/buildbot', 'previous': 'N'}
2010-04-22 16:07:53-0700 [Broker,client] closing stdin
2010-04-22 16:07:53-0700 [Broker,client] using PTY: True
2010-04-22 16:08:25-0700 [-] command finished with signal None, exit code 0, elapsedTime: 32.461706
It takes 32 seconds if I read it correctly. In real it normally took 2
~ 3 seconds that server is enough fast having 4 core CPU and 8 GB mem.
Is there any reason?
The following is my configuration and messages from the console
- master.cfg -----------------------------------------------------------------
c = BuildmasterConfig = {}
from buildbot.buildslave import BuildSlave
c['slaves'] = [BuildSlave("bot1_PROJECT", "bot1_snrn")]
c['slavePortnum'] = 9989
from buildbot.changes.svnpoller import SVNPoller
c['change_source'] = SVNPoller("file:///home/buildbot/project/main/project",
pollinterval=120,
svnbin='/usr/local/bin/svn')
from buildbot.scheduler import Scheduler
c['schedulers'] = []
c['schedulers'].append(Scheduler(name="all", branch=None,
treeStableTimer=2*60,
builderNames=["PROJECT-main"]))
from buildbot.process import factory
from buildbot.steps.source import SVN
from buildbot.steps.shell import Compile
from buildbot.steps.python_twisted import Trial
f1 = factory.BuildFactory()
f1.addStep(SVN(svnurl="file:///home/buildbot/project/main/project"))
f1.addStep(Compile(command=["/bin/cp", "/home/buildbot/lib/cdngeoip.h", "./include"]))
f1.addStep(Compile(command=["make", "depend"]))
f1.addStep(Compile(command=["make", "clean"], usePTY=True))
f1.addStep(Compile(command=["make"]))
f1.addStep(Compile(command=["make", "install"]))
f1.addStep(Compile(command=["/bin/cp", "/home/buildbot/test.sh", "."]))
f1.addStep(Compile(command=["./test.sh"]))
b1 = {'name': "PROJECT-main",
'slavename': "bot1_PROJECT",
'builddir': "project",
'factory': f1,
'env': { 'PROJECT_PREFIX' : '/home/buildbot/apps' }
}
c['builders'] = [b1]
c['status'] = []
from buildbot.status import html
c['status'].append(html.WebStatus(http_port=8010))
c['projectName'] = "PROJECT"
c['projectURL'] = "http://xxx/projects/project/"
c['buildbotURL'] = "http://xx.xx.xx.xxx:8010/"
- slave/buildbot.tac -------------------------------------------------------
from twisted.application import service
from buildbot.slave.bot import BuildSlave
basedir = r'/home/buildbot/slave'
buildmaster_host = 'localhost'
port = 9989
slavename = 'bot1_PROJECT'
passwd = 'bot1_snrn'
keepalive = 600
usepty = 0
umask = None
maxdelay = 150
rotateLength = 1000000
maxRotatedFiles = None
application = service.Application('buildslave')
try:
from twisted.python.logfile import LogFile
from twisted.python.log import ILogObserver, FileLogObserver
logfile = LogFile.fromFullPath("twistd.log", rotateLength=rotateLength,
maxRotatedFiles=maxRotatedFiles)
application.setComponent(ILogObserver, FileLogObserver(logfile).emit)
except ImportError:
# probably not yet twisted 8.2.0 and beyond, can't set log yet
pass
s = BuildSlave(buildmaster_host, port, slavename, passwd, basedir,
keepalive, usepty, umask=umask, maxdelay=maxdelay)
s.setServiceParent(application)
- message from console ----------------------------------------------------
[root at eng-20 buildbot]# ./start.sh
Following twistd.log until startup finished..
/usr/lib/python2.4/site-packages/buildbot/scripts/logwatcher.py:52: PotentialZombieWarning: spawnProcess called, but the SIGCHLD handler is not installed. This probably means you have not yet called reactor.run, or called reactor.run(installSignalHandler=0). You will probably never see this process finish, and it may become a zombie process.
env=os.environ,
2010-04-22 16:19:24-0700 [-] Log opened.
2010-04-22 16:19:24-0700 [-] twistd 8.2.0 (/usr/bin/python 2.4.3) starting up.
2010-04-22 16:19:24-0700 [-] reactor class: twisted.internet.selectreactor.SelectReactor.
2010-04-22 16:19:24-0700 [-] Creating BuildMaster -- buildbot.version: 0.7.12
2010-04-22 16:19:24-0700 [-] loading configuration from /home/buildbot/master/master.cfg
2010-04-22 16:19:25-0700 [-] adding new builder PROJECT-main for category None
2010-04-22 16:19:25-0700 [-] trying to load status pickle from /home/buildbot/master/porject/builder
2010-04-22 16:19:25-0700 [-] added builder PROJECT-main in category None
2010-04-22 16:19:25-0700 [-] adding IStatusReceiver <WebStatus on port tcp:8010 at 0x1e35cb00>
2010-04-22 16:19:25-0700 [-] twisted.web.server.Site starting on 8010
2010-04-22 16:19:25-0700 [-] Starting factory <twisted.web.server.Site instance at 0x1e35cc20>
2010-04-22 16:19:25-0700 [-] WebStatus using (/home/buildbot/master/public_html)
2010-04-22 16:19:25-0700 [-] adding IStatusReceiver <buildbot.status.mail.MailNotifier instance at 0x1e522248>
2010-04-22 16:19:25-0700 [-] adding 1 new schedulers, removed 0
2010-04-22 16:19:25-0700 [-] notifying downstream schedulers of changes
2010-04-22 16:19:25-0700 [-] adding 1 new changesources, removing 0
2010-04-22 16:19:25-0700 [-] SVNPoller(file:///home/buildbot/project/main/) starting
2010-04-22 16:19:25-0700 [-] twisted.spread.pb.PBServerFactory starting on 9989
2010-04-22 16:19:25-0700 [-] Starting factory <twisted.spread.pb.PBServerFactory instance at 0x2b7e99470710>
2010-04-22 16:19:25-0700 [-] BuildMaster listening on port tcp:9989
2010-04-22 16:19:25-0700 [-] configuration update started
2010-04-22 16:19:25-0700 [-] configuration update complete
The buildmaster appears to have (re)started correctly.
Following twistd.log until startup finished..
/usr/lib/python2.4/site-packages/buildbot/scripts/logwatcher.py:52: PotentialZombieWarning: spawnProcess called, but the SIGCHLD handler is not installed. This probably means you have not yet called reactor.run, or called reactor.run(installSignalHandler=0). You will probably never see this process finish, and it may become a zombie process.
env=os.environ,
2010-04-22 16:19:25-0700 [-] Log opened.
2010-04-22 16:19:25-0700 [-] twistd 8.2.0 (/usr/bin/python 2.4.3) starting up.
2010-04-22 16:19:25-0700 [-] reactor class: twisted.internet.selectreactor.SelectReactor.
2010-04-22 16:19:25-0700 [-] Starting factory <buildbot.slave.bot.BotFactory instance at 0x2b790f452ef0>
2010-04-22 16:19:25-0700 [Broker,client] message from master: attached
The buildslave appears to have (re)started correctly.
regards,
Weongyo Jeong
More information about the devel
mailing list