curl-and-python

Re: pycurl.error: (55, 'select/poll returned error')

From: Nagy László Zsolt via curl-and-python <curl-and-python_at_cool.haxx.se>
Date: Thu, 1 Sep 2016 15:58:18 +0200

> curl.perform()
> pycurl.error: (55, 'select/poll returned error')
I have created a test application that demonstrates the problem. It was
attached to this email.

Test results for FreeBSD
====================

First I have tried with plain http server with both small and large
(8GB) files. All of them worked fine.
Then I have tried https connection to https://httpbin.org/post test
site. It worked from FreeBSD, also with >8GB files.
Then I have tried to post to my original server, which is written in
python + tornadoweb. <2GB it works, but for >2GB files it gives me this
select/poll error.
Finally, I have tried http to tornadoweb based server, and >2GB did not
work. So it seem to be unrelated to openssl or https.

Very interesting thing is that there is no error on the server side
(tornado) at all. I have also tried to set a https socket on the server
side, and connect to it with http from the pycurl side. In that case, I
got an error on both sides.

The server said: WARNING:tornado.general:SSL Error on 9
('185.27.60.106', 24387): [SSL: HTTP_REQUEST] http request (_ssl.c:600)
The client said: pycurl.error: (52, 'Empty reply from server')

It indicates that the SSL handshake is successful. But after that,
something bad happens, the server (or maybe the client???) terminates
the connection, and on the server side the error is not logged at all
(even if I set application's debug=True)

Do you think that I should post this error to the tornado developer
group? Or is it something that needs to be addressed on the pycurl side?
(I doubt.)

Test results for Windows
======================

Windows 10 + Python 3.5.2 + ('PycURL/7.19.5.1 libcurl/7.37.0
OpenSSL/1.0.2d zlib/1.2.8') refused to post anything over 2GB. It did
not work for plain http, nor https.
Here is the traceback:

C:\Temp\test>test.py
Traceback (most recent call last):
  File "C:\Temp\test\test.py", line 126, in <module>
    server_crt=TEST_CERT
  File "C:\Temp\test\test.py", line 106, in post
    return self._perform(c)
  File "C:\Temp\test\test.py", line 64, in _perform
    curl.perform()
pycurl.error: (43, '')

There is no error message to the pycurl error, just an error code 43.
I'm not sure what it means, but one thing is sure: it should work.

If you use a test file less than 2GB, then it works as expected. I don't
see any documentation in pycurl about being limited to 2GB on windows.

Did I just find two bugs instead of one?

Can somebody please confirm that posting >2GB files does not work from
windows?

Thanks,

   Laci

_______________________________________________
https://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-python

Received on 2016-09-01