Closed Bug 1913679 Opened 7 months ago Closed 6 months ago

Improve handling of directory locks invalidated during storage initialization across all quota clients

Categories

(Core :: Storage: Quota Manager, task, P1)

task

Tracking

()

RESOLVED FIXED
132 Branch
Tracking Status
firefox132 --- fixed

People

(Reporter: janv, Assigned: janv)

References

(Blocks 1 open bug)

Details

Attachments

(29 obsolete files)

https://phabricator.services.mozilla.com/D195390 landed on inbound and was backed out due to a hang during running dom/cache/test/mochitest/test_cache_orphaned_body.html with a packaged profile with many origin directories
It turns out that handling of directory locks invalidated during storage initialization is currently not fully covered and needs to be fixed across all quota clients.

The requestFinished JS helper is currently used to handle nsIQuotaRequest and
nsISDBRequest based async requests. While nsIQuotaRequest already supports
resultName attribute which is used for constructing RequestError, nsISDBRequest
is missing this attribute.

The client directory lock gets invalidated, but the lock is not checked by SDB,
so it's not dropped as soon as possible which can eventually lead to a hang.

The property needs to be exposed to quota clients.

Summary: Improve handling of invalidated directory locks across all quota clients → Improve handling of directory locks invalidated during storage initialization across all quota clients
Blocks: 1914609
Attachment #9419717 - Attachment description: Bug 1913679 - Create a common helper for observing notifications in tests; r=#dom-storage → Bug 1913679 - Use a common helper for observing notifications in tests; r=#dom-storage

There's a bunch of new prefs and tests, but I believe this bug deserves it since any defect in related code can lead to unpleasant hangs.
The current structure also enables a lot of flexibility in the handling of invalidated directory locks and corresponding testing.

Attachment #9419898 - Attachment description: Bug 1913679 - Add new helpers for IDB xpcshell tests; r=#dom-storage → Bug 1913679 - IDB: Create a new module for testing; r=#dom-storage
Depends on: 1916423
Depends on: 1917169
Depends on: 1917453
Depends on: 1917454
Depends on: 1917457
Depends on: 1917462
Depends on: 1917466
Depends on: 1917477
Depends on: 1917479
Depends on: 1917550

Comment on attachment 9419698 [details]
Bug 1913679 - Move notification utils to separate files; r=#dom-storage

Revision D219501 was moved to bug 1917453. Setting attachment 9419698 [details] to obsolete.

Attachment #9419698 - Attachment is obsolete: true

Comment on attachment 9419699 [details]
Bug 1913679 - Avoid using component manager for creating nsSupportsPRUint64 objects; r=#dom-storage

Revision D219502 was moved to bug 1917453. Setting attachment 9419699 [details] to obsolete.

Attachment #9419699 - Attachment is obsolete: true

Comment on attachment 9419700 [details]
Bug 1913679 - Clean up and modernize NotifyUtils.cpp; r=#dom-storage

Revision D219503 was moved to bug 1917453. Setting attachment 9419700 [details] to obsolete.

Attachment #9419700 - Attachment is obsolete: true

Comment on attachment 9419701 [details]
Bug 1913679 - Avoid firing notifications required only by tests when the testing pref is not set; r=#dom-storage

Revision D219504 was moved to bug 1917453. Setting attachment 9419701 [details] to obsolete.

Attachment #9419701 - Attachment is obsolete: true

Comment on attachment 9419717 [details]
Bug 1913679 - Use a common helper for observing notifications in tests; r=#dom-storage

Revision D219515 was moved to bug 1917453. Setting attachment 9419717 [details] to obsolete.

Attachment #9419717 - Attachment is obsolete: true

Comment on attachment 9420702 [details]
Bug 1913679 - QM: Create new modules for testing; r=#dom-storage

Revision D220079 was moved to bug 1917454. Setting attachment 9420702 [details] to obsolete.

Attachment #9420702 - Attachment is obsolete: true

Comment on attachment 9419862 [details]
Bug 1913679 - Add nsISDBRequest.resultName readonly attribute; r=#dom-storage

Revision D219602 was moved to bug 1917454. Setting attachment 9419862 [details] to obsolete.

Attachment #9419862 - Attachment is obsolete: true

Comment on attachment 9420704 [details]
Bug 1913679 - SDB: Create a new module for testing; r=#dom-storage

Revision D220081 was moved to bug 1917454. Setting attachment 9420704 [details] to obsolete.

Attachment #9420704 - Attachment is obsolete: true

Comment on attachment 9419718 [details]
Bug 1913679 - Add a new testing only notification for client directory opening; r=#dom-storage

Revision D219516 was moved to bug 1917454. Setting attachment 9419718 [details] to obsolete.

Attachment #9419718 - Attachment is obsolete: true

Comment on attachment 9419861 [details]
Bug 1913679 - Add support for pausing QM IO thread after finishing storage initialization; r=#dom-storage

Revision D219601 was moved to bug 1917454. Setting attachment 9419861 [details] to obsolete.

Attachment #9419861 - Attachment is obsolete: true

Comment on attachment 9419864 [details]
Bug 1913679 - Add DirectoryLock::Invalidated getter; r=#dom-storage

Revision D219604 was moved to bug 1917454. Setting attachment 9419864 [details] to obsolete.

Attachment #9419864 - Attachment is obsolete: true

Comment on attachment 9421296 [details]
Bug 1913679 - Adjust documentation for QuotaManager::OpenClientDirectory; r=#dom-storage

Revision D220419 was moved to bug 1917454. Setting attachment 9421296 [details] to obsolete.

Attachment #9421296 - Attachment is obsolete: true

Comment on attachment 9419569 [details]
Bug 1913679 - Add a timer for directory lock acquisition; r=#dom-storage

Revision D219415 was moved to bug 1917454. Setting attachment 9419569 [details] to obsolete.

Attachment #9419569 - Attachment is obsolete: true

Comment on attachment 9420315 [details]
Bug 1913679 - Add a test for origin clearing requested right after starting client directory opening for FS; r=#dom-storage

Revision D219863 was moved to bug 1917479. Setting attachment 9420315 [details] to obsolete.

Attachment #9420315 - Attachment is obsolete: true

Comment on attachment 9419863 [details]
Bug 1913679 - Add a test for origin clearing requested right after starting client directory opening for SDB; r=#dom-storage

Revision D219603 was moved to bug 1917457. Setting attachment 9419863 [details] to obsolete.

Attachment #9419863 - Attachment is obsolete: true

Comment on attachment 9419865 [details]
Bug 1913679 - Rework OpenOp::DirectoryLockAcquired to use QM_TRY; r=#dom-storage

Revision D219605 was moved to bug 1917457. Setting attachment 9419865 [details] to obsolete.

Attachment #9419865 - Attachment is obsolete: true

Comment on attachment 9419866 [details]
Bug 1913679 - SDB: Add handling for invalidated directory locks; r=#dom-storage

Revision D219606 was moved to bug 1917457. Setting attachment 9419866 [details] to obsolete.

Attachment #9419866 - Attachment is obsolete: true

Comment on attachment 9419897 [details]
Bug 1913679 - Set dom.quotaManager.testing for all IDB xpcshell tests; r=#dom-storage

Revision D219627 was moved to bug 1917462. Setting attachment 9419897 [details] to obsolete.

Attachment #9419897 - Attachment is obsolete: true

Comment on attachment 9419898 [details]
Bug 1913679 - IDB: Create a new module for testing; r=#dom-storage

Revision D219628 was moved to bug 1917462. Setting attachment 9419898 [details] to obsolete.

Attachment #9419898 - Attachment is obsolete: true

Comment on attachment 9419899 [details]
Bug 1913679 - Add a test for origin clearing requested right after starting client directory opening for IDB; r=#dom-storage

Revision D219629 was moved to bug 1917462. Setting attachment 9419899 [details] to obsolete.

Attachment #9419899 - Attachment is obsolete: true

Comment on attachment 9419900 [details]
Bug 1913679 - Convert anonymous lambda to a named lambda in FactoryOp::DirectoryLockAcquired; r=#dom-storage

Revision D219630 was moved to bug 1917462. Setting attachment 9419900 [details] to obsolete.

Attachment #9419900 - Attachment is obsolete: true

Comment on attachment 9419901 [details]
Bug 1913679 - IDB: Add handling for invalidated directory locks; r=#dom-storage

Revision D219631 was moved to bug 1917462. Setting attachment 9419901 [details] to obsolete.

Attachment #9419901 - Attachment is obsolete: true

Comment on attachment 9420095 [details]
Bug 1913679 - Add a test for origin clearing requested right after starting client directory opening for Cache; r=#dom-storage

Revision D219736 was moved to bug 1917466. Setting attachment 9420095 [details] to obsolete.

Attachment #9420095 - Attachment is obsolete: true

Comment on attachment 9420096 [details]
Bug 1913679 - Cache: Add handling for invalidated directory locks; r=#dom-storage

Revision D219737 was moved to bug 1917466. Setting attachment 9420096 [details] to obsolete.

Attachment #9420096 - Attachment is obsolete: true

Comment on attachment 9420282 [details]
Bug 1913679 - LSNG: Make sure Promise objects are always released on the right thread; r=#dom-storage

Revision D219841 was moved to bug 1917477. Setting attachment 9420282 [details] to obsolete.

Attachment #9420282 - Attachment is obsolete: true

Comment on attachment 9420125 [details]
Bug 1913679 - Add a test for origin clearing requested right after starting client directory opening for LSNG; r=#dom-storage

Revision D219750 was moved to bug 1917477. Setting attachment 9420125 [details] to obsolete.

Attachment #9420125 - Attachment is obsolete: true

Comment on attachment 9420126 [details]
Bug 1913679 - LSNG: Add handling for invalidated directory locks; r=#dom-storage

Revision D219751 was moved to bug 1917477. Setting attachment 9420126 [details] to obsolete.

Attachment #9420126 - Attachment is obsolete: true

Comment on attachment 9420314 [details]
Bug 1913679 - FS: Add mapping for NS_ABORT_ERROR; r=#dom-storage

Revision D219862 was moved to bug 1917479. Setting attachment 9420314 [details] to obsolete.

Attachment #9420314 - Attachment is obsolete: true

Comment on attachment 9420316 [details]
Bug 1913679 - FS: Add handling for invalidated directory locks; r=#dom-storage

Revision D219864 was moved to bug 1917479. Setting attachment 9420316 [details] to obsolete.

Attachment #9420316 - Attachment is obsolete: true
No longer blocks: 1913561
Status: ASSIGNED → RESOLVED
Closed: 6 months ago
Resolution: --- → FIXED
Target Milestone: --- → 132 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: