Crash in [@ mozilla::Preferences::BackupPrefFile]
Categories
(Core :: Preferences: Backend, defect)
Tracking
()
People
(Reporter: release-mgmt-account-bot, Assigned: jstutte)
References
(Blocks 1 open bug)
Details
(Keywords: crash)
Crash Data
Attachments
(3 files)
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
phab-bot
:
approval-mozilla-beta+
|
Details | Review |
|
48 bytes,
text/x-phabricator-request
|
phab-bot
:
approval-mozilla-esr153+
|
Details | Review |
Crash report: https://crash-stats.mozilla.org/report/index/bb2c9fa7-6978-41a4-a34d-6fe580260703
MOZ_CRASH Reason: MozPromise::ThenValue created from 'BackupPrefFile' destroyed without being either disconnected, resolved, or rejected (dispatchRv: not dispatched)
Top 10 frames of crashing thread:
0 xul.dll MOZ_Crash mfbt/Assertions.h:402
0 xul.dll mozilla::MozPromise<bool, nsresult, 0>::ThenValueBase::AssertIsDead xpcom/threads/MozPromise.h:541
1 xul.dll mozilla::MozPromise<bool, nsresult, 0>::AssertIsDead xpcom/threads/MozPromise.h:1267
2 xul.dll mozilla::MozPromise<bool, nsresult, 0>::~MozPromise xpcom/threads/MozPromise.h:1315
3 xul.dll mozilla::MozPromise<bool, nsresult, 0>::Private::~Private xpcom/threads/MozPromise.h:255
4 xul.dll mozilla::MozPromiseRefcountable::Release xpcom/threads/MozPromise.h:150
4 xul.dll mozilla::RefPtrTraits<mozilla::MozPromise<bool, nsresult, 0> >::Release mfbt/RefPtr.h:48
4 xul.dll RefPtr<mozilla::MozPromise<bool, nsresult, 0> >::ConstRemovingRefPtrTraits<mozilla::MozPromise<bool, nsresult, 0> >::Release mfbt/RefPtr.h:406
4 xul.dll RefPtr<mozilla::MozPromise<bool, nsresult, 0> >::~RefPtr mfbt/RefPtr.h:79
4 xul.dll mozilla::Preferences::BackupPrefFile modules/libpref/Preferences.cpp:5093
By querying Nightly crashes reported within the last 2 months, here are some insights about the signature:
- First crash report: 2026-05-05
- Process type: Parent
- Is startup crash: No
- Has user comments: No
- Is null crash: Yes - 1 out of 10 crashes happened on null or near null memory address
Updated•2 months ago
|
| Assignee | ||
Comment 1•2 months ago
|
||
BackupPrefFile writes go through PreferencesImpl::WritePrefFile, which coalesces
all writes through a single sPendingWriteData slot destined for the profile
prefs.js. A backup targets a different file with a filtered pref set and carries
a MozPromise. When the slot was already occupied, the backup took the coalescing
early-return, dropping its MozPromiseHolder without settling it and leaving its
filtered data in the slot. Give writes that carry a promise holder their own
PWRunnable with their own data so they never touch the shared slot.
Updated•2 months ago
|
| Reporter | ||
Comment 2•1 month ago
|
||
There is an r+ patch which didn't land and no activity in this bug for 1 week.
:jstutte, could you have a look please?
If you still have some work to do, you can add an action "Plan Changes" in Phabricator.
For more information, please visit BugBot documentation.
Comment 4•1 month ago
|
||
| bugherder | ||
Comment 5•1 month ago
|
||
| bugherder | ||
Comment 6•1 month ago
|
||
| bugherder | ||
Comment 7•1 month ago
|
||
| bugherder | ||
| Assignee | ||
Comment 8•1 month ago
|
||
Greg, do you think we should uplift this to beta? I am a bit worried that this might not be the only possible consequence of that race and we may save wrong prefs or some such.
| Reporter | ||
Comment 9•1 month ago
|
||
The patch landed in nightly and beta is affected.
:jstutte, is this bug important enough to require an uplift?
- If yes, please nominate the patch for beta approval.
- See https://wiki.mozilla.org/Release_Management/Requesting_an_Uplift for documentation on how to request an uplift.
- If no, please set
status-firefox154towontfix.
For more information, please visit BugBot documentation.
Comment 10•1 month ago
|
||
Yeah, I think it would probably be a good idea to uplift this as it could lead to data loss. Let me know if you'd like me to do that or if you'd rather handle it, thanks!
| Assignee | ||
Comment 11•1 month ago
|
||
I'll handle it.
| Assignee | ||
Comment 12•1 month ago
|
||
IIUC this has been introduced in Fx125, so all versions but ESR 115 are affected. I'll propose an uplift to ESR 153, too.
| Assignee | ||
Comment 13•1 month ago
|
||
BackupPrefFile writes go through PreferencesImpl::WritePrefFile, which coalesces
all writes through a single sPendingWriteData slot destined for the profile
prefs.js. A backup targets a different file with a filtered pref set and carries
a MozPromise. When the slot was already occupied, the backup took the coalescing
early-return, dropping its MozPromiseHolder without settling it and leaving its
filtered data in the slot. Give writes that carry a promise holder their own
PWRunnable with their own data so they never touch the shared slot.
Original Revision: https://phabricator.services.mozilla.com/D311551
Updated•1 month ago
|
Comment 14•1 month ago
|
||
firefox-beta Uplift Approval Request
- User impact if declined/Reason for urgency: Preference backups may not work as expected, resulting in potential data loss (only for the backups, but still).
Note: There seems to be no UI in Fenix to reach this code, so we can probably do without uplifting it there. - Code covered by automated testing?: yes
- Fix verified in Nightly?: yes
- Needs manual QE testing?: no
- Steps to reproduce for manual QE testing:
- Risk associated with taking this patch: low
- Explanation of risk level: The fix is a bit more than a on-liner, but straight forward and existing tests continue to pass + a new one.
- String changes made/needed?: None
- Is Android affected?: no
Comment 15•1 month ago
|
||
firefox-esr153 Uplift Approval Request
- User impact if declined/Reason for urgency: Preference backups may not work as expected, resulting in potential data loss (only for the backups, but still).
Note: There seems to be no UI in Fenix to reach this code, so we can probably do without uplifting it there. - Code covered by automated testing?: yes
- Fix verified in Nightly?: yes
- Needs manual QE testing?: no
- Steps to reproduce for manual QE testing:
- Risk associated with taking this patch: low
- Explanation of risk level: The fix is a bit more than a on-liner, but straight forward and existing tests continue to pass + a new one.
- String changes made/needed?: None
- Is Android affected?: no
| Assignee | ||
Comment 16•1 month ago
|
||
BackupPrefFile writes go through PreferencesImpl::WritePrefFile, which coalesces
all writes through a single sPendingWriteData slot destined for the profile
prefs.js. A backup targets a different file with a filtered pref set and carries
a MozPromise. When the slot was already occupied, the backup took the coalescing
early-return, dropping its MozPromiseHolder without settling it and leaving its
filtered data in the slot. Give writes that carry a promise holder their own
PWRunnable with their own data so they never touch the shared slot.
Original Revision: https://phabricator.services.mozilla.com/D311551
Updated•1 month ago
|
Updated•1 month ago
|
Comment 17•1 month ago
|
||
| uplift | ||
Updated•1 month ago
|
Updated•1 month ago
|
Comment 18•1 month ago
|
||
| uplift | ||
Updated•1 month ago
|
Updated•1 month ago
|
Updated•28 days ago
|
Description
•