Closed Bug 1919788 Opened 2 months ago Closed 2 months ago

LSNG: Fix handling of directory locks invalidated during request finalization

Categories

(Core :: Storage: localStorage & sessionStorage, defect, P2)

defect

Tracking

()

RESOLVED FIXED
133 Branch
Tracking Status
firefox133 --- fixed

People

(Reporter: janv, Assigned: janv)

References

(Blocks 1 open bug)

Details

Attachments

(4 files)

This is another edge case which is not properly handled, eventually leading to a hang.

Blocks: 1913561

PrepareDatastoreOp currently skips calling QuotaManager::OpenClientDirectory if
the datastore already exists (is already preloaded). This can lead to a case
when QuotaClient::AbortOperationsForLocks is not able to find a corresponding
object for invalidation (because PrepareDatastoreOp::mDirectoryLock is null),
eventually leading to a hang.
The patch changes the state machine to always start with directory opening, so
there's always a directory lock even if the datastore already has one. This
fixes the problem with potential hang and also improves overall processing
order of incoming requests.

Blocks: 1920456
No longer blocks: 1913561
Pushed by jvarga@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/de8c0a8f2cd7 LSNG: Add a new testing only notification for request finalization; r=dom-storage-reviewers,asuth https://hg.mozilla.org/integration/autoland/rev/3c5ff4e4053e LSNG: Add support for pausing DOM File thread during request finalization; r=dom-storage-reviewers,asuth https://hg.mozilla.org/integration/autoland/rev/a51dc1d5b857 Add a test for origin clearing requested right after starting request finalization for LSNG; r=dom-storage-reviewers,asuth https://hg.mozilla.org/integration/autoland/rev/7d6405ffc070 LSNG: Always acquire a directory lock for PreparedDatastoreOp; r=dom-storage-reviewers,asuth
Regressions: 1927410
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: