Skip to content

socketserver accept a last request after shutdown #79198

Closed

Description

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

    Activity

    1. beledouxdenis commented on Oct 18, 2018

      beledouxdenismannequin
      MannequinAuthor

      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.

    2. added
      stdlibStandard Library Python modules in the Lib/ directory
      type-bugAn unexpected behavior, bug, or error
      on Oct 18, 2018
    3. vstinner commented on Oct 26, 2018

      @vstinner
      Member

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

    4. miss-islington commented on Oct 26, 2018

      @miss-islington
      Contributor

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

    5. miss-islington commented on Oct 26, 2018

      @miss-islington
      Contributor

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

    6. vstinner commented on Oct 26, 2018

      @vstinner
      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

    7. vstinner commented on Oct 26, 2018

      @vstinner
      Member

      Thanks Denis Ledoux for your bug report and your fix!

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

    8. beledouxdenis commented on Oct 26, 2018

      beledouxdenismannequin
      MannequinAuthor

      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 :).

    9. transferred this issue fromon Apr 10, 2022
    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

      stdlibStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or error

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions