Skip to content

Wait for connection_lost in StreamWriter.drain #80982

Open

Description

@asvetlov
BPO 36801
Nosy @vstinner, @asvetlov, @1st1, @miss-islington
PRs
  • bpo-36801: Fix waiting in StreamWriter.drain for closing SSL transport #13098
  • [3.7] bpo-36801: Fix waiting in StreamWriter.drain for closing SSL transport (GH-13098) #13176
  • [3.7] Revert "bpo-36801: Fix waiting in StreamWriter.drain for closing SSL transport (GH-13098)" #13328
  • Revert "bpo-36801: Fix waiting in StreamWriter.drain for closing SSL transport (GH-13098)" #13329
  • bpo-36801: Temporarily fix regression in writer.drain() #13330
  • 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 = None
    created_at = <Date 2019-05-05.13:44:32.210>
    labels = ['3.8', 'type-bug', '3.7', 'expert-asyncio']
    title = 'Wait for connection_lost in StreamWriter.drain'
    updated_at = <Date 2019-05-14.21:39:18.302>
    user = 'https://github.com/asvetlov'

    bugs.python.org fields:

    activity = <Date 2019-05-14.21:39:18.302>
    actor = 'asvetlov'
    assignee = 'none'
    closed = False
    closed_date = None
    closer = None
    components = ['asyncio']
    creation = <Date 2019-05-05.13:44:32.210>
    creator = 'asvetlov'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 36801
    keywords = ['patch']
    message_count = 6.0
    messages = ['341445', '341820', '341834', '342513', '342516', '342521']
    nosy_count = 4.0
    nosy_names = ['vstinner', 'asvetlov', 'yselivanov', 'miss-islington']
    pr_nums = ['13098', '13176', '13328', '13329', '13330']
    priority = 'normal'
    resolution = None
    stage = 'patch review'
    status = 'open'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue36801'
    versions = ['Python 3.7', 'Python 3.8']

    Activity

    1. asvetlov commented on May 5, 2019

      @asvetlov
      ContributorAuthor

      Now await writer.drain() performs await sleep(0) if underlying transport is closing.

      It works well only for plain sockets. SSL transport needs more context switches to shut down the SSL connection.
      Drain wakes up too early to check if the transport is actually closed.

    2. miss-islington commented on May 7, 2019

      @miss-islington
      Contributor

      New changeset 1cc0ee7 by Miss Islington (bot) (Andrew Svetlov) in branch 'master':
      bpo-36801: Fix waiting in StreamWriter.drain for closing SSL transport (GH-13098)
      1cc0ee7

    3. miss-islington commented on May 7, 2019

      @miss-islington
      Contributor

      New changeset 93aa57a by Miss Islington (bot) in branch '3.7':
      bpo-36801: Fix waiting in StreamWriter.drain for closing SSL transport (GH-13098)
      93aa57a

    4. asvetlov commented on May 14, 2019

      @asvetlov
      ContributorAuthor

      Looks like the change introduced by the PR is not stable at least on Windows boxes

    5. vstinner commented on May 14, 2019

      @vstinner
      Member

      New changeset c647ad9 by Victor Stinner in branch '3.7':
      Revert "bpo-36801: Fix waiting in StreamWriter.drain for closing SSL transport (GH-13098)" (GH-13328)
      c647ad9

    6. asvetlov commented on May 14, 2019

      @asvetlov
      ContributorAuthor

      New changeset 54b74fe by Andrew Svetlov in branch 'master':
      bpo-36801: Temporarily fix regression in writer.drain() (bpo-13330)
      54b74fe

    7. transferred this issue fromon Apr 10, 2022
    8. kumaraditya303 commented on Sep 25, 2022

      @kumaraditya303
      Contributor

      Seems like the fix was committed but then reverted as buildbots were failing so there is still work left to do here.

    9. added
      3.11only security fixes
      3.12only security fixes
      and removed on Sep 25, 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

      Labels

      3.10 (EOL)end of life3.11only security fixes3.12only security fixestopic-asynciotype-bugAn unexpected behavior, bug, or error

      Projects

      • Status
        Todo

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions