Closed Bug 1869087 Opened 1 year ago Closed 1 year ago

Crash in [@ mozilla::dom::cache::Context::OnQuotaInit]

Categories

(Core :: Storage: Cache API, defect, P2)

Unspecified
Windows 11
defect

Tracking

()

RESOLVED FIXED
123 Branch
Tracking Status
firefox-esr115 --- unaffected
firefox121 --- wontfix
firefox122 --- fixed
firefox123 --- fixed

People

(Reporter: mccr8, Assigned: hsingh)

References

(Regression)

Details

(Keywords: crash, regression)

Crash Data

Attachments

(1 file)

Crash report: https://crash-stats.mozilla.org/report/index/b5248e4c-c819-49cf-b37d-9d7a60231206

MOZ_CRASH Reason: MOZ_DIAGNOSTIC_ASSERT(mCipherKeyManager)

Top 10 frames of crashing thread:

0  xul.dll  mozilla::dom::cache::Context::OnQuotaInit  dom/cache/Context.cpp:1031
1  xul.dll  mozilla::dom::cache::Context::QuotaInitRunnable::Run  dom/cache/Context.cpp:463
2  xul.dll  nsThread::ProcessNextEvent  xpcom/threads/nsThread.cpp:1192
2  xul.dll  NS_ProcessNextEvent  xpcom/threads/nsThreadUtils.cpp:480
3  xul.dll  mozilla::ipc::MessagePumpForNonMainThreads::Run  ipc/glue/MessagePump.cpp:330
4  xul.dll  MessageLoop::RunInternal  ipc/chromium/src/base/message_loop.cc:370
4  xul.dll  MessageLoop::RunHandler  ipc/chromium/src/base/message_loop.cc:363
5  xul.dll  MessageLoop::Run  ipc/chromium/src/base/message_loop.cc:345
5  xul.dll  nsThread::ThreadFunc  xpcom/threads/nsThread.cpp:370
6  nss3.dll  _PR_NativeRunThread  nsprpub/pr/src/threads/combined/pruthr.c:399
Assignee: nobody → hsingh

Seems like we should only be asserting for mCipherKeyManager being non-null when aRV is not an error here: https://hg.mozilla.org/mozilla-central/file/30004166d9f2cc3399da68e8762c35b1b886c0dc/dom/cache/Context.cpp#l1031

This is a new parent process crash. S2

Severity: -- → S2
Priority: -- → P2
Status: NEW → ASSIGNED

QuotaInitRunnable is invoked by Context to set up cache directory. This is not always successful as it could be
interrupted by shutdown or other filesystem issues. In case of error, it's possible that mCipherKeyManager is
not initialized by the time it ran into error. QuotaInitRunnable will transition to 'complete' state in both success
and failure scenario and it would call into Context::onQuotaInit. So, we shouldn't assert for mCipherKeyManager in there
as it was not initialized and Context gets dropped there (in case of an error) so it's not needed in that case as well.

Attachment #9368052 - Attachment description: Bug 1869087: Skip mCipherKeyManager assertion in case QuotaInitRunnable failed.r=#dom-storage-reviewers → Bug 1869087: Properly handle QuotaInitRunnable failure in Context::OnQuotaInit.r=#dom-storage-reviewers
Pushed by hsingh@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/f47f48be162a Properly handle QuotaInitRunnable failure in Context::OnQuotaInit.r=dom-storage-reviewers,janv
Pushed by hsingh@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/04b0ed50a187 Properly handle QuotaInitRunnable failure in Context::OnQuotaInit.r=dom-storage-reviewers,janv
Flags: needinfo?(hsingh)

Backed out for causing multiple Quota related failures

Backout link

Push with failures

Failure log 1 // Failure log 2 // Failure log 3

Flags: needinfo?(hsingh)
Regressions: 1869885
Flags: needinfo?(hsingh)
Keywords: regression
Regressed by: 1835154
Pushed by hsingh@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/a9293f88ac9f Properly handle QuotaInitRunnable failure in Context::OnQuotaInit.r=dom-storage-reviewers,janv
Keywords: leave-open
See Also: → 1871409
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED

Resolving this as fixed since the linked bug got fixed and landed.

Regressed by: 1835300
No longer regressed by: 1835154
Target Milestone: --- → 123 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: