Queue: data race in notifyChange goroutine #36
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
internal/queue/queue.go:100-104spawns a goroutine that accesses queue state without holding the queue lock. Under concurrent job additions or rapid state changes this is a data race.Impact
Can cause corrupted job state, missed notifications, or a crash under load (e.g. batch queuing from the File Manager or queue start/stop rapidly).
Fix
Either hold the lock before reading state inside the goroutine, or pass a snapshot of the relevant values to the goroutine by value so it does not access shared state after release.
File
internal/queue/queue.golines 100-104