Skip to content
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

Wait for connection_lost in StreamWriter.drain #80982

Open
asvetlov opened this issue May 5, 2019 · 7 comments
Open

Wait for connection_lost in StreamWriter.drain #80982

asvetlov opened this issue May 5, 2019 · 7 comments
Labels
3.10 only security fixes 3.11 only security fixes 3.12 bugs and security fixes topic-asyncio type-bug An unexpected behavior, bug, or error

Comments

@asvetlov
Copy link
Contributor

asvetlov commented May 5, 2019

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']

    @asvetlov
    Copy link
    Contributor Author

    asvetlov commented May 5, 2019

    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.

    @asvetlov asvetlov added 3.8 only security fixes topic-asyncio type-bug An unexpected behavior, bug, or error 3.7 (EOL) end of life labels May 5, 2019
    @miss-islington
    Copy link
    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

    @asvetlov asvetlov closed this as completed May 7, 2019
    @miss-islington
    Copy link
    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

    @asvetlov
    Copy link
    Contributor Author

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

    @asvetlov asvetlov reopened this May 14, 2019
    @vstinner
    Copy link
    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

    @asvetlov
    Copy link
    Contributor Author

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

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    @kumaraditya303
    Copy link
    Contributor

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

    @kumaraditya303 kumaraditya303 added 3.11 only security fixes 3.10 only security fixes 3.12 bugs and security fixes and removed 3.8 only security fixes 3.7 (EOL) end of life labels Sep 25, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.10 only security fixes 3.11 only security fixes 3.12 bugs and security fixes topic-asyncio type-bug An unexpected behavior, bug, or error
    Projects
    Status: Todo
    Development

    No branches or pull requests

    4 participants