Crash in [@ mozilla::storage::StatementCache<T>::CreateStatement]
Categories
(Toolkit :: Places, defect, P1)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox-esr115 | --- | unaffected |
| firefox-esr128 | --- | unaffected |
| firefox-esr140 | --- | unaffected |
| firefox142 | --- | unaffected |
| firefox143 | + | wontfix |
| firefox144 | + | fixed |
| firefox145 | + | fixed |
People
(Reporter: release-mgmt-account-bot, Assigned: mak)
References
(Blocks 1 open bug, Regression)
Details
(5 keywords, Whiteboard: [sng][adv-main144+r])
Crash Data
Attachments
(2 files)
|
48 bytes,
text/x-phabricator-request
|
tjr
:
sec-approval+
|
Details | Review |
|
48 bytes,
text/x-phabricator-request
|
phab-bot
:
approval-mozilla-beta+
|
Details | Review |
Crash report: https://crash-stats.mozilla.org/report/index/fa1afc59-79bc-4d0b-a7d2-8339a0250830
Reason: EXCEPTION_ACCESS_VIOLATION_READ
Top 10 frames of crashing thread:
0 xul.dll nsCOMPtr<mozIStorageConnection>::get const xpcom/base/nsCOMPtr.h:751
0 xul.dll nsCOMPtr<mozIStorageConnection>::operator-> const xpcom/base/nsCOMPtr.h:772
0 xul.dll mozilla::storage::StatementCache<mozIStorageStatement>::CreateStatement storage/StatementCache.h:103
1 xul.dll mozilla::storage::StatementCache<mozIStorageStatement>::GetCachedStatement storage/StatementCache.h:53
1 xul.dll mozilla::places::ConcurrentConnection::GetStatementOnHelperThread toolkit/components/places/ConcurrentConnection.cpp:421
2 xul.dll mozilla::places::ConnectionAdapter::GetStatement const toolkit/components/places/FaviconHelpers.h:282
2 xul.dll mozilla::places:: toolkit/components/places/FaviconHelpers.cpp:438
3 xul.dll mozilla::places::AsyncGetFaviconForPageRunnable::Run toolkit/components/places/FaviconHelpers.cpp:943
4 xul.dll nsThread::ProcessNextEvent xpcom/threads/nsThread.cpp:1151
4 xul.dll NS_ProcessNextEvent xpcom/threads/nsThreadUtils.cpp:461
By querying Nightly crashes reported within the last 2 months, here are some insights about the signature:
- First crash report: 2025-08-07
- Process type: Parent
- Is startup crash: No
- Has user comments: No
- Is null crash: Yes - 1 out of 8 crashes happened on null or near null memory address
- Is use after free crash: Yes - 5 out of 8 crashes happened on or near an allocator poison value
Comment 1•11 months ago
|
||
The earliest build I see is a 143 Nightly build 20250804213332 bp-29f295aa-530c-4038-8a7e-945a40250807 (ignoring an ESR-128 crash on a null-dereference and a different stack).
I don't see any storage changes right before then, but I do see bug 599980 doing something in places code with favicons, both of which show up in the stack.
Does that seem likely, Yazan and Mak?
| Reporter | ||
Comment 2•11 months ago
|
||
Set release status flags based on info from the regressing bug 599980
| Assignee | ||
Comment 3•11 months ago
•
|
||
GetStatementOnHelperThread should probably check mIsConnectionReady before trying to use mHelperThreadStatements.
GetCachedStatement should probably hold sharedAsyncExecutionMutex, because it looks like the connection is being teared down. <= this is not necessary, StatementCache doesn't own the connection and relies on the consumer to properly handle teardown.
| Reporter | ||
Comment 4•11 months ago
|
||
The severity field for this bug is set to S3. However, the bug is flagged with the sec-high keyword.
:mak, could you consider increasing the severity of this security bug?
For more information, please visit BugBot documentation.
Updated•11 months ago
|
Updated•10 months ago
|
| Assignee | ||
Comment 5•10 months ago
|
||
| Assignee | ||
Comment 6•10 months ago
|
||
The patch should be fine, though I'm seeing various hangs on shutdown in some b-c tests. I suspect it's Bug 1987725 and not my changes, but I would like to double check.
| Reporter | ||
Comment 7•10 months ago
|
||
Set release status flags based on info from the regressing bug 599980
Comment 8•10 months ago
|
||
:mak, do you need to find a different reviewer for this?
The planned Fx143 dot release overlaps with your PTO. Wondering if this will be able to get a review, sec-approval, uplift requests etc. in time.
| Assignee | ||
Updated•10 months ago
|
| Assignee | ||
Comment 9•10 months ago
|
||
Comment on attachment 9512450 [details]
(secure)
Security Approval Request
- How easily could an exploit be constructed based on the patch?: This can only happen at specific times during startup/shutdown of the app, and may depend on thread scheduling as a helper thread is accessing a member setup by the main thread.
- Do comments in the patch, the check-in comment, or tests included in the patch paint a bulls-eye on the security problem?: Unknown
- Which branches (beta, release, and/or ESR) are affected by this flaw, and do the release status flags reflect this affected/unaffected state correctly?: beta, release
- If not all supported branches, which bug introduced the flaw?: Bug 599980
- Do you have backports for the affected branches?: No
- If not, how different, hard to create, and risky will they be?: The patch should apply cleanly
- How likely is this patch to cause regressions; how much testing does it need?: Unlikely, existing CI should be sufficient.
- Is the patch ready to land after security approval is given?: Yes
- Is Android affected?: No
| Assignee | ||
Comment 10•10 months ago
|
||
(In reply to Donal Meehan [:dmeehan] from comment #8)
:mak, do you need to find a different reviewer for this?
The planned Fx143 dot release overlaps with your PTO. Wondering if this will be able to get a review, sec-approval, uplift requests etc. in time.
I will keep in touch with Chris Bellini about this during PTO, cc-ed him to the bug so eventually other members of the Search team can handle it.
I don't think it's an high risk for Release as it doesn't look like an easily exploitable vector, though sec team has a lot more experience than me on this matter.
Comment 11•10 months ago
|
||
(In reply to Marco Bonardo [:mak] (away 22-26 Sept) from comment #10)
(In reply to Donal Meehan [:dmeehan] from comment #8)
:mak, do you need to find a different reviewer for this?
The planned Fx143 dot release overlaps with your PTO. Wondering if this will be able to get a review, sec-approval, uplift requests etc. in time.I will keep in touch with Chris Bellini about this during PTO, cc-ed him to the bug so eventually other members of the Search team can handle it.
I don't think it's an high risk for Release as it doesn't look like an easily exploitable vector, though sec team has a lot more experience than me on this matter.
Thanks, there is also some crash volume here
Comment 12•10 months ago
|
||
Comment on attachment 9512450 [details]
(secure)
Approved to land and request uplift
Comment 13•10 months ago
|
||
Comment 14•10 months ago
|
||
| Assignee | ||
Comment 15•10 months ago
•
|
||
I'm not sure why my multiple anonymous try builds didn't show any of that...
Anyway, the assertion shows there's more complexity than expected here.
We initially assumed ConcurrentConnection was created on the main-thread and accessed on either the MT or the helper thread (And this was trye until the regressing bug). It looks like now there's cases where it may be created on the helper thread, and that may actually be necessary (the helper thread must be able to register requests that will be handled later).
We must ensure the object can be created on either thread, and the main-thread stuff must be dispatched to the main-thread, some members must be wrapped by nsMainThreadPtrHandle. And I must check all the other properties are thread-safe.
I filed bug 1989632 to manage all of that.
In the meanwhile, what wer can do is just fail to return an instance if we would try to create one off the main-thread.
That means some favicon requests on startup may fail (return no favicon), but we don't have a better option short term to stop the crash.
| Assignee | ||
Comment 16•10 months ago
•
|
||
there's still issues with other unexpected assertions (actually I think it's https://bugzilla.mozilla.org/show_bug.cgi?id=1947444), I'm not sure I can make this for 143, too many unknowns that I don't like.
| Reporter | ||
Comment 17•10 months ago
|
||
The bug is marked as tracked for firefox143 (release) and tracked for firefox144 (beta). However, the bug still has low severity.
:cbellini, could you please increase the severity for this tracked bug? If you disagree with the tracking decision, please talk with the release managers.
For more information, please visit BugBot documentation.
Updated•10 months ago
|
| Reporter | ||
Comment 18•10 months ago
|
||
The bug is linked to a topcrash signature, which matches the following criterion:
- Top 20 desktop browser crashes on release
For more information, please visit BugBot documentation.
Comment 19•10 months ago
|
||
Hi Marco, any updates on this bug? It remains a pretty high-volume crash on Release and 144 is going to RC next week.
| Assignee | ||
Comment 20•10 months ago
|
||
I have updated the patch and re-requested review.
There is still a downside that until we fix Bug 1989632 some early startup favicon requests may fail. Fixing that bug should solve it, but I prefer to not do that here to avoid taking more risks.
Comment 21•10 months ago
|
||
Comment 22•10 months ago
|
||
Comment 23•10 months ago
|
||
Please request Beta uplift on this. We'll keep an eye on the crash stats over the weekend before hopefully including it in the RC builds on Monday.
Comment 24•10 months ago
|
||
firefox-beta Uplift Approval Request
- User impact if declined: Top Crash
- Code covered by automated testing: no
- Fix verified in Nightly: no
- Needs manual QE test: no
- Steps to reproduce for manual QE testing:
- Risk associated with taking this patch: medium
- Explanation of risk level: While this should avoid the crash it will cause some early startup favicon requests to fail.
- String changes made/needed: no
- Is Android affected?: no
| Assignee | ||
Comment 25•10 months ago
|
||
Original Revision: https://phabricator.services.mozilla.com/D264337
| Assignee | ||
Updated•10 months ago
|
Updated•10 months ago
|
Updated•10 months ago
|
Comment 26•10 months ago
|
||
| uplift | ||
Updated•10 months ago
|
Updated•9 months ago
|
Updated•9 months ago
|
Updated•9 months ago
|
Updated•3 months ago
|
Updated•3 months ago
|
Updated•2 months ago
|
Description
•