This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author fantix
Recipients abacabadabacaba, achimnol, aeros, asvetlov, fantix, lukasz.langa, miss-islington, ned.deily, vstinner, yselivanov
Date 2020-06-14.04:06:57
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1592107618.3.0.00906333628476.issue30064@roundup.psfhosted.org>
In-reply-to
Content
Oh thank you for the clue, that's super helpful! Let me try locally.

This fix PR was originally done to solve a hanging call in a race condition, so the test would hang forever if the fix is not working as expected. The 10 seconds wait_for() is to make sure that we don't end up with a test hanging forever.

If enlarging the timeout works in some of your cases, that really inspires me on a potential cause of the issue in the test. To simulate the race condition specifically for loop.sock_sendall(), I needed a connected socket with a full send buffer so that the next sock_sendall() call would block. To achieve this, I wrote something like this:

    with self.assertRaises(BlockingIOError):
        while True:
            sock.send(b' ' * 5)

And another loop in a subtask to consume the data:

    while not data:
        data = await self.loop.sock_recv(server, 1024)
        data = data.strip()

It might be that it cost too much time in these loops (especially the 2nd one because the logs showed that it was blocked on calling sock_sendall()). But that's just a guess yet, let me add some more debug logs and test locally.
History
Date User Action Args
2020-06-14 04:06:58fantixsetrecipients: + fantix, vstinner, ned.deily, asvetlov, abacabadabacaba, lukasz.langa, yselivanov, achimnol, miss-islington, aeros
2020-06-14 04:06:58fantixsetmessageid: <1592107618.3.0.00906333628476.issue30064@roundup.psfhosted.org>
2020-06-14 04:06:58fantixlinkissue30064 messages
2020-06-14 04:06:57fantixcreate