[Buildbot-devel] gitpoller: repo poll failed: [Failure instance: Traceback: <type 'exceptions.IOError'>: [Errno 4] Interrupted system call

Matisse Enzer menzer at apple.com
Fri Oct 29 19:55:04 UTC 2010


Found this on a twistd site:

http://twistedmatrix.com/trac/wiki/FrequentlyAskedQuestions#IgetInterruptedsystemcallerrorswhenIuseos.popen2.HowdoIreadresultsfromasub-processinTwisted

I get Interrupted system call errors when I use os.popen2. How do I read results from a sub-process in Twisted?

You should be using reactor.spawnProcess (see  interfaces.IReactorProcess.spawnProcess). There's also a convenience function,  getProcessOutput, in twisted.internet.utils.



On Oct 28, 2010, at 9:28 PM, Matisse Enzer wrote:

> Hmm, the 'except' block is NOT getting called when the error occurs.
> So the stack trace is propagating directly from the call to p.communicate without the try/except catching it.
> 
> 
> On Oct 28, 2010, at 9:12 PM, Matisse Enzer wrote:
> 
>> Do you mean this code:
>> 
>>>       # dirty hack - work around EINTR oddness on Mac builder
>>>       while True:
>>>           try:
>>>               output = p.communicate()[0]
>>>               break
>>>           except (OSError, select.error), e:
>>>               if e[0] == errno.EINTR:
>>>                   continue
>>>               else:
>>>                   raise
>>> 
>> 
>> because that's already in the gitpoller.py that we are using. For some reason that's not working.
>> 
>> 
>> I'm adding some logging code to see what the error actually is:
>> 
>>               error_name = errno.errorcode[e[0]]
>>               log.msg('gitpoller: caught exception with errno "%s"' % error_name)
>> 
>> 
>> On Oct 28, 2010, at 5:32 PM, Dustin J. Mitchell wrote:
>> 
>>> On Thu, Oct 28, 2010 at 7:22 PM, Matisse Enzer <menzer at apple.com> wrote:
>>>> Any suggestions folks?
>>> 
>>> I believe you're seeing this bug
>>> http://bugs.python.org/issue1068268
>>> 
>>> The latest version of gitpoller.py has a try/except wrapped around the
>>> p.communicate()[0].  You can probably drop it right into your 0.8.1
>>> install.
>>> 
>>> http://github.com/djmitche/buildbot/blob/master/master/buildbot/changes/gitpoller.py
>>> 
>>> Dustin
> 
> 
> ------------------------------------------------------------------------------
> Nokia and AT&T present the 2010 Calling All Innovators-North America contest
> Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
> $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
> Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
> http://p.sf.net/sfu/nokia-dev2dev
> _______________________________________________
> Buildbot-devel mailing list
> Buildbot-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/buildbot-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://buildbot.net/pipermail/devel/attachments/20101029/a81ad961/attachment.html>


More information about the devel mailing list