Skip to content

asyncio: sendfile tests ignore SO_SNDBUF on Windows #77864

Closed

Description

@vstinner
BPO 33683
Nosy @pfmoore, @vstinner, @tjguk, @asvetlov, @zware, @1st1, @zooba

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:

assignee = None
closed_at = <Date 2018-09-19.23:56:26.388>
created_at = <Date 2018-05-29.14:07:11.010>
labels = ['3.8', 'type-feature', 'tests', 'OS-windows', 'expert-asyncio']
title = 'asyncio: sendfile tests ignore SO_SNDBUF on Windows'
updated_at = <Date 2018-09-19.23:56:26.387>
user = 'https://github.com/vstinner'

bugs.python.org fields:

activity = <Date 2018-09-19.23:56:26.387>
actor = 'vstinner'
assignee = 'none'
closed = True
closed_date = <Date 2018-09-19.23:56:26.388>
closer = 'vstinner'
components = ['Tests', 'Windows', 'asyncio']
creation = <Date 2018-05-29.14:07:11.010>
creator = 'vstinner'
dependencies = []
files = []
hgrepos = []
issue_num = 33683
keywords = []
message_count = 2.0
messages = ['318031', '318034']
nosy_count = 7.0
nosy_names = ['paul.moore', 'vstinner', 'tim.golden', 'asvetlov', 'zach.ware', 'yselivanov', 'steve.dower']
pr_nums = []
priority = 'normal'
resolution = 'out of date'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'enhancement'
url = 'https://bugs.python.org/issue33683'
versions = ['Python 3.8']

Activity

  1. vstinner commented on May 29, 2018

    @vstinner
    MemberAuthor

    Follow-up of bpo-33353: On my PR 7200, test_sendfile_close_peer_in_the_middle_of_receiving() failed 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...

    I'm not sure if it's a bug in asyncio, a bug (limitation) of Windows which ignores SO_SNDBUF, or something else...

  2. vstinner commented on May 29, 2018

    @vstinner
    MemberAuthor

    The failure was:

    FAIL: test_sendfile_close_peer_in_the_middle_of_receiving (test.test_asyncio.test_events.ProactorEventLoopTests)
    ----------------------------------------------------------------------

    Traceback (most recent call last):
      File "C:\projects\cpython\lib\test\test_asyncio\test_events.py", line 2506, in test_sendfile_close_peer_in_the_middle_of_receiving
        self.file.tell())
    AssertionError: False is not true : 65536

    --

    In bpo-33353, I worked around the bug in my commit 9551f77 by using a buffer of 128 KiB instead of 64 KiB.

  3. transferred this issue fromon Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions