Closed Bug 1539248 Opened 6 years ago Closed 6 years ago

Assertion failure: !gUsages->Contains(aOrigin)

Categories

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

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1541771

People

(Reporter: kats, Unassigned)

Details

On a local macOS debug build from recent m-c. I got this assertion failure/crash right after I checked the "Restore previous session" checkbox on about:preferences. I had just started the browser prior to opening about:preferences, on a profile that had loaded a handful of pages in previous sessions.

Assertion failure: !gUsages->Contains(aOrigin), at /Users/kats/zspace/gecko-wr/dom/localstorage/ActorsParent.cpp:2770
#01: mozilla::dom::(anonymous namespace)::QuotaClient::InitOrigin(mozilla::dom::quota::PersistenceType, nsTSubstring<char> const&, nsTSubstring<char> const&, mozilla::Atomic<bool, (mozilla::MemoryOrdering)2, (mozilla::recordreplay::Behavior)1, void> const&, mo[/Users/kats/zspace/gecko-wr/obj-host-debug/dist/NightlyDebug.app/Contents/MacOS/XUL +0x3b80837]
#02: mozilla::dom::quota::QuotaManager::InitializeOrigin(mozilla::dom::quota::PersistenceType, nsTSubstring<char> const&, nsTSubstring<char> const&, long long, bool, nsIFile*)[/Users/kats/zspace/gecko-wr/obj-host-debug/dist/NightlyDebug.app/Contents/MacOS/XUL +0x34cb0c6]
#03: mozilla::dom::quota::QuotaManager::InitializeRepository(mozilla::dom::quota::PersistenceType)[/Users/kats/zspace/gecko-wr/obj-host-debug/dist/NightlyDebug.app/Contents/MacOS/XUL +0x34ca3dc]
#04: mozilla::dom::quota::QuotaManager::EnsureTemporaryStorageIsInitialized()[/Users/kats/zspace/gecko-wr/obj-host-debug/dist/NightlyDebug.app/Contents/MacOS/XUL +0x34d42c2]
#05: mozilla::dom::quota::QuotaManager::EnsureOriginIsInitializedInternal(mozilla::dom::quota::PersistenceType, nsTSubstring<char> const&, nsTSubstring<char> const&, nsTSubstring<char> const&, bool, nsIFile**, bool*)[/Users/kats/zspace/gecko-wr/obj-host-debug/dist/NightlyDebug.app/Contents/MacOS/XUL +0x34d3c16]
#06: mozilla::dom::quota::QuotaManager::EnsureOriginIsInitialized(mozilla::dom::quota::PersistenceType, nsTSubstring<char> const&, nsTSubstring<char> const&, nsTSubstring<char> const&, bool, nsIFile**)[/Users/kats/zspace/gecko-wr/obj-host-debug/dist/NightlyDebug.app/Contents/MacOS/XUL +0x34d38e8]
#07: mozilla::dom::indexedDB::(anonymous namespace)::OpenDatabaseOp::DoDatabaseWork()[/Users/kats/zspace/gecko-wr/obj-host-debug/dist/NightlyDebug.app/Contents/MacOS/XUL +0x368b786]
#08: mozilla::dom::indexedDB::(anonymous namespace)::FactoryOp::Run()[/Users/kats/zspace/gecko-wr/obj-host-debug/dist/NightlyDebug.app/Contents/MacOS/XUL +0x368a088]
#09: nsThread::ProcessNextEvent(bool, bool*)[/Users/kats/zspace/gecko-wr/obj-host-debug/dist/NightlyDebug.app/Contents/MacOS/XUL +0x151637]
#10: NS_ProcessNextEvent(nsIThread*, bool)[/Users/kats/zspace/gecko-wr/obj-host-debug/dist/NightlyDebug.app/Contents/MacOS/XUL +0x155598]
#11: mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*)[/Users/kats/zspace/gecko-wr/obj-host-debug/dist/NightlyDebug.app/Contents/MacOS/XUL +0x847862]
#12: MessageLoop::Run()[/Users/kats/zspace/gecko-wr/obj-host-debug/dist/NightlyDebug.app/Contents/MacOS/XUL +0x7e2bc5]
#13: nsThread::ThreadFunc(void*)[/Users/kats/zspace/gecko-wr/obj-host-debug/dist/NightlyDebug.app/Contents/MacOS/XUL +0x14dd34]
#14: _pt_root[/Users/kats/zspace/gecko-wr/obj-host-debug/dist/NightlyDebug.app/Contents/MacOS/libnss3.dylib +0x1708d0]
#15: _pthread_body[/usr/lib/system/libsystem_pthread.dylib +0x3661]
#16: _pthread_body[/usr/lib/system/libsystem_pthread.dylib +0x350d]

Actually it seems to happen reproducibly just by going to about:preferences and waiting a couple of seconds.

Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → DUPLICATE

Hi Kartikaya,

It seems that the root cause of your problem is that your profile cannot be initialized properly. The problem here is that LocalStorage doesn't expect the profile would be initialized twice. While we are working fix this problem, I guess there should be another issue on your profile so that it makes your profile initialized twice. Hopefully, it would generate some warning message on your console.

Do you happen to keep the warning message related to "QuotaManager", "IndexedDB" or from some files under "dom/quota", "dom/indexedDB", "dom/cache" before the Assertion failure? Thanks!

Flags: needinfo?(kats)

Sorry, I didn't keep the log from when this happened, and I can't reproduce it on a fresh profile now. I've since updated my m-c checkout so maybe the problem was resolved already.

Flags: needinfo?(kats)
You need to log in before you can comment on or make changes to this bug.