Skip to content

src-cli: race conditions in campaignProgressPrinter

Created by: mrnugget

There are two race conditions in the campaignProgressPrinter:

  1. We found a workaround for the first one here: https://github.com/sourcegraph/src-cli/pull/389#issuecomment-730952822 But we should fix it properly.
  2. I discovered a second one: campaignProgressPrinter reads and mutates its own state across multiple calls of PrintStatuses. These calls can happen in separate goroutines, which might leak to concurrent accesses of the same data structures (and caused a panic for me locally)