Skip to content
This repository was archived by the owner on Jul 12, 2025. It is now read-only.
This repository was archived by the owner on Jul 12, 2025. It is now read-only.

Data race on onCancelWasCalled #96

@bradfitz

Description

@bradfitz

I got an automated PR telling us to update from pgconn 1.10.0 to 1.10.1 which gave us a helpful diff link:

v1.10.0...v1.10.1

But it looks like the locking on onCancelWasCalled is wrong. The grouping on line 17 below the mutex on line 15 suggests that onCancelWasCalled is guarded by lock, but on line 50, it's assigned without holding the lock. (line 50 is in a goroutine, so the lock/defer Unlock on lines 35/36 don't affect it)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions