[Buildbot-commits] [Buildbot] #2145: UnicodeDecodeError on buildslave in runprocess.py

Buildbot nobody at buildbot.net
Sun Nov 13 06:19:38 UTC 2011


#2145: UnicodeDecodeError on buildslave in runprocess.py
----------------------+---------------------------------
Reporter:  mitchellh  |      Owner:
    Type:  defect     |     Status:  new
Priority:  blocker    |  Milestone:  undecided
 Version:  0.8.5      |   Keywords:  unicode, bug, slave
----------------------+---------------------------------
 Hello,

 I've setup a fairly simple BuildBot 0.8.5 installation. Along with this
 I've setup the GitHub post-receive hook for the WebStatus status hook, and
 I've setup my GitHub project to push to this. When I do this, every build
 results in the following stack trace:

 {{{
 2011-11-12 22:08:02-0800 [-] unexpected error in processEnded
         Traceback (most recent call last):
           File
 "/Users/mitchellh/code/personal/ruby/vagrant/test/buildbot/env/lib/python2.7
 /site-packages/twisted/internet/abstract.py", line 262, in
 readConnectionLost
             self.connectionLost(reason)
           File
 "/Users/mitchellh/code/personal/ruby/vagrant/test/buildbot/env/lib/python2.7
 /site-packages/twisted/internet/process.py", line 275, in connectionLost
             self.proc.childConnectionLost(self.name, reason)
           File
 "/Users/mitchellh/code/personal/ruby/vagrant/test/buildbot/env/lib/python2.7
 /site-packages/twisted/internet/process.py", line 903, in
 childConnectionLost
             self.maybeCallProcessEnded()
           File
 "/Users/mitchellh/code/personal/ruby/vagrant/test/buildbot/env/lib/python2.7
 /site-packages/twisted/internet/process.py", line 916, in
 maybeCallProcessEnded
             _BaseProcess.maybeCallProcessEnded(self)
         --- <exception caught here> ---
           File
 "/Users/mitchellh/code/personal/ruby/vagrant/test/buildbot/env/lib/python2.7
 /site-packages/twisted/internet/_baseprocess.py", line 60, in
 maybeCallProcessEnded
             proto.processEnded(Failure(reason))
           File
 "/Users/mitchellh/code/personal/ruby/vagrant/test/buildbot/env/lib/python2.7
 /site-packages/buildslave/runprocess.py", line 201, in processEnded
             self.command.finished(sig, rc)
           File
 "/Users/mitchellh/code/personal/ruby/vagrant/test/buildbot/env/lib/python2.7
 /site-packages/buildslave/runprocess.py", line 662, in finished
             self._sendBuffers()
           File
 "/Users/mitchellh/code/personal/ruby/vagrant/test/buildbot/env/lib/python2.7
 /site-packages/buildslave/runprocess.py", line 587, in _sendBuffers
             self._sendMessage(msg)
           File
 "/Users/mitchellh/code/personal/ruby/vagrant/test/buildbot/env/lib/python2.7
 /site-packages/buildslave/runprocess.py", line 557, in _sendMessage
             msg = self._collapseMsg(msg)
           File
 "/Users/mitchellh/code/personal/ruby/vagrant/test/buildbot/env/lib/python2.7
 /site-packages/buildslave/runprocess.py", line 544, in _collapseMsg
             data = "".join(msg[k])
         exceptions.UnicodeDecodeError: 'ascii' codec can't decode byte
 0xe2 in position 1494: ordinal not in range(128)
 }}}

 I added some logging before the line which errors to output the string,
 and this is what is causing problems. The `msg` variable looks like this:

 {{{
 {'header': [u'git reset --hard
 b62d7c317c0b39896169e0529540abdd817305f8\n', ' in dir
 /Users/mitchellh/code/personal/ruby/vagrant/test/buildbot/slave/vagrant-
 master-unit/build (timeout 1200 secs)\n', ... }
 }}}

 Notice that the first element is for some reason a unicode object while
 the remainders are regular str objects. This causes the `"".join` to fail.

 Oddly, this does not happen when I force a build manually. I'm not sure
 how this happens, but it is blocking my hook from working at all.

 Best,
 Mitchell

-- 
Ticket URL: <http://trac.buildbot.net/ticket/2145>
Buildbot <http://buildbot.net/>
Buildbot: build/test automation


More information about the Commits mailing list