execnet icon indicating copy to clipboard operation
execnet copied to clipboard

pytest-xdist slave fail on Interrupted system call

Open pytestbot opened this issue 8 years ago • 1 comments

  • Bitbucket: https://bitbucket.org/hpk42/execnet/issue/6
  • Originally reported by: @memedough
  • Originally created at: 2012-04-14T03:00:30.080

Hi,

I get IOError Interrupted system call in pytest-xdist slave. Don't know why, can't see signal anywhere but fail

creating slavegateway on <__main__.Popen2IO instance at 0x20fa2d8>
RECEIVERTHREAD: starting to run
received <Message.CHANNEL_EXEC channelid=1 len=285>
received <Message.CHANNEL_DATA channelid=1 len=123>
execution starts[1]: "\nimport os\npath, nice, env = channel.receive()\
execution finished
sent <Message.CHANNEL_CLOSE channelid=1 >
1 sent channel close message
received <Message.CHANNEL_EXEC channelid=3 len=210>
1 channel.__del__
execution starts[3]: '\nimport sys, os\nchannel.send(dict(\n    executa
sent <Message.CHANNEL_DATA channelid=3 len=295>
execution finished
sent <Message.CHANNEL_CLOSE channelid=3 >
3 sent channel close message
received <Message.CHANNEL_EXEC channelid=5 len=5308>
3 channel.__del__
execution starts[5]: '"""\n    This module is executed in remote subpro
received <Message.CHANNEL_DATA channelid=5 len=1492>
RECEIVERTHREAD Traceback (most recent call last):
 File "<string>", line 622, in _thread_receiver
 File "<string>", line 802, in load
 File "<string>", line 86, in read
IOError: [Errno 4] Interrupted system call

RECEIVERTHREAD entering finalization
RECEIVERTHREAD leaving finalization
sent <Message.CHANNEL_DATA channelid=5 len=451>
sent <Message.CHANNEL_DATA channelid=5 ('collectionstart', {})>
sent <Message.CHANNEL_DATA channelid=5 len=115>
sent <Message.CHANNEL_DATA channelid=5 len=163>
sent <Message.CHANNEL_DATA channelid=5 len=244>
sent <Message.CHANNEL_DATA channelid=5 len=53>

gateway_base.Unserializer.load(self) can be made work by retry if get IOError with errno == 4

while True:
    opcode = self.stream.read(1)  # Retry this if IOError raised here
    if not opcode:
        raise EOFError

pytestbot avatar Jul 21 '17 10:07 pytestbot

Original comment by @RonnyPfannschmidt

indeed, pre python3.4 there can be interupted system calls - wrappers are required

pytestbot avatar Jul 21 '17 10:07 pytestbot