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

[2.7][3.6] test_socketserver ForkingMixIn tests leaks child processes on Python 3.6 #75774

Closed
vstinner opened this issue Sep 26, 2017 · 3 comments

Comments

@vstinner
Copy link
Member

BPO 31593
Nosy @vstinner
PRs
  • [3.6] bpo-31593: test_socketserver waits child processes #3766
  • [2.7] bpo-31593: test_socketserver waits child processes #3786
  • 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 2017-09-27.10:24:21.543>
    created_at = <Date 2017-09-26.13:47:40.624>
    labels = []
    title = '[2.7][3.6] test_socketserver ForkingMixIn tests leaks child processes on Python 3.6'
    updated_at = <Date 2017-09-27.10:24:21.542>
    user = 'https://github.com/vstinner'

    bugs.python.org fields:

    activity = <Date 2017-09-27.10:24:21.542>
    actor = 'vstinner'
    assignee = 'none'
    closed = True
    closed_date = <Date 2017-09-27.10:24:21.543>
    closer = 'vstinner'
    components = []
    creation = <Date 2017-09-26.13:47:40.624>
    creator = 'vstinner'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 31593
    keywords = ['patch']
    message_count = 3.0
    messages = ['303040', '303115', '303120']
    nosy_count = 1.0
    nosy_names = ['vstinner']
    pr_nums = ['3766', '3786']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue31593'
    versions = ['Python 2.7', 'Python 3.6']

    @vstinner
    Copy link
    Member Author

    The bpo-31151 (socketserver.ForkingMixIn.server_close() leaks zombie processes) was fixed in the master branch, but 2.7 and 3.6 branches were not changed.

    I proposed to modify test_socketserver to explicitly waits until child processes complete. See attached PR.

    Example of leaked child processes the on "x86 Gentoo Refleaks 3.6" buildbot:

    http://buildbot.python.org/all/builders/x86%20Gentoo%20Refleaks%203.6/builds/102/steps/test/logs/stdio

    0:26:11 load avg: 5.72 [ 62/405] test_socketserver passed -- running: test_multiprocessing_forkserver (594 sec)
    beginning 6 repetitions
    123456
    Warning -- reap_children() reaped child process 6891
    .Warning -- reap_children() reaped child process 6976
    Warning -- reap_children() reaped child process 6981
    .Warning -- reap_children() reaped child process 7059
    .Warning -- reap_children() reaped child process 7136
    ..Warning -- reap_children() reaped child process 7306
    .

    @vstinner vstinner changed the title test_socketserver ForkingMixIn tests leaks child processes [2.7][3.6] test_socketserver ForkingMixIn tests leaks child processes on Python 3.6 Sep 26, 2017
    @vstinner
    Copy link
    Member Author

    New changeset fdcf3e9 by Victor Stinner in branch '3.6':
    bpo-31593: test_socketserver waits child processes (bpo-3766)
    fdcf3e9

    @vstinner
    Copy link
    Member Author

    New changeset b4920d5 by Victor Stinner in branch '2.7':
    bpo-31593: test_socketserver waits child processes (bpo-3786)
    b4920d5

    @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
    None yet
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant