ABORT: should not get marked modified during parsing: '!data->mSheet->IsModified()'

RESOLVED FIXED in mozilla11

Status

()

Core
CSS Parsing and Computation
P2
critical
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: bc, Assigned: bz)

Tracking

(Blocks: 1 bug, {assertion})

Trunk
mozilla11
x86
All
assertion
Points:
---
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(firefox8 affected, firefox9 affected, firefox10 affected)

Details

(URL)

Attachments

(2 attachments)

(Reporter)

Description

6 years ago
1. http://www.t-i-forum.co.jp/function/map/
2. ABORT: should not get marked modified during parsing: '!data->mSheet->IsModified()', file /work/mozilla/builds/nightly/mozilla/layout/style/Loader.cpp, line 1754

0  0x00043ef4 in TouchBadMemory () at /work/mozilla/builds/nightly/mozilla/memory/mozalloc/mozalloc_abort.cpp:66
#1  0x00043f4f in mozalloc_abort (msg=0xbfffc750 "###!!! ABORT: should not get marked modified during parsing: '!data->mSheet->IsModified()', file /work/mozilla/builds/nightly/mozilla/layout/style/Loader.cpp, line 1754") at /work/mozilla/builds/nightly/mozilla/memory/mozalloc/mozalloc_abort.cpp:87
#2  0x06b351dd in Abort (aMsg=Could not find the frame base for "Abort(char const*)".
) at /work/mozilla/builds/nightly/mozilla/xpcom/base/nsDebugImpl.cpp:388
#3  0x06b35786 in NS_DebugBreak_P (aSeverity=3, aStr=0x73d1d7c "should not get marked modified during parsing", aExpr=0x73d1d60 "!data->mSheet->IsModified()", aFile=0x73d1050 "/work/mozilla/builds/nightly/mozilla/layout/style/Loader.cpp", aLine=1754) at /work/mozilla/builds/nightly/mozilla/xpcom/base/nsDebugImpl.cpp:345
#4  0x057839f5 in mozilla::css::Loader::DoSheetComplete (this=0x23a8eae0, aLoadData=0x25c60710, aStatus=0, aDatasToNotify=@0xbfffcc58) at /work/mozilla/builds/nightly/mozilla/layout/style/Loader.cpp:1753
#5  0x05783d49 in mozilla::css::Loader::SheetComplete (this=0x23a8eae0, aLoadData=0x25c60710, aStatus=0) at /work/mozilla/builds/nightly/mozilla/layout/style/Loader.cpp:1683
#6  0x05784610 in mozilla::css::Loader::ParseSheet (this=0x23a8eae0, aInput=@0x25ca4334, aLoadData=0x25c60710, aCompleted=@0xbfffce2b) at /work/mozilla/builds/nightly/mozilla/layout/style/Loader.cpp:1658
#7  0x05786502 in mozilla::css::SheetLoadData::OnStreamComplete (this=0x25c60710, aLoader=0x25ca4300, aContext=0x0, aStatus=0, aBuffer=@0x25ca4334) at /work/mozilla/builds/nightly/mozilla/layout/style/Loader.cpp:991
#8 

Nightly, Aurora, Beta - Linux, Mac, Windows
(Assignee)

Comment 1

6 years ago
The real issue is an assertion much earlier:

###!!! ASSERTION: CreateSheet lied about the state: 'existingData', file ../../../mozilla/layout/style/Loader.cpp, line 1486

The rest follows.
Assignee: nobody → bzbarsky
(Assignee)

Comment 2

6 years ago
Created attachment 572535 [details]
Minimal testcase

At least for the asserts.  The problem is that IsAlternate() on the second title="x" stylesheet makes that title non-alternate, thus kicking off the load of the first title="x" stylesheet.
(Assignee)

Comment 3

6 years ago
And in particular, IsAlternate calls SetHeaderData on the document which calls SetPreferredSheet on the loader, which messes with the mPendingDatas hashtable.

We need to either make some part of that async or deal with the table mutation.
(Assignee)

Comment 4

6 years ago
Created attachment 572547 [details] [diff] [review]
Fix the ordering if IsAlternate calls and sheet state determination so tht the hashtable munging IsAlternate can do doesn't mess up our sheet states.
Attachment #572547 - Flags: review?(jonas)
(Assignee)

Updated

6 years ago
Priority: -- → P2
Whiteboard: [need review]
Attachment #572547 - Flags: review?(jonas) → review+
(Assignee)

Comment 5

6 years ago
http://hg.mozilla.org/integration/mozilla-inbound/rev/27b8e5fb9699
Flags: in-testsuite+
Whiteboard: [need review]
Target Milestone: --- → mozilla10
Backed out for retest failures on Windows:
https://tbpl.mozilla.org/?tree=Mozilla-Inbound&rev=5c0861ec147f
https://tbpl.mozilla.org/php/getParsedLog.php?id=7274624&tree=Mozilla-Inbound
{
REFTEST TEST-UNEXPECTED-FAIL | file:///c:/talos-slave/test/build/reftest/tests/content/test/reftest/xml-stylesheet/css_relative_href_also_external.xml | assertion count 1 is more than expected 0 assertions
REFTEST TEST-UNEXPECTED-FAIL | file:///c:/talos-slave/test/build/reftest/tests/content/test/reftest/xml-stylesheet/css_relative_href_also_external_override.xml | assertion count 1 is more than expected 0 assertions 
}

https://hg.mozilla.org/integration/mozilla-inbound/rev/095a745d1e72
Target Milestone: mozilla10 → ---
(Assignee)

Comment 7

6 years ago
Ah, bah.  I failed to set *aIsAlternate on the various CSS loader methods.  Fixing that.
(Assignee)

Comment 8

6 years ago
http://hg.mozilla.org/integration/mozilla-inbound/rev/f5a4970361c8 with that fixed
Target Milestone: --- → mozilla11
https://hg.mozilla.org/mozilla-central/rev/f5a4970361c8
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.