Skip to content

context: Err can return non-nil before Done channel is closed #75533

@neild

Description

@neild

Originally reported by @marktheunissen here: #72040 (comment). Creating a new issue to track.

CL 653795 introduced a race condition in Context.Err, in which it can return a non-nil result before the context's done channel is closed. This violates the Err documentation:

// If Done is not yet closed, Err returns nil.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FixPendingIssues that have a fix which has not yet been reviewed or submitted.NeedsFixThe path to resolution is known, but the work has not been done.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions