-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
test_web_seed_http and test_url_seed #4211
Comments
the second patch seems reasonable. I would prefer to set the timeout to much higher value though. I'm worried about tests leaving the python process running indefinitely otherwise. The first test, as you suspect, disables the test for HTTP/1 servers. i.e. where the server closes the connection after each request. What exactly happens to cause the test to fail? is it the python program that terminates on the line |
I resolved test_url_seed.
It successfully runs url-seed_ssl_keepalive. Then, at url_seed_ssl it throws a SIGPIPE, so it never gets to run any test after url_seed_ssl. I investigated in gdb and here are the relevant parts of the backtrace with "Connection reset by peer."
I patched OpenBSD boost asio's socket_ops.ipp. It uses MSG_NOSIGNAL in the flags to sendmsg. From sendmsg(2):
This gracefully handles the HTTP/1 server behavior of closing the connection after each request. Thanks for this helpful hint. With this test_url_seed passes. /usr/local/include/boost/asio/detail/impl/socket_ops.ipp
patched with:
Unfortunately, test_web_seed_http still fails when I extend the timeout. I will keep poking at it.
|
ah, interesting. My impression is that asio is supposed to disable @namtsui please upstream this patch to asio. Also, do you know if there are any flavours or older versions of BSD (worth considering) that do not support the @chriskohlhoff ping, seems like an asio issue on BSD, I suspect other flavours too. |
I think this issue may be related to the memory leak reported here: qbittorrent/qBittorrent#12326 |
Please provide the following information
libtorrent version (or branch): 1.2.3
platform/architecture: OpenBSD/amd64
compiler and compiler version: clang 8.0.1
please describe what symptom you see, what you would expect to see instead and
how to reproduce it.
I have patches to get test_web_seed_http* and test_url_seed unit tests to pass. unit test report on OpenBSD
In libtorrent-rasterbar, two types of HTTP seeding are supported. "URL
seed" implements BEP 19 and "HTTP seed" implements BEP 17. HTTP seeding
is when a HTTP server assists in the seeding.
Sources:
https://www.libtorrent.org/manual.html#http-seeding
http://www.getright.com/seedtorrent.html
http://bittorrent.org/beps/bep_0019.html
http://bittorrent.org/beps/bep_0017.html
test_url_seed tries to run:
test_url_seed manages to run url_seed_ssl_keepalive correctly and then once it gets to url_seed_ssl, which does not use keepalive, it silently returns. I found that it quits at send_header("Connection", "close").
`patch-test_web_server_py' fixes url seed tests as explained in the
diff. This allows the test_url_seed test to "pass," but I am very unsure of this patch.
test_web_seed_http tests fail. `patch-test_http_py' fixes these by making the socket timeout by the default "None." This makes it blocking. I feel more confident about this patch.
https://docs.python.org/3/library/socket.html#socket-timeouts
The text was updated successfully, but these errors were encountered: