Closed Bug 1425893 Opened 2 years ago Closed 2 years ago

stylo: thread '<unnamed>' panicked at 'assertion failed: `(left == right)` [@ style::style_adjuster::StyleAdjuster::adjust]

Categories

(Core :: CSS Parsing and Computation, defect, P3)

59 Branch
defect

Tracking

()

RESOLVED FIXED
mozilla59
Tracking Status
firefox-esr52 --- unaffected
firefox57 --- unaffected
firefox58 --- unaffected
firefox59 --- fixed

People

(Reporter: tsmith, Assigned: emilio)

References

(Blocks 1 open bug)

Details

(Keywords: assertion, testcase)

Attachments

(1 file)

Attached file testcase.html
thread '<unnamed>' panicked at 'assertion failed: `(left == right)`
  left: `Inline`,
 right: `Block`', /src/servo/components/style/style_adjuster.rs:352:8
stack backtrace:
   0:     0x7fad4e54b4a3 - std::sys::imp::backtrace::tracing::imp::unwind_backtrace::h8ed7485deb8ab958
                               at /checkout/src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
   1:     0x7fad4e545bf0 - std::sys_common::backtrace::_print::h3d4f9ea58578e60f
                               at /checkout/src/libstd/sys_common/backtrace.rs:69
   2:     0x7fad4e5589a3 - std::panicking::default_hook::{{closure}}::h0088fe51b67c687c
                               at /checkout/src/libstd/sys_common/backtrace.rs:58
                               at /checkout/src/libstd/panicking.rs:381
   3:     0x7fad4e558712 - std::panicking::default_hook::hf425c768c5ffbbad
                               at /checkout/src/libstd/panicking.rs:397
   4:     0x7fad4e558e67 - std::panicking::rust_panic_with_hook::h25b934bb4484e9e0
                               at /checkout/src/libstd/panicking.rs:577
   5:     0x7fad4e558d34 - std::panicking::begin_panic::h59483e27e93d7bc6
                               at /checkout/src/libstd/panicking.rs:538
   6:     0x7fad4e558c39 - std::panicking::begin_panic_fmt::h5f221297e8a3dbdb
                               at /checkout/src/libstd/panicking.rs:522
   7:     0x7fad4e160fe7 - style::style_adjuster::StyleAdjuster::adjust::h4840950d25bcb43f
                               at /src/servo/components/style/style_adjuster.rs:352
                               at /src/servo/components/style/style_adjuster.rs:564
   8:     0x7fad4e451026 - style::properties::cascade::h29f68c31c281ca49
                               at /src/obj-firefox/toolkit/library/x86_64-unknown-linux-gnu/debug/build/style-1ed2560fd1babf21/out/properties.rs:137518
                               at /src/obj-firefox/toolkit/library/x86_64-unknown-linux-gnu/debug/build/style-1ed2560fd1babf21/out/properties.rs:137108
   9:     0x7fad4e15d44c - style::stylist::Stylist::compute_style_with_inputs::h0622c3dc6c417ff8
                               at /src/servo/components/style/stylist.rs:933
  10:     0x7fad4e15bfac - style::stylist::Stylist::precomputed_values_for_pseudo_with_rule_node::h1ef1ad2a95a5db24
                               at /src/servo/components/style/stylist.rs:857
                               at /src/servo/components/style/stylist.rs:684
  11:     0x7fad4dd4cba7 - Servo_ComputedValues_GetForAnonymousBox
                               at /src/servo/ports/geckolib/glue.rs:2025
  12:     0x7fad4927a01a - _ZN7mozilla13ServoStyleSet34ResolveInheritingAnonymousBoxStyleEP6nsAtomPNS_17ServoStyleContextE
                               at /src/layout/style/ServoStyleSet.cpp:579
  13:     0x7fad49561f5e - _ZN7mozilla14StyleSetHandle3Ptr34ResolveInheritingAnonymousBoxStyleEP6nsAtomP14nsStyleContext
                               at /src/obj-firefox/dist/include/mozilla/StyleSetHandleInlines.h:146
  14:     0x7fad4956cbc7 - _ZN21nsCSSFrameConstructor22ConstructFieldSetFrameER23nsFrameConstructorStateRNS_21FrameConstructionItemEP16nsContainerFramePK14nsStyleDisplayR12nsFrameItems
                               at /src/layout/base/nsCSSFrameConstructor.cpp:3385
  15:     0x7fad4956f617 - _ZN21nsCSSFrameConstructor30ConstructFrameFromItemInternalERNS_21FrameConstructionItemER23nsFrameConstructorStateP16nsContainerFrameR12nsFrameItems
                               at /src/layout/base/nsCSSFrameConstructor.cpp:3996
  16:     0x7fad49576a55 - _ZN21nsCSSFrameConstructor23ConstructFramesFromItemER23nsFrameConstructorStateRNS_25FrameConstructionItemList8IteratorEP16nsContainerFrameR12nsFrameItems
                               at /src/layout/base/nsCSSFrameConstructor.cpp:6335
  17:     0x7fad49562465 - _ZN21nsCSSFrameConstructor27ConstructFramesFromItemListER23nsFrameConstructorStateRNS_25FrameConstructionItemListEP16nsContainerFramebR12nsFrameItems
                               at /src/layout/base/nsCSSFrameConstructor.cpp:10781
  18:     0x7fad49572467 - _ZN21nsCSSFrameConstructor15ConstructInlineER23nsFrameConstructorStateRNS_21FrameConstructionItemEP16nsContainerFramePK14nsStyleDisplayR12nsFrameItems
                               at /src/layout/base/nsCSSFrameConstructor.cpp:12137
  19:     0x7fad4956f617 - _ZN21nsCSSFrameConstructor30ConstructFrameFromItemInternalERNS_21FrameConstructionItemER23nsFrameConstructorStateP16nsContainerFrameR12nsFrameItems
                               at /src/layout/base/nsCSSFrameConstructor.cpp:3996
  20:     0x7fad49576a55 - _ZN21nsCSSFrameConstructor23ConstructFramesFromItemER23nsFrameConstructorStateRNS_25FrameConstructionItemList8IteratorEP16nsContainerFrameR12nsFrameItems
                               at /src/layout/base/nsCSSFrameConstructor.cpp:6335
  21:     0x7fad49562465 - _ZN21nsCSSFrameConstructor27ConstructFramesFromItemListER23nsFrameConstructorStateRNS_25FrameConstructionItemListEP16nsContainerFramebR12nsFrameItems
                               at /src/layout/base/nsCSSFrameConstructor.cpp:10781
  22:     0x7fad49563037 - _ZN21nsCSSFrameConstructor15ProcessChildrenER23nsFrameConstructorStateP10nsIContentP14nsStyleContextP16nsContainerFramebR12nsFrameItemsbP14PendingBindingP8nsIFrame
                               at /src/layout/base/nsCSSFrameConstructor.cpp:11095
  23:     0x7fad49568959 - _ZN21nsCSSFrameConstructor14ConstructBlockER23nsFrameConstructorStateP10nsIContentP16nsContainerFrameS5_P14nsStyleContextPS5_R12nsFrameItemsP8nsIFrameP14PendingBinding
                               at /src/layout/base/nsCSSFrameConstructor.cpp:12037
  24:     0x7fad4956d7f3 - _ZN21nsCSSFrameConstructor42ConstructNonScrollableBlockWithConstructorER23nsFrameConstructorStateRNS_21FrameConstructionItemEP16nsContainerFramePK14nsStyleDisplayR12nsFrameItemsPFP12nsBlockFrameP12nsIPresShellP14nsStyleContextE
                               at /src/layout/base/nsCSSFrameConstructor.cpp:5085
  25:     0x7fad4956d507 - _ZN21nsCSSFrameConstructor21ConstructDetailsFrameER23nsFrameConstructorStateRNS_21FrameConstructionItemEP16nsContainerFramePK14nsStyleDisplayR12nsFrameItems
  26:     0x7fad4956f617 - _ZN21nsCSSFrameConstructor30ConstructFrameFromItemInternalERNS_21FrameConstructionItemER23nsFrameConstructorStateP16nsContainerFrameR12nsFrameItems
                               at /src/layout/base/nsCSSFrameConstructor.cpp:3996
  27:     0x7fad49576a55 - _ZN21nsCSSFrameConstructor23ConstructFramesFromItemER23nsFrameConstructorStateRNS_25FrameConstructionItemList8IteratorEP16nsContainerFrameR12nsFrameItems
                               at /src/layout/base/nsCSSFrameConstructor.cpp:6335
  28:     0x7fad49562465 - _ZN21nsCSSFrameConstructor27ConstructFramesFromItemListER23nsFrameConstructorStateRNS_25FrameConstructionItemListEP16nsContainerFramebR12nsFrameItems
                               at /src/layout/base/nsCSSFrameConstructor.cpp:10781
  29:     0x7fad49572467 - _ZN21nsCSSFrameConstructor15ConstructInlineER23nsFrameConstructorStateRNS_21FrameConstructionItemEP16nsContainerFramePK14nsStyleDisplayR12nsFrameItems
                               at /src/layout/base/nsCSSFrameConstructor.cpp:12137
  30:     0x7fad4956f617 - _ZN21nsCSSFrameConstructor30ConstructFrameFromItemInternalERNS_21FrameConstructionItemER23nsFrameConstructorStateP16nsContainerFrameR12nsFrameItems
                               at /src/layout/base/nsCSSFrameConstructor.cpp:3996
  31:     0x7fad49576a55 - _ZN21nsCSSFrameConstructor23ConstructFramesFromItemER23nsFrameConstructorStateRNS_25FrameConstructionItemList8IteratorEP16nsContainerFrameR12nsFrameItems
                               at /src/layout/base/nsCSSFrameConstructor.cpp:6335
  32:     0x7fad49562465 - _ZN21nsCSSFrameConstructor27ConstructFramesFromItemListER23nsFrameConstructorStateRNS_25FrameConstructionItemListEP16nsContainerFramebR12nsFrameItems
                               at /src/layout/base/nsCSSFrameConstructor.cpp:10781
  33:     0x7fad49563037 - _ZN21nsCSSFrameConstructor15ProcessChildrenER23nsFrameConstructorStateP10nsIContentP14nsStyleContextP16nsContainerFramebR12nsFrameItemsbP14PendingBindingP8nsIFrame
                               at /src/layout/base/nsCSSFrameConstructor.cpp:11095
  34:     0x7fad49568959 - _ZN21nsCSSFrameConstructor14ConstructBlockER23nsFrameConstructorStateP10nsIContentP16nsContainerFrameS5_P14nsStyleContextPS5_R12nsFrameItemsP8nsIFrameP14PendingBinding
                               at /src/layout/base/nsCSSFrameConstructor.cpp:12037
  35:     0x7fad4956d7f3 - _ZN21nsCSSFrameConstructor42ConstructNonScrollableBlockWithConstructorER23nsFrameConstructorStateRNS_21FrameConstructionItemEP16nsContainerFramePK14nsStyleDisplayR12nsFrameItemsPFP12nsBlockFrameP12nsIPresShellP14nsStyleContextE
                               at /src/layout/base/nsCSSFrameConstructor.cpp:5085
  36:     0x7fad49570977 - _ZN21nsCSSFrameConstructor27ConstructNonScrollableBlockER23nsFrameConstructorStateRNS_21FrameConstructionItemEP16nsContainerFramePK14nsStyleDisplayR12nsFrameItems
                               at /src/layout/base/nsCSSFrameConstructor.cpp:5049
  37:     0x7fad4956f617 - _ZN21nsCSSFrameConstructor30ConstructFrameFromItemInternalERNS_21FrameConstructionItemER23nsFrameConstructorStateP16nsContainerFrameR12nsFrameItems
                               at /src/layout/base/nsCSSFrameConstructor.cpp:3996
  38:     0x7fad49576a55 - _ZN21nsCSSFrameConstructor23ConstructFramesFromItemER23nsFrameConstructorStateRNS_25FrameConstructionItemList8IteratorEP16nsContainerFrameR12nsFrameItems
                               at /src/layout/base/nsCSSFrameConstructor.cpp:6335
  39:     0x7fad49562465 - _ZN21nsCSSFrameConstructor27ConstructFramesFromItemListER23nsFrameConstructorStateRNS_25FrameConstructionItemListEP16nsContainerFramebR12nsFrameItems
                               at /src/layout/base/nsCSSFrameConstructor.cpp:10781
  40:     0x7fad4957bfd1 - _ZN21nsCSSFrameConstructor20ContentRangeInsertedEP10nsIContentS1_S1_P21nsILayoutHistoryStateNS_13InsertionKindEP16TreeMatchContext
                               at /src/layout/base/nsCSSFrameConstructor.cpp:8231
  41:     0x7fad49577340 - _ZN21nsCSSFrameConstructor24RecreateFramesForContentEP10nsIContentNS_13InsertionKindE
                               at /src/layout/base/nsCSSFrameConstructor.cpp:9827
  42:     0x7fad494cd19a - _ZN7mozilla14RestyleManager21ProcessRestyledFramesER17nsStyleChangeList
                               at /src/layout/base/RestyleManager.cpp:1523
  43:     0x7fad49525aca - _ZN7mozilla19ServoRestyleManager24DoProcessPendingRestylesENS_19ServoTraversalFlagsE
                               at /src/layout/base/ServoRestyleManager.cpp:1161
  44:     0x7fad494f1076 - _ZN7mozilla9PresShell27DoFlushPendingNotificationsENS_14ChangesToFlushE
                               at /src/layout/base/PresShell.cpp:4185
  45:     0x7fad494f088c - _ZN7mozilla9PresShell27DoFlushPendingNotificationsENS_9FlushTypeE
                               at /src/layout/base/PresShell.cpp:4058
  46:     0x7fad45b68502 - _ZN10nsDocument25FlushPendingNotificationsEN7mozilla9FlushTypeENS0_11FlushTargetE
                               at /src/dom/base/nsDocument.cpp:8311
  47:     0x7fad44c0c011 - _ZN11nsDocLoader16DocLoaderIsEmptyEb
                               at /src/uriloader/base/nsDocLoader.cpp:704
  48:     0x7fad44c0db45 - _ZN11nsDocLoader13OnStopRequestEP10nsIRequestP11nsISupports8nsresult
                               at /src/uriloader/base/nsDocLoader.cpp:633
  49:     0x7fad44c0e55c - _ZThn8_N11nsDocLoader13OnStopRequestEP10nsIRequestP11nsISupports8nsresult
                               at /src/uriloader/base/nsDocLoader.cpp:0
  50:     0x7fad43436b25 - _ZN7mozilla3net11nsLoadGroup13RemoveRequestEP10nsIRequestP11nsISupports8nsresult
                               at /src/netwerk/base/nsLoadGroup.cpp:629
  51:     0x7fad45b6cea2 - _ZN10nsDocument15DoUnblockOnloadEv
                               at /src/dom/base/nsDocument.cpp:9133
  52:     0x7fad45b6cb7e - _ZN10nsDocument13UnblockOnloadEb
                               at /src/dom/base/nsDocument.cpp:9055
  53:     0x7fad45b533ee - _ZN10nsDocument27DispatchContentLoadedEventsEv
                               at /src/dom/base/nsDocument.cpp:5698
  54:     0x7fad45bc0005 - _ZN7mozilla6detail18RunnableMethodImplIP10nsDocumentMS2_FvvELb1ELNS_12RunnableKindE0EJEE3RunEv
                               at /src/obj-firefox/dist/include/nsThreadUtils.h:1192
  55:     0x7fad4327dfa2 - _ZN8nsThread16ProcessNextEventEbPb
                               at /src/xpcom/threads/nsThread.cpp:1039
  56:     0x7fad432a09f8 - _Z19NS_ProcessNextEventP9nsIThreadb
                               at /src/xpcom/threads/nsThreadUtils.cpp:508
  57:     0x7fad43eb52d3 - _ZN7mozilla3ipc11MessagePump3RunEPN4base11MessagePump8DelegateE
                               at /src/ipc/glue/MessagePump.cpp:97
  58:     0x7fad43dfb1c8 - _ZN11MessageLoop11RunInternalEv
                               at /src/ipc/chromium/src/base/message_loop.cc:326
  59:     0x7fad43dfb04c - _ZN11MessageLoop3RunEv
                               at /src/ipc/chromium/src/base/message_loop.cc:299
  60:     0x7fad48f3dfba - _ZN14nsBaseAppShell3RunEv
                               at /src/widget/nsBaseAppShell.cpp:157
  61:     0x7fad4c2a6aa4 - _ZN12nsAppStartup3RunEv
                               at /src/toolkit/components/startup/nsAppStartup.cpp:288
  62:     0x7fad4c42f87e - _ZN7XREMain11XRE_mainRunEv
                               at /src/toolkit/xre/nsAppRunner.cpp:4709
  63:     0x7fad4c43194e - _ZN7XREMain8XRE_mainEiPPcRKN7mozilla15BootstrapConfigE
                               at /src/toolkit/xre/nsAppRunner.cpp:4871
  64:     0x7fad4c432981 - _Z8XRE_mainiPPcRKN7mozilla15BootstrapConfigE
                               at /src/toolkit/xre/nsAppRunner.cpp:4963
  65:           0x4f013a - _ZL7do_mainiPPcS0_
                               at /src/browser/app/nsBrowserApp.cpp:231
  66:           0x4ef96a - main
                               at /src/browser/app/nsBrowserApp.cpp:304
  67:     0x7fad6291d82f - __libc_start_main
  68:           0x41f3d4 - <unknown>
Flags: in-testsuite?
The failing assertion here is:

>        if !flags.contains(CascadeFlags::IS_FIELDSET_CONTENT) {
>            return;
>        }
>        debug_assert_eq!(self.style.get_box().clone_display(), Display::Block);
https://searchfox.org/mozilla-central/rev/b1e0ae2573e88391a7ed92407568be77994c9317/servo/components/style/style_adjuster.rs#352

And apparently clone_display() is returning Inline rather than Block.  SearchFox says this code was added in bug 1379901 (after I dig past one stylistic tweak) --> adding dependency & CC'ing the folks involved there.

xidorn or emilio, maybe you could take a look?
Depends on: 1379901
Flags: needinfo?(xidorn+moz)
Summary: thread '<unnamed>' panicked at 'assertion failed: `(left == right)` [@ style::style_adjuster::StyleAdjuster::adjust] → stylo: thread '<unnamed>' panicked at 'assertion failed: `(left == right)` [@ style::style_adjuster::StyleAdjuster::adjust]
I bet this is a visited style we're adjusting, and this is a regression from https://github.com/servo/servo/pull/19551.
Ok, I hadn't look at the test-case, but it's obvious now.
Assignee: nobody → emilio
https://github.com/servo/servo/pull/19601 is the fix, will land a crashtest when that's in the tree.
https://hg.mozilla.org/mozilla-central/rev/4e363d44418f
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla59
Flags: in-testsuite? → in-testsuite+
You need to log in before you can comment on or make changes to this bug.