Crash in [@ OOM | large | NS_ABORT_OOM | nsINode::IsEqualNode] in nsFocusManager
Categories
(Core :: DOM: Core & HTML, defect, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox-esr60 | --- | unaffected |
firefox65 | --- | wontfix |
firefox66 | --- | wontfix |
firefox67 | --- | fixed |
People
(Reporter: philipp, Assigned: bzbarsky)
Details
(Keywords: crash, regression, Whiteboard: [MemShrink])
Crash Data
Attachments
(1 file)
(deleted),
text/x-phabricator-request
|
Details |
This bug is for crash report bp-34468577-84a8-4df1-8cc7-638eb0190224.
Top 10 frames of crashing thread:
0 xul.dll NS_ABORT_OOM xpcom/base/nsDebugImpl.cpp:603
1 xul.dll nsINode::IsEqualNode dom/base/nsINode.cpp:881
2 xul.dll void nsFocusManager::Focus dom/base/nsFocusManager.cpp:1823
3 xul.dll nsFocusManager::WindowRaised dom/base/nsFocusManager.cpp:690
4 xul.dll nsWebBrowser::FocusActivate toolkit/components/browser/nsWebBrowser.cpp:1364
5 xul.dll mozilla::dom::TabChild::RecvActivate dom/ipc/TabChild.cpp:1314
6 xul.dll mozilla::dom::ContentBridgeChild::RecvActivate dom/ipc/ContentChild.cpp:3283
7 xul.dll mozilla::dom::PContentChild::OnMessageReceived ipc/ipdl/PContentChild.cpp:8675
8 xul.dll void mozilla::ipc::MessageChannel::DispatchMessage ipc/glue/MessageChannel.cpp:2087
9 xul.dll mozilla::ipc::MessageChannel::MessageTask::Run ipc/glue/MessageChannel.cpp:1967
oom content crashes with this signature and a stack touching nsFocusManager are regressing since firefox 63.
could it be potentially potentially related to the changes in bug 1480645 which would fit into the timeframe of the regression?
Comment 1•6 years ago
|
||
Hi Kyle, can you please take a look and suggest if bug 1480645 has something to do here? Thanks!
Comment 2•6 years ago
|
||
While the timelines do match up, Bug 1480645 just streamlined the calls we use to focus, so AFAICT there's not really a code change that would've triggered this. We didn't change anything about how node processing works.
In some of the crash reports, it looks like we're making extremely large allocations (sometimes hundreds of mb), which is triggering the crash on 32-bit systems (though I did see a few x64 stacks). I'm not sure why/how we'd get a few hundred mb of character data being appended during that check.
ni?'ing bz who was also around some of the CharacterData stuff earlier, just for context if nothing else.
Assignee | ||
Comment 3•6 years ago
|
||
I'm not sure why/how we'd get a few hundred mb of character data being appended during that check.
The simple answer would be a textnode with a few hundred MB of text in it.
The crash in comment 0 is allocating 1.84MB, which is quite believable.
We could change the IsEqualNode code to do in-place compares, but chances are some other 2MB allocation would happen.... :(
Assignee | ||
Comment 4•6 years ago
|
||
I also kinda wonder whether IsEqualNode should fast-path pointer-identical nodes...
Updated•6 years ago
|
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Comment 5•6 years ago
|
||
Assignee | ||
Comment 6•6 years ago
|
||
On a silly "take a largish page (searchfox for one of our files), deep-clone the body, isEqualNode the original and the clone" testcase the new thing is about 4x faster than what we do now.
Updated•6 years ago
|
Comment 7•6 years ago
|
||
Maybe file a bug in Core::String about this missing comparison function that you had to implement yourself? I don't know if it is worth fixing, but it is good practice to at least complain "up stream" about missing features.
Assignee | ||
Comment 8•6 years ago
|
||
Filed bug 1532356 and will reference it in the code comments.
Comment 10•6 years ago
|
||
Backed out for failing xpcshell at dom/base/test/unit/test_isequalnode.js
Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=231693609&repo=autoland&lineNumber=2151
Backout: https://hg.mozilla.org/integration/autoland/rev/ed6397d7e51a7e9084281d2a8b33b0c5e8eeedb7
Comment 11•6 years ago
|
||
Some of the other failures in that push look related. For instance, there are assertions like this:
Child 2462, Main Thread] ###!!! ASSERTION: nsTDependentString must wrap only null-terminated strings. You are probably looking for nsTDependentSubstring.: 'this->mData[substring_type::mLength] == 0', file /builds/worker/workspace/build/src/obj-firefox/dist/include/nsTString.h, line 456
Assignee | ||
Comment 12•6 years ago
|
||
Hrm. I guess nsTextFragment sometimes null-terminates its stuff (e.g. the aForce2b codepath in SetTo) and sometimes doesn't (e.g. the aLength == 1 codepath). What a mess. :(
Comment 13•6 years ago
|
||
There are also other failures that seem to be related https://treeherder.mozilla.org/#/jobs?repo=autoland&resultStatus=testfailed%2Cbusted%2Cexception&revision=cc4b2dbdfd83244f10bbdc8bdf588edaea618663
Assignee | ||
Comment 14•6 years ago
|
||
Yes, those are all the same assertion failure... I have a try run going with that fixed to see whether there's anything else in there.
Assignee | ||
Updated•6 years ago
|
Comment 15•6 years ago
|
||
Comment 16•6 years ago
|
||
bugherder |
Updated•6 years ago
|
Updated•6 years ago
|
Description
•