[Buildbot-devel] Exception in mail.py getting a build log.

Brian Warner warner-buildbot at lothar.com
Sat Nov 5 23:09:58 UTC 2005


> From: Dobes Vandermeer <dobesv at gmail.com>

> I'm getting this exception on a buildbot I'm testing with - I'm not
> sure why.  When I do get it, it doesn't send a mail and it doesn't
> notify any other status clients ...
> 
> Must be something wrong with the log or something.

>             return "".join(self.getChunks([STDOUT, STDERR], onlyText=True))
>           File "C:\work\Tools\PythonLibs\buildbot\status\builder.py", line 318, in _generateChunks
>             p.dataReceived(data)
>           File "C:\work\Tools\PythonLibs\Python24\twisted\protocols\basic.py", line 107, in dataReceived
>             self.transport.loseConnection()
>         exceptions.AttributeError: 'NoneType' object has no attribute 'loseConnection'

I suspect this is an overwised log chunk being delivered to LogFileScanner,
which is a subclass of twisted.protocols.basic.NetstringReceiver . In an
attempt to behave better when some non-netstring sender connects to it, that
base class has a hardwired 100KB limit on the size of the individual
netstrings it will accept.

It's possible that large logfiles which get saved all at once (in particular
derived logfiles, like summaries or lists of just the error messages) would
create a single netstring that violates this limit. If this is the problem,
it will also affect any Waterfall pages that attempt to look at this status
log.

Try setting LogFileScanner.MAX_LENGTH = 10000000 for a moment and see if that
affects the exception. If so, the correct fix will be in LogFile.merge(), and
we will need to split 'text' into smaller pieces before saving them as
netstrings.

I've created bug SF#1349253 to track this. If you find that fix helps things,
let me know and I'll put some time into fixing it properly.

thanks,
 -Brian





More information about the devel mailing list