This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: socketserver accept a last request after shutdown
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 3.6
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: beledouxdenis, miss-islington, vstinner, xtreak
Priority: normal Keywords: patch

Created on 2018-10-18 11:55 by beledouxdenis, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 9952 merged beledouxdenis, 2018-10-18 12:00
PR 10125 merged miss-islington, 2018-10-26 13:46
PR 10126 merged miss-islington, 2018-10-26 13:46
PR 10129 merged beledouxdenis, 2018-10-26 14:42
Messages (7)
msg327969 - (view) Author: Denis Ledoux (beledouxdenis) * Date: 2018-10-18 11:55
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.
msg328548 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-10-26 13:46
New changeset 10cb3760e8631a27f5db1e51b05494e29306c671 by Victor Stinner (Denis Ledoux) in branch 'master':
bpo-35017, socketserver: don't accept request after shutdown (GH-9952)
https://github.com/python/cpython/commit/10cb3760e8631a27f5db1e51b05494e29306c671
msg328550 - (view) Author: miss-islington (miss-islington) Date: 2018-10-26 14:06
New changeset 908082451382b8b3ba09ebba638db660edbf5d8e by Miss Islington (bot) in branch '3.7':
bpo-35017, socketserver: don't accept request after shutdown (GH-9952)
https://github.com/python/cpython/commit/908082451382b8b3ba09ebba638db660edbf5d8e
msg328551 - (view) Author: miss-islington (miss-islington) Date: 2018-10-26 14:10
New changeset 8b1f52b5a93403acd7d112cd1c1bc716b31a418a by Miss Islington (bot) in branch '3.6':
bpo-35017, socketserver: don't accept request after shutdown (GH-9952)
https://github.com/python/cpython/commit/8b1f52b5a93403acd7d112cd1c1bc716b31a418a
msg328558 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-10-26 15:15
New changeset 6f97a50c86737458c6bed9970c8dc31a465eff22 by Victor Stinner (Denis Ledoux) in branch '2.7':
bpo-35017, socketserver: don't accept request after shutdown (GH-9952) (GH-10129)
https://github.com/python/cpython/commit/6f97a50c86737458c6bed9970c8dc31a465eff22
msg328559 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-10-26 15:15
Thanks Denis Ledoux for your bug report and your fix!

It's nice to see this bug fixed in all branches ;-)
msg328562 - (view) Author: Denis Ledoux (beledouxdenis) * Date: 2018-10-26 15:35
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 :).
History
Date User Action Args
2022-04-11 14:59:07adminsetgithub: 79198
2018-10-26 15:35:00beledouxdenissetmessages: + msg328562
2018-10-26 15:15:59vstinnersetstatus: open -> closed
resolution: fixed
messages: + msg328559

stage: patch review -> resolved
2018-10-26 15:15:26vstinnersetmessages: + msg328558
2018-10-26 14:42:39beledouxdenissetpull_requests: + pull_request9461
2018-10-26 14:10:45miss-islingtonsetmessages: + msg328551
2018-10-26 14:06:44miss-islingtonsetnosy: + miss-islington
messages: + msg328550
2018-10-26 13:46:45miss-islingtonsetpull_requests: + pull_request9458
2018-10-26 13:46:34miss-islingtonsetpull_requests: + pull_request9457
2018-10-26 13:46:21vstinnersetnosy: + vstinner
messages: + msg328548
2018-10-20 18:40:47xtreaksetnosy: + xtreak
2018-10-18 12:00:58beledouxdenissetkeywords: + patch
stage: patch review
pull_requests: + pull_request9299
2018-10-18 11:55:13beledouxdeniscreate