Mysterious and irritating problem with Mercurial/Buildbot integration

Mads Kiilerich mads at kiilerich.com
Fri Nov 15 19:30:20 UTC 2013


On 11/15/2013 12:00 PM, Bob Hood wrote:
> We updated Mercurial a while back to 2.5.2.  When this happened, our
> changehook with Buildbot began having issues, and commit detection for
> Buildbot through the changehook has been spotty.  I've tried and tried to
> track this down, and I simply cannot figure out where the issue is.  I'm
> hoping an additional set of eyes from the good folks here might help.
>
> - We are using Python 2.7.2
> - We are running Mercurial 2.5.2 through Apache2 using hgwebdir.
> - We are using Buildbot 0.8.8, with "easy_install"s of:
>      - zope.interface 4.0.5
>      - Twisted 13.2.0
>      - SQLAlchemy 0.7.10 (recommended for 0.8.8)
>      - sqlalchemy_migrate 0.7.1
>
> When pushes happen to the central repository (via Apache2), we keep getting this:
>
>      [CS1.0.1] $ hg push
>      ...
>      remote: adding changesets
>      remote: adding manifests
>      remote: adding file changes
>      remote: added 1 changesets with 1 changes to 1 files
>      remote: error: changegroup.buildbot hook raised an exception:

What hook configuration do you have?

Can you reproduce the problem when running 'hg serve --config ...' in 
the right environment?

> Before I updated Twisted, this was occurring occasionally:
>
>      ...
>      remote: adding changesets
>      remote: adding manifests
>      remote: adding file changes
>      remote: added 1 changesets with 3 changes to 3 files
>      remote: Unhandled Error
>      remote: Traceback (most recent call last):
>      remote:   File
> "/usr/local/lib/python2.7/dist-packages/Twisted-12.0.0-py2.7-linux-x86_64.egg/twisted/internet/base.py",
> line 413, in fireEvent
>      remote:     DeferredList(beforeResults).addCallback(self._continueFiring)
>      remote:   File
> "/usr/local/lib/python2.7/dist-packages/Twisted-12.0.0-py2.7-linux-x86_64.egg/twisted/internet/defer.py",
> line 301, in addCallback
>      remote:     callbackKeywords=kw)
>      remote:   File
> "/usr/local/lib/python2.7/dist-packages/Twisted-12.0.0-py2.7-linux-x86_64.egg/twisted/internet/defer.py",
> line 290, in addCallbacks
>      remote:     self._runCallbacks()
>      remote:   File
> "/usr/local/lib/python2.7/dist-packages/Twisted-12.0.0-py2.7-linux-x86_64.egg/twisted/internet/defer.py",
> line 551, in _runCallbacks
>      remote:     current.result = callback(current.result, *args, **kw)
>      remote: --- <exception caught here> ---
>      remote:   File
> "/usr/local/lib/python2.7/dist-packages/Twisted-12.0.0-py2.7-linux-x86_64.egg/twisted/internet/base.py",
> line 426, in _continueFiring
>      remote:     callable(*args, **kwargs)
>      remote:   File
> "/usr/local/lib/python2.7/dist-packages/Twisted-12.0.0-py2.7-linux-x86_64.egg/twisted/internet/base.py",
> line 1164, in _reallyStartRunning
>      remote:     self._handleSignals()
>      remote:   File
> "/usr/local/lib/python2.7/dist-packages/Twisted-12.0.0-py2.7-linux-x86_64.egg/twisted/internet/posixbase.py",
> line 298, in _handleSignals
>      remote:     self._childWaker.install()
>      remote:   File
> "/usr/local/lib/python2.7/dist-packages/Twisted-12.0.0-py2.7-linux-x86_64.egg/twisted/internet/posixbase.py",
> line 212, in install
>      remote:     _signals.installHandler(self.o)
>      remote:   File
> "/usr/local/lib/python2.7/dist-packages/Twisted-12.0.0-py2.7-linux-x86_64.egg/twisted/internet/_signals.py",
> line 132, in _installHandlerUsingSetWakeup
>      remote:     return set_wakeup_fd(fd)
>      remote: exceptions.ValueError: set_wakeup_fd only works in main thread
>      remote: rev 6c3184c288cfc696668bf761411588f103d34c87 sent

It looks like you are running hg in a multi threaded environment and use 
a python hook that cannot handle that.

/Mads



More information about the Mercurial mailing list