Skip to content

net/http: HTTP/2 server sometimes accepts a new request after OnShutdown hook is called #59038

Open
@bcmills

Description

@bcmills

When I modified net/http.TestServerShutdown to make a call to Get in the handler after the hook passed to RegisterOnShutdown was called, it passed reliably on my workstation but failed on the windows-amd64-2016 builder:

https://storage.googleapis.com/go-build-log/8141c27e/windows-amd64-2016_0b21b774.log:

--- FAIL: TestServerShutdown (0.00s)
    --- FAIL: TestServerShutdown/h2 (1.12s)
        serve_test.go:5478: https://127.0.0.1:51794: unexpected success. Listener should be closed before OnShutdown is called.
FAIL
FAIL	net/http	4.111s

That suggests that an HTTP/2 server (at least on Windows) may accept a completely new request after it has already called the OnShutdown hook. Even given HTTP/2's stream multiplexing, that behavior is surprising.

See previously #39776,

(attn @neild)

Metadata

Metadata

Assignees

No one assigned

    Labels

    NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions