Closed Bug 1923056 Opened 1 month ago Closed 1 month ago

Crash in [@ mozilla::dom::quota::DirectoryLockImpl::~DirectoryLockImpl]

Categories

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

Unspecified
Windows
defect

Tracking

()

RESOLVED FIXED
133 Branch
Tracking Status
firefox-esr115 --- unaffected
firefox-esr128 --- unaffected
firefox131 --- unaffected
firefox132 --- unaffected
firefox133 --- fixed

People

(Reporter: gsvelto, Assigned: janv)

References

(Blocks 1 open bug)

Details

(Keywords: crash)

Crash Data

Attachments

(3 files, 1 obsolete file)

Crash report: https://crash-stats.mozilla.org/report/index/91126153-b87a-41b3-919c-171b70241006

MOZ_CRASH Reason:

MOZ_DIAGNOSTIC_ASSERT(!mRegistered)

Top 10 frames:

0  xul.dll  mozilla::dom::quota::DirectoryLockImpl::~DirectoryLockImpl()  dom/quota/DirectoryLockImpl.cpp:72
1  xul.dll  mozilla::dom::quota::DirectoryLockImpl::Release()  dom/quota/DirectoryLockImpl.h:185
2  xul.dll  mozilla::RefPtrTraits<mozilla::dom::quota::DirectoryLock>::Release(mozilla::d...  mfbt/RefPtr.h:49
2  xul.dll  RefPtr<mozilla::dom::quota::DirectoryLock>::ConstRemovingRefPtrTraits<mozilla...  mfbt/RefPtr.h:409
2  xul.dll  RefPtr<mozilla::dom::quota::DirectoryLock>::~RefPtr()  mfbt/RefPtr.h:80
2  xul.dll  mozilla::dom::(anonymous namespace)::PrepareDatastoreOp::~PrepareDatastoreOp()  dom/localstorage/ActorsParent.cpp:6578
2  xul.dll  mozilla::dom::(anonymous namespace)::PrepareDatastoreOp::~PrepareDatastoreOp()  dom/localstorage/ActorsParent.cpp:6573
3  xul.dll  mozilla::Runnable::Release()  xpcom/threads/nsThreadUtils.cpp:66
3  xul.dll  mozilla::InputStreamLengthHelper::Release()  storage/mozStorageConnection.cpp:778
4  xul.dll  mozilla::RefPtrTraits<mozilla::dom::(anonymous namespace)::LSRequestBase>::Re...  dom/localstorage/ActorsParent.cpp:3448

This appears to be a different issue from the older bug 1903387. It only affects Windows for the time being, but this could just be because we have more Windows users on nightly than on the other platforms.

Assignee: nobody → jvarga
Severity: -- → S3
Status: NEW → ASSIGNED
Priority: -- → P2

It seems this started happening after bug 1919788.

Keywords: leave-open

We know that in some cases a directory lock isn't being dropped in
PrepareDatastoreOp::Cleanup, but it's unclear if it's mDirectoryLock or
mExtraDirectoryLock. This patch should help identify that.

I think I found a code path which may be causing the assertion, working on a test and fix.

Priority: P2 → P1
Attachment #9429374 - Attachment is obsolete: true
Pushed by jvarga@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/a6bc6ec5b8f4 Improve assertions in PrepareDatastoreOp destructor; r=dom-storage-reviewers,asuth

PrepareDatastoreOp::GetResponse is not called if there was an error, so the
transformation of the regular directory lock into the extra directory lock must
be done right after finding existing datastore.

Depends on: 1913561
Blocks: 1866402
Blocks: 1671932
Pushed by jvarga@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/ba87a3d5133a Add a new test for shutdown requested after starting request finalization; r=dom-storage-reviewers,asuth https://hg.mozilla.org/integration/autoland/rev/d4f92abdacdc Transform regular directory lock into extra directory lock immediately after finding existing datastore; r=dom-storage-reviewers,asuth
Keywords: leave-open
Status: ASSIGNED → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 133 Branch
Crash Signature: [@ mozilla::dom::quota::DirectoryLockImpl::~DirectoryLockImpl] → [@ mozilla::dom::quota::DirectoryLockImpl::~DirectoryLockImpl] [@ mozilla::dom::(anonymous namespace)::PrepareDatastoreOp::~PrepareDatastoreOp]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: