Comment 12 for bug 1632362

Revision history for this message
Michael Foord (mfoord) wrote :

Switching to an RWMutex, instead of a Mutex, within persistent-cookiejar is simple - however a robust multiple-reader-one-writer file lock may be problematic to get right. The code that attempts to do the locking waits for at least a second, which should be more than enough, however due to the exponential back-off it only polls about four times during that second.

With multiple models the chance of getting four collisions in a row increases (assuming a single cookiejar file for multiple models). Increasing the timeout slightly and also increasing polling frequency could solve this if this is genuinely the cause of the problem.

I'm still digging in.