Skip to content

Potential goroutine leak in readbuffer #69

@moio

Description

@moio

If a deadline is set, r.cond.Broadcast() is called without obtaining a lock and that opens up the posibility of a race where the broadcast could be called first, and r.cond.Wait() would miss it, potentially leading to a blocked goroutine.

t = time.AfterFunc(r.deadline.Sub(now), func() { r.cond.Broadcast() })

This is a follow up from the following PR review discussion: #68 (comment). So far, it was not observed in Rancher user installations

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions