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_asyncio: test_sock_sendfile_mix_with_regular_send() hangs on FreeBSD #77534
Comments
Example with a timeout of 10 seconds: vstinner@freebsd$ ./python -m test -v test_asyncio -m test_sock_sendfile_mix_with_regular_send -v --timeout=10 The test has been introduced in by the commit a19fb3c, bpo-32622. The FreeBSD 3.7 and 3.x buildbots are broken, likely since this commit. |
My change caused a regression on macOS: bpo-33626. I just closed this issue as a duplicate of this one. |
bpo-32708 has been marked as a duplicate of this issue. |
test_asyncio doesn't hang on FreeBSD 3.x buildbot anymore! macOS buildbot is back to green as well. It seems like I can close the issue. |
Hum, the test still fails on AMD64 FreeBSD CURRENT Debug 3.x :-( http://buildbot.python.org/all/#/builders/60/builds/77 test_sock_client_ops (test.test_asyncio.test_events.PollEventLoopTests) ... ok |
Andrew, I'm out of capacity here, could you please take a look when you have time? |
Similar failure on AMD64 FreeBSD CURRENT Non-Debug 3.7: http://buildbot.python.org/all/#/builders/112/builds/62 Timeout (0:15:00)! |
On the previous build, test_asyncio only took 3 min 54 sec: far from the 15 min timeout limit :-( |
On my PR 7200, test_sendfile_close_peer_in_the_middle_of_receiving() fails on Windows (AppVeyor) :-( For the SelectorEventLoop, it seems like sock.setsockopt(socket.SOL_SOCKET, socket.SO_SNDBUF, 1024) doesn't work as intented: sock.send(<16384 bytes>) returns 16384, as the 1024 limit is not taken in account :-( Same issue for the ProactorEventLoop... |
Well, yeah, I kind of expected to see a performance regression here. Before, we were reading from a file directly, which is a blocking operation and can potentially block the event loop. Now we're using a thread pool to do the read, but its more overhead. In this case I think we have to do it the *correct* way, even if it means sacrificing the performance. As a workaround, I propose to rise the read buffer size to 1Mb. |
With my latest change, all sendfile tests pass in 17 sec on my FreeBSD VM, so I think that it's fine. Let's see if this test now always pass on FreeBSD buildbots. |
Tests are maybe not perfect, but the initial issue is fixed: test_asyncio pass again on FreeBSD buildbots. |
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: