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

_UnixSubprocessTransport leaks socket pair if Popen fails #79902

Closed
niklasf mannequin opened this issue Jan 11, 2019 · 3 comments
Closed

_UnixSubprocessTransport leaks socket pair if Popen fails #79902

niklasf mannequin opened this issue Jan 11, 2019 · 3 comments
Labels
3.7 only security fixes 3.8 only security fixes performance Performance or resource usage topic-asyncio

Comments

@niklasf
Copy link
Mannequin

niklasf mannequin commented Jan 11, 2019

BPO 35721
Nosy @asvetlov, @1st1, @niklasf, @miss-islington
PRs
  • bpo-35721: Close socket pair if Popen in _UnixSubprocessTransport fails #11553
  • bpo-35721: Close socket pair if Popen in _UnixSubprocessTransport fails #11553
  • bpo-35721: Close socket pair if Popen in _UnixSubprocessTransport fails #11553
  • [3.7] bpo-35721: Close socket pair if Popen in _UnixSubprocessTransport fails (GH-11553) #13439
  • Files
  • subprocess-exec-test.py
  • 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 2019-05-20.12:36:41.379>
    created_at = <Date 2019-01-11.19:24:51.719>
    labels = ['3.8', 'expert-asyncio', '3.7', 'performance']
    title = '_UnixSubprocessTransport leaks socket pair if Popen fails'
    updated_at = <Date 2019-05-20.12:36:41.373>
    user = 'https://github.com/niklasf'

    bugs.python.org fields:

    activity = <Date 2019-05-20.12:36:41.373>
    actor = 'asvetlov'
    assignee = 'none'
    closed = True
    closed_date = <Date 2019-05-20.12:36:41.379>
    closer = 'asvetlov'
    components = ['asyncio']
    creation = <Date 2019-01-11.19:24:51.719>
    creator = 'niklasf'
    dependencies = []
    files = ['48043']
    hgrepos = []
    issue_num = 35721
    keywords = ['patch', 'patch', 'patch']
    message_count = 3.0
    messages = ['333501', '342904', '342906']
    nosy_count = 4.0
    nosy_names = ['asvetlov', 'yselivanov', 'niklasf', 'miss-islington']
    pr_nums = ['11553', '11553', '11553', '13439']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'resource usage'
    url = 'https://bugs.python.org/issue35721'
    versions = ['Python 3.7', 'Python 3.8']

    @niklasf
    Copy link
    Mannequin Author

    niklasf mannequin commented Jan 11, 2019

    Output of attached test case:

    non-existing indeed
    subprocess-exec-test.py:11: ResourceWarning: unclosed <socket.socket fd=6, family=AddressFamily.AF_UNIX, type=SocketKind.SOCK_STREAM, proto=0>
    print("non-existing indeed")
    ResourceWarning: Enable tracemalloc to get the object allocation traceback
    subprocess-exec-test.py:11: ResourceWarning: unclosed <socket.socket fd=7, family=AddressFamily.AF_UNIX, type=SocketKind.SOCK_STREAM, proto=0>
    print("non-existing indeed")
    ResourceWarning: Enable tracemalloc to get the object allocation traceback
    .
    ----------------------------------------------------------------------
    Ran 1 test in 0.007s

    OK

    @niklasf niklasf mannequin added 3.8 only security fixes topic-asyncio performance Performance or resource usage labels Jan 11, 2019
    @miss-islington
    Copy link
    Contributor

    New changeset 9932fd9 by Miss Islington (bot) (Niklas Fiekas) in branch 'master':
    bpo-35721: Close socket pair if Popen in _UnixSubprocessTransport fails (GH-11553)
    9932fd9

    @miss-islington
    Copy link
    Contributor

    New changeset 3887932 by Miss Islington (bot) in branch '3.7':
    bpo-35721: Close socket pair if Popen in _UnixSubprocessTransport fails (GH-11553)
    3887932

    @asvetlov asvetlov added the 3.7 only security fixes label May 20, 2019
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.7 only security fixes 3.8 only security fixes performance Performance or resource usage topic-asyncio
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants