This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author wiedi
Recipients wiedi
Date 2020-11-01.20:07:47
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1604261267.98.0.369045235153.issue42237@roundup.psfhosted.org>
In-reply-to
Content
I'm investigating some test failures related to sendfile on illumos:


testCount (test.test_socket.SendfileUsingSendfileTest) ... FAIL
testCountSmall (test.test_socket.SendfileUsingSendfileTest) ... ok
testCountWithOffset (test.test_socket.SendfileUsingSendfileTest) ... ok
testEmptyFileSend (test.test_socket.SendfileUsingSendfileTest) ... ok
testNonBlocking (test.test_socket.SendfileUsingSendfileTest) ... ok
testNonRegularFile (test.test_socket.SendfileUsingSendfileTest) ... ok
testOffset (test.test_socket.SendfileUsingSendfileTest) ... ERROR
testRegularFile (test.test_socket.SendfileUsingSendfileTest) ... ok
testWithTimeout (test.test_socket.SendfileUsingSendfileTest) ... FAIL
testWithTimeoutTriggeredSend (test.test_socket.SendfileUsingSendfileTest) ... ok
test_errors (test.test_socket.SendfileUsingSendfileTest) ... ok

======================================================================
ERROR: testOffset (test.test_socket.SendfileUsingSendfileTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/root/cpython/Lib/socket.py", line 386, in _sendfile_use_sendfile
    sent = os_sendfile(sockno, fileno, offset, blocksize)
OSError: [Errno 22] Invalid argument

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/root/cpython/Lib/test/test_socket.py", line 374, in _tearDown
    raise exc
  File "/root/cpython/Lib/test/test_socket.py", line 392, in clientRun
    test_func()
  File "/root/cpython/Lib/test/test_socket.py", line 6057, in _testOffset
    sent = meth(file, offset=5000)
  File "/root/cpython/Lib/socket.py", line 399, in _sendfile_use_sendfile
    raise _GiveupOnSendfile(err)
socket._GiveupOnSendfile: [Errno 22] Invalid argument

======================================================================
FAIL: testCount (test.test_socket.SendfileUsingSendfileTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/root/cpython/Lib/test/test_socket.py", line 6085, in testCount
    self.assertEqual(len(data), count)
AssertionError: 5405948743 != 5000007

======================================================================
FAIL: testWithTimeout (test.test_socket.SendfileUsingSendfileTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/root/cpython/Lib/test/test_socket.py", line 6159, in testWithTimeout
    self.assertEqual(len(data), self.FILESIZE)
AssertionError: 429006848 != 10485760

----------------------------------------------------------------------
Ran 11 tests in 33.603s

FAILED (failures=2, errors=1)


Looking at the testCount case I could observe repeated calls to sendfile() with out_fd=7, in_fd=6 off=0, len=5000007 which returned -1 with errno set to EAGAIN.
History
Date User Action Args
2020-11-01 20:07:48wiedisetrecipients: + wiedi
2020-11-01 20:07:47wiedisetmessageid: <1604261267.98.0.369045235153.issue42237@roundup.psfhosted.org>
2020-11-01 20:07:47wiedilinkissue42237 messages
2020-11-01 20:07:47wiedicreate