Closed Bug 1634407 Opened 5 years ago Closed 4 years ago

Don't get locked out in the fog

Categories

(Toolkit :: Telemetry, task, P3)

task

Tracking

()

RESOLVED INVALID

People

(Reporter: chutten, Unassigned)

Details

(Whiteboard: [telemetry:fog:m?])

In some metric types (e.g. Timespan) we have two locks: a RwLock for accessing internal state for the glean_core metric type and the global Glean.

Right now we're very good about only ever taking the global Glean if we don't have the RwLock, but that might not last forever.

We should come up with a way to prevent ourselves from deadlocking. Maybe

  • Find a way to panic if we ever take global Glean when we're holding RwLock?
  • Find a way to intertwine the global Glean and the RwLock so that taking one always ensures we take both (and always in the same order)?
  • Find a way to avoid some of this locking so we only need one?
  • __other__
Severity: -- → N/A

We no longer have to worry about this in FOG. Maybe the RLB will want to take a look at this, but given as it's in the same repo as glean-core it seems less likely that this might happen.

Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.