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

socketserver accept a last request after shutdown #79198

Closed
beledouxdenis mannequin opened this issue Oct 18, 2018 · 7 comments
Closed

socketserver accept a last request after shutdown #79198

beledouxdenis mannequin opened this issue Oct 18, 2018 · 7 comments
Labels
stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@beledouxdenis
Copy link
Mannequin

beledouxdenis mannequin commented Oct 18, 2018

BPO 35017
Nosy @vstinner, @miss-islington, @tirkarthi, @beledouxdenis
PRs
  • bpo-35017: Lib/socketserver, do not accept any request after shutdown #9952
  • [3.7] bpo-35017, socketserver: don't accept request after shutdown (GH-9952) #10125
  • [3.6] bpo-35017, socketserver: don't accept request after shutdown (GH-9952) #10126
  • [2.7] bpo-35017, socketserver: don't accept any request after shutdown (GH-9952) #10129
  • 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 2018-10-26.15:15:59.308>
    created_at = <Date 2018-10-18.11:55:13.111>
    labels = ['type-bug', 'library']
    title = 'socketserver accept a last request after shutdown'
    updated_at = <Date 2018-10-26.15:35:00.602>
    user = 'https://github.com/beledouxdenis'

    bugs.python.org fields:

    activity = <Date 2018-10-26.15:35:00.602>
    actor = 'beledouxdenis'
    assignee = 'none'
    closed = True
    closed_date = <Date 2018-10-26.15:15:59.308>
    closer = 'vstinner'
    components = ['Library (Lib)']
    creation = <Date 2018-10-18.11:55:13.111>
    creator = 'beledouxdenis'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 35017
    keywords = ['patch']
    message_count = 7.0
    messages = ['327969', '328548', '328550', '328551', '328558', '328559', '328562']
    nosy_count = 4.0
    nosy_names = ['vstinner', 'miss-islington', 'xtreak', 'beledouxdenis']
    pr_nums = ['9952', '10125', '10126', '10129']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue35017'
    versions = ['Python 3.6']

    @beledouxdenis
    Copy link
    Mannequin Author

    beledouxdenis mannequin commented Oct 18, 2018

    After the shutdown of a BaseServer, the server may accept a last single request if it is sent between the server socket polling and the polling timeout.

    This can be problematic for instance for a server restart for which you do not want to interrupt the service, by not closing the listening socket during the restart. One request can fail because of this behavior.

    Note that only one request will fail, following requests will not be accepted, as expected.

    @beledouxdenis beledouxdenis mannequin added stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error labels Oct 18, 2018
    @vstinner
    Copy link
    Member

    New changeset 10cb376 by Victor Stinner (Denis Ledoux) in branch 'master':
    bpo-35017, socketserver: don't accept request after shutdown (GH-9952)
    10cb376

    @miss-islington
    Copy link
    Contributor

    New changeset 9080824 by Miss Islington (bot) in branch '3.7':
    bpo-35017, socketserver: don't accept request after shutdown (GH-9952)
    9080824

    @miss-islington
    Copy link
    Contributor

    New changeset 8b1f52b by Miss Islington (bot) in branch '3.6':
    bpo-35017, socketserver: don't accept request after shutdown (GH-9952)
    8b1f52b

    @vstinner
    Copy link
    Member

    New changeset 6f97a50 by Victor Stinner (Denis Ledoux) in branch '2.7':
    bpo-35017, socketserver: don't accept request after shutdown (GH-9952) (GH-10129)
    6f97a50

    @vstinner
    Copy link
    Member

    Thanks Denis Ledoux for your bug report and your fix!

    It's nice to see this bug fixed in all branches ;-)

    @beledouxdenis
    Copy link
    Mannequin Author

    beledouxdenis mannequin commented Oct 26, 2018

    The pleasure is all mine.

    Thanks to you and the other contributors involved. For my first contribution to Python, I am glad everything went smoothly :).

    @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
    stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants