New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
os.sendfile() bo failure on solaris #55532
Comments
Committed in r88616. |
It still fails under AMD64 OpenIndiana: ====================================================================== Traceback (most recent call last):
File "/export/home/buildbot/64bits/3.x.cea-indiana-amd64/build/Lib/test/test_os.py", line 1473, in test_offset_overflow
sent = os.sendfile(self.sockno, self.fileno, offset, 4096)
OSError: [Errno 22] Invalid argument ====================================================================== Traceback (most recent call last):
File "/export/home/buildbot/64bits/3.x.cea-indiana-amd64/build/Lib/test/test_os.py", line 1456, in test_send_at_certain_offset
sent = self.sendfile_wrapper(self.sockno, self.fileno, offset, nbytes)
File "/export/home/buildbot/64bits/3.x.cea-indiana-amd64/build/Lib/test/test_os.py", line 1419, in sendfile_wrapper
return os.sendfile(sock, file, offset, nbytes)
OSError: [Errno 22] Invalid argument ====================================================================== Traceback (most recent call last):
File "/export/home/buildbot/64bits/3.x.cea-indiana-amd64/build/Lib/test/test_os.py", line 1436, in test_send_whole_file
sent = self.sendfile_wrapper(self.sockno, self.fileno, offset, nbytes)
File "/export/home/buildbot/64bits/3.x.cea-indiana-amd64/build/Lib/test/test_os.py", line 1419, in sendfile_wrapper
return os.sendfile(sock, file, offset, nbytes)
OSError: [Errno 22] Invalid argument According to the man page, EINVAL means:
|
Ok, so the root cause is that sendfile() under Solaris can fail with EINVAL when the offset is past the end of file (but only on 64-bit builds, strangely :-)). Here is a patch, tested under Linux, 32-bit OpenSolaris and 64-bit OpenSolaris. It also uses a more reasonable data size for the tests, since 10MB makes it annoying to trace problems. |
Should be fixed in r88647. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: