Mailing List Archive

[issue29269] test_socket failing in solaris
Dennis Clarke <dclarke@blastwave.org> added the comment:

Well here we are in 2020 and Solaris systems are still running just fine. In fact, some big Fujitsu SPARC systems are running in production for years and years and also, no surprise, this test still fails horrifically on old stable Solaris 10. Python is turning into a piece of supposedly open source software with many commercial interests with their hands inside of it. I am not sure how to get this bug fixed but I can certainly report that it is still broken in 3.7.8 on a very stable and reliable platform.

----------
nosy: +blastwave
versions: +Python 3.7 -Python 3.6

_______________________________________
Python tracker <report@bugs.python.org>
<https://bugs.python.org/issue29269>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[issue29269] test_socket failing in solaris [ In reply to ]
Brian Vandenberg <phantall@gmail.com> added the comment:

Solaris will be around for at least another 10-15 years.

The least you could do is look into it and offer some speculations.

----------

_______________________________________
Python tracker <report@bugs.python.org>
<https://bugs.python.org/issue29269>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[issue29269] test_socket failing in solaris [ In reply to ]
Christian Heimes <lists@cheimes.de> added the comment:

What do you expect us to do? No Python core dev has access to a Solaris machine. We cannot debug the issue and have to rely on external contributions. We have not declared Solaris as unsupported yet because people are still contributing fixes.

If you are looking for wild speculations: I guess Solari' sendfile() is either broken or does not behave like on other platforms.

----------
nosy: +christian.heimes

_______________________________________
Python tracker <report@bugs.python.org>
<https://bugs.python.org/issue29269>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[issue29269] test_socket failing in solaris [ In reply to ]
STINNER Victor <vstinner@python.org> added the comment:

> I am not sure how to get this bug fixed (...)

Someone has to write a fix. You may contact Solaris vendor or a company using Solaris who wants to pay a developer to write a fix.

----------

_______________________________________
Python tracker <report@bugs.python.org>
<https://bugs.python.org/issue29269>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[issue29269] test_socket failing in solaris [ In reply to ]
Brian Vandenberg <phantall@gmail.com> added the comment:

Christian, you did exactly what I needed. Thank you.

I don't have the means to do a git bisect to find where it broke. It wasn't a problem around 3.3 timeframe and I'm not sure when this sendfile stuff was implemented.

The man page for sendfile says "The sendfile() function does not modify the current file pointer of in_fd, (...)". In other words the read pointer for the input descriptor won't be advanced. They expect you to use it like this:

offset = 0;
do {
ret = sendfile(in, out, &offset, len);
} while( ret < 0 && (errno == EAGAIN || errno == EINTR) );

... though making that change in posixmodule.c would break this test severely since the send & receive code is running on the same thread.

In posixmodule.c I don't see anything that attempts to return the number of bytes successfully sent. Since the input file descriptor won't have its read pointer advanced, the variable "offset" must be set to the correct offset value, otherwise it just keeps reading the first 32k of the file that was generated for the test.

----------

_______________________________________
Python tracker <report@bugs.python.org>
<https://bugs.python.org/issue29269>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[issue29269] test_socket failing in solaris [ In reply to ]
Brian Vandenberg <phantall@gmail.com> added the comment:

I accidentally hit submit too early.

I tried changing the code in posixmodule.c to use lseek(), something like the following:

offset = lseek( in, 0, SEEK_CUR );

do {
ret = sendfile(...);
} while( ... );
lseek( in, offset, SEEK_SET );

... however, in addition to readfile not advancing the file pointer it also doesn't seem to cause an EOF condition. In my first attempt at the above I was doing this after the loop:

lseek( in, offset, SEEK_CUR );

... and it just kept advancing the file pointer well beyond the end of the file and sendfile() had absolutely no qualms about reading beyond the end of the file.

I even tried adding a read() after the 2nd lseek to see if I could force an EOF condition but that didn't do it.

----------

_______________________________________
Python tracker <report@bugs.python.org>
<https://bugs.python.org/issue29269>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[issue29269] test_socket failing in solaris [ In reply to ]
Change by STINNER Victor <vstinner@python.org>:


----------
nosy: -vstinner

_______________________________________
Python tracker <report@bugs.python.org>
<https://bugs.python.org/issue29269>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com