GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — _ProactorBasePipeTransport.abort() after _ProactorBasePipeTransport.close() does not cancel writes · Issue #88594 · python/cpython

_ProactorBasePipeTransport.abort() after _ProactorBasePipeTransport.close() does not cancel writes #88594

New issue
Copy link
New issue
Copy link
Closed as not planned
Closed as not planned
_ProactorBasePipeTransport.abort() after _ProactorBasePipeTransport.close() does not cancel writes#88594
Copy link
Labels
3.10 (EOL)end of lifeend of life3.11only security fixesonly security fixes3.12only security fixesonly security fixestopic-asyncio

Description

graingert
mannequin
opened on Jun 15, 2021
Issue body actions
BPO 44428
Nosy @gvanrossum, @asvetlov, @ambv, @1st1, @graingert

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 2021-06-15.21:00:19.644>
labels = ['3.8', '3.9', '3.10', 'expert-asyncio']
title = '_ProactorBasePipeTransport.abort() after _ProactorBasePipeTransport.close() does not cancel writes'
updated_at = <Date 2021-07-12.16:40:18.078>
user = 'https://github.com/graingert'

bugs.python.org fields:

activity = <Date 2021-07-12.16:40:18.078>
actor = 'graingert'
assignee = 'none'
closed = False
closed_date = None
closer = None
components = ['asyncio']
creation = <Date 2021-06-15.21:00:19.644>
creator = 'graingert'
dependencies = []
files = []
hgrepos = []
issue_num = 44428
keywords = []
message_count = 2.0
messages = ['395896', '396558']
nosy_count = 5.0
nosy_names = ['gvanrossum', 'asvetlov', 'lukasz.langa', 'yselivanov', 'graingert']
pr_nums = []
priority = 'normal'
resolution = None
stage = None
status = 'open'
superseder = None
type = None
url = 'https://bugs.python.org/issue44428'
versions = ['Python 3.8', 'Python 3.9', 'Python 3.10']

Activity

  1. graingert commented on Jun 15, 2021

    @graingert
    graingertmannequin
    on Jun 15, 2021
    MannequinAuthor
    More actions

    demo program:

    import asyncio
    import socket
    import threading
    
    async def amain():
        family = socket.AddressFamily.AF_INET
        sock = socket.socket(family, socket.SOCK_STREAM)
        sock.settimeout(1)
        sock.bind(('localhost', 0))
        sock.listen()
        host, port = sock.getsockname()[:2]
    
        event = threading.Event()
    
        def serve():
            client, _ = sock.accept()
            with client:
                client.recv(1)
                event.wait()
    
        t = threading.Thread(target=serve, daemon=True)
        t.start()
    
        reader, writer = await asyncio.open_connection(host=host, port=port)
        try:
            while True:
                writer.write(b"\x00" * 4096 * 682 * 2)
                await asyncio.wait_for(writer.drain(), 2)
                print("wrote")
        except asyncio.TimeoutError:
            print("timed out")
    
        writer.close()
        await asyncio.sleep(0)
        writer.transport.abort()
        print("waiting close")
        await writer.wait_closed()  # never finishes on ProactorEventLoop
        print("closed")
        event.set()
        t.join()
    
    asyncio.run(amain())

    it looks like it was fixed for the selector eventloop in 2546a17

    but not for the proactor https://github.com/python/cpython/blame/8fe57aacc7bf9d9af84803b69dbb1d66597934c6/Lib/asyncio/proactor_events.py#L140

  2. graingert
    added
    3.8 (EOL)end of lifeend of life
    3.9 (EOL)end of lifeend of life
    3.10 (EOL)end of lifeend of life
    topic-asyncio
    on Jun 15, 2021
  3. graingert commented on Jun 26, 2021

    @graingert
    graingertmannequin
    on Jun 26, 2021
    MannequinAuthor
    More actions

    nosying the author of the selector_events fix

  4. ezio-melotti
    transferred this issue fromon Apr 10, 2022
  5. kumaraditya303 commented on Jul 9, 2022

    @kumaraditya303
    kumaraditya303
    on Jul 9, 2022
    Contributor
    More actions

    @gvanrossum Do you recall the details as you fixed the selector event loop race ?

  6. kumaraditya303
    added
    3.11only security fixesonly security fixes
    3.12only security fixesonly security fixes
    and removed
    3.9 (EOL)end of lifeend of life
    3.8 (EOL)end of lifeend of life
    on Jul 9, 2022
  7. gvanrossum commented on Jul 10, 2022

    @gvanrossum
    gvanrossum
    on Jul 10, 2022
    Member
    More actions

    Sorry, you're on your own here. I have no recollection of this fix.

  8. ezio-melotti
    added this to asyncioon Jul 17, 2022
  9. ezio-melotti
    moved this to Todo in asyncioon Jul 17, 2022
  10. kumaraditya303 commented on Oct 23, 2022

    @kumaraditya303
    kumaraditya303
    on Oct 23, 2022
    Contributor
    More actions

    Duplicate of #89237

  11. kumaraditya303
    marked this as a duplicate of asyncio hang in subprocess wait_closed() on Windows, BrokenPipeError #89237 on Oct 23, 2022
  12. kumaraditya303
    closed this as not plannedon Oct 23, 2022
  13. Repository owner moved this from Todo to Done in asyncioon Oct 23, 2022
  14. kumaraditya303 commented on Oct 23, 2022

    @kumaraditya303
    kumaraditya303
    on Oct 23, 2022
    Contributor
    More actions

    #98572 fixes this

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 lifeend of life3.11only security fixesonly security fixes3.12only security fixesonly security fixestopic-asyncio

    Projects

    • asyncio
      Status
      Done
      Show more project fields

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402520 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.