You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
lockFile leaks a goroutine and a lock on timeout #3109
Cause:flock runs in a goroutine that sends on an unbuffered channel. After the 5s timeout the caller closes the file and returns, so the goroutine blocks forever, or takes a lock on a file descriptor that has been closed and possibly reused.
Fix: Use a buffered channel, or LOCK_NB with a retry loop until the deadline.
Found by an automated code audit, listed as finding #31 in specs/bug-checks.md (#3061). Line numbers refer to commit f7d01a7.
Activity