[issue11323] os.sendfile() bo failure on solaris

2011-02-25 Thread Giampaolo Rodola'

New submission from Giampaolo Rodola' :

http://www.python.org/dev/buildbot/all/builders/sparc%20solaris10%20gcc%203.x/builds/2658/steps/test/logs/stdio

Patch in attachment.

--
files: sendfile-test.patch
keywords: patch
messages: 129411
nosy: giampaolo.rodola, loewis
priority: normal
severity: normal
status: open
title: os.sendfile() bo failure on solaris
versions: Python 3.3
Added file: http://bugs.python.org/file20892/sendfile-test.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11323] os.sendfile() bo failure on solaris

2011-02-25 Thread Giampaolo Rodola'

Giampaolo Rodola'  added the comment:

Committed in r88616.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11323] os.sendfile() bo failure on solaris

2011-02-26 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

It still fails under AMD64 OpenIndiana:

==
ERROR: test_offset_overflow (test.test_os.TestSendfile)
--
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

==
ERROR: test_send_at_certain_offset (test.test_os.TestSendfile)
--
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

==
ERROR: test_send_whole_file (test.test_os.TestSendfile)
--
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:

 EINVAL  The offset  cannot  be  represented  by  the
 off_t  structure,  or the length is negative
 when cast to ssize_t.

--
nosy: +pitrou

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11323] os.sendfile() bo failure on solaris

2011-02-26 Thread Giampaolo Rodola'

Changes by Giampaolo Rodola' :


--
nosy: +rosslagerwall

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11323] os.sendfile() bo failure on solaris

2011-02-26 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

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.

--
stage:  -> patch review
versions: +Python 3.2 -Python 3.3
Added file: http://bugs.python.org/file20913/test_sendfile.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11323] os.sendfile() bo failure on solaris

2011-02-26 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Should be fixed in r88647.

--
resolution:  -> fixed
stage: patch review -> committed/rejected
status: open -> closed
versions: +Python 3.3 -Python 3.2

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com