pytest-dev / pytest-dev/execnet
pytest-xdist slave fail on Interrupted system call
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 102
- Forks
- 47
- PR merge metrics
- No merged PRs in 30d
Description
- 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
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with gateway_base.Unserializer.load, especially the stream.read(1) call identified in the report, and review how IOError is handled there. Reproduce the pytest-xdist slave failure if possible; done means an Interrupted system call during deserialization no longer aborts the receiver path and normal message processing continues.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- distributed-systems
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100