Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a (broken) Acid2 reftest. Fix #1993 #2741

Merged
merged 2 commits into from Aug 21, 2014
Merged

Conversation

@SimonSapin
Copy link
Member

SimonSapin commented Jul 1, 2014

Do not merge yet. This new test is very much intermittent, at least on my machine. Just as frequently as it passes, it test sends Servo in an infinite loop or just gives an empty (white) output (and obviously fails.)

@pcwalton, any idea what we could do about this?


The rendering is incorrect, but this should help catch further regressions.

The test is modified to add the following CSS:

.intro { display: none }
html #top { margin-top: 0 }

This works around the lack of layer pixel snapping. (See #2035)

The reference is modified to match the current rendering of the test:

  • Rows 1, 2 (forehead), 4, and 5 (eyes) are missing.
  • The yellow background in row 3 overflows by 1px at the bottom.
  • The top-right and bottom-left borders of the nose are 1px to high.
  • Row 12’s height is 3px more than it should be.
  • Rows 13 and 14’s positions are 4px lower than they should be.

(See http://www.webstandards.org/action/acid2/guide/ for row numbers.)

The nose issue seems be related to rounding vs truncating when pixel-snapping borders, but this is only a guess.

Adding .chin div { font-size: 3px } works around the chin issue (rows 12 to 14) for reasons that escape me yet.

@hoppipolla-critic-bot
Copy link

hoppipolla-critic-bot commented Jul 1, 2014

Critic review: https://critic.hoppipolla.co.uk/r/1941

This is an external review system which you may optionally use for the code review of your pull request.

In order to help critic track your changes, please do not make in-place history rewrites (e.g. via git rebase -i or git commit --amend) when updating this pull request.

@SimonSapin
Copy link
Member Author

SimonSapin commented Jul 1, 2014

Symptoms of the "infinite loop": Servo is unresponsive to input and uses ~200% CPU (i.e. two CPU-bound threads). Output with RUST_BACKTRACE=1 of such a run:

task 'LayoutWorker' failed at 'assertion failed: borrow != WRITING && borrow != UNUSED', /home/travis/build/mozilla-servo/rust/src/libcore/cell.rs:324
stack backtrace:
   1:          0x13ab280 - rt::backtrace::imp::write::h5e9d065efede97bclIp::v0.11.0.pre
   2:          0x13b2a30 - failure::on_fail::hbb51d7c086344cbfA3p::v0.11.0.pre
   3:          0x13d60c0 - unwind::begin_unwind_inner::hd8bdef21f8d4badcQRd::v0.11.0.pre
   4:          0x13d5b40 - unwind::begin_unwind_fmt::h91d0f7ba3a8b804bjPd::v0.11.0.pre
   5:          0x13d5b00 - rust_begin_unwind
   6:          0x14086a0 - failure::begin_unwind::hebeb2a4880fe9cba23v::v0.11.0.pre
   7:           0xc7cce0 - cell::Ref<'b, T>.Drop::drop::h6311758492298734858::v0.1
   8:           0xdb57b0 - core..cell..Ref<'_,dom..node..NodeFlags>::glue_drop.58668::h2e5dc39d77f6813b
   9:           0xdb5700 - dom::node::Node.RawLayoutNodeHelpers::get_hover_state_for_layout::h36186efe849f072fqZW::v0.1
  10:           0x91c560 - wrapper::LayoutElement<'le>.TElement::get_hover_state::he4ccdcbc72e3365bluo::v0.1
  11:           0x92da40 - selector_matching::matches_simple_selector::h1443432580952994148::v0.1
  12:           0x92d9e0 - selector_matching::matches_compound_selector_internal::closure.25282
  13:           0x92d790 - iter::Iterator::all::h9006556589474605702::v0.1
  14:           0x92d340 - selector_matching::matches_compound_selector_internal::h9754865580906714703::v0.1
  15:           0x92d340 - selector_matching::matches_compound_selector_internal::h9754865580906714703::v0.1
  16:           0x92d2d0 - selector_matching::matches_compound_selector::h12060844862433601765::v0.1
  17:           0x92d180 - selector_matching::SelectorMap::get_matching_rules::h13938740138640257508::v0.1
  18:           0x9322b0 - selector_matching::SelectorMap::get_matching_rules_from_hash_ignoring_case::h3886177516948962581::v0.1
  19:           0x92bf00 - selector_matching::SelectorMap::get_all_matching_rules::h7826050655553014701::v0.1
  20:           0x92b9b0 - selector_matching::Stylist::push_applicable_declarations::h7885078212886226413::v0.1
  21:           0x8d4760 - css::matching::LayoutNode<'ln>.MatchMethods::match_node::h3e171c7931745777nip::v0.1
  22:           0x8d3790 - parallel::recalc_style_for_node::h1719f2367d31579cC2k::v0.1
  23:           0x879700 - workqueue::WorkerThread<QueueData, WorkData>::start::h8057635456448450186::v0.1
  24:           0x8795b0 - workqueue::WorkQueue<QueueData, WorkData>::new::closure.20979
  25:          0x122df30 - task::spawn_opts::closure.7193
  26:          0x13d2bd0 - task::Task::run::closure.5322
  27:          0x13d6e40 - rust_try
  28:          0x13d5620 - unwind::try::h79ee904cb5c2eb07fGd::v0.11.0.pre
  29:          0x13d2a50 - task::Task::run::h666877d2deaedfddVVc::v0.11.0.pre
  30:          0x122dcd0 - task::spawn_opts::closure.7166
  31:          0x13d4cb0 - thread::thread_start::h3a1606ec60265b9bkdd::v0.11.0.pre
  32:     0x7f56a4c75060 - start_thread
  33:     0x7f56a3a67489 - __clone
  34:                0x0 - <unknown>
^C
@SimonSapin SimonSapin mentioned this pull request Jul 16, 2014
@Ms2ger
Copy link
Contributor

Ms2ger commented Aug 14, 2014

@SimonSapin, are you planning to revive this PR?

@SimonSapin
Copy link
Member Author

SimonSapin commented Aug 14, 2014

So, Acid2 is still broken (although in a different way) but it seems to render reliably now (instead of intermittently going into an infinite loop or rendering a white page.) I’ve rebased this and updated the expected rendering. This should be ready to merge now.

r? @Ms2ger

@pcwalton
Copy link
Contributor

pcwalton commented Aug 14, 2014

👍

@larsbergstrom
Copy link
Contributor

larsbergstrom commented Aug 17, 2014

Can we check this again with a rebase? There are some changes (e.g., #3102 ) that fix some memory corruption issues that we causing us major graphics painting issues on some platforms.

@SimonSapin
Copy link
Member Author

SimonSapin commented Aug 19, 2014

This is what I’m getting on Linux:
acid2_ref_broken

Note the 1px horizontal white line near the chin. That line is not white on Travis OS X.

Travis Linux is different, but I don’t know how.

@SimonSapin
Copy link
Member Author

SimonSapin commented Aug 19, 2014

Rebased: https://travis-ci.org/servo/servo/builds/32797282 Doesn’t seem to change much compared to last week.

SimonSapin added 2 commits Aug 21, 2014
The rendering is incorrect
and the test is marked as flaky on Linux or on GPU rendering,
but this should help catch further regressions.

The test is modified to add the following CSS:

    .intro { display: none }
    html #top { margin-top: 0 }

To disable the "scrolling" part of the test.

The reference is modified to match the current rendering of the test:

* Rows 4 and 5 (eyes) have a red background.
* The nose is not quite where it should be.
* Row 12’s height is 3px more than it should be.

(See http://www.webstandards.org/action/acid2/guide/ for row numbers.)

The nose issue seems be related to rounding vs truncating
when pixel-snapping borders, but this is only a guess.
@SimonSapin SimonSapin force-pushed the SimonSapin:acid2-reftest branch from 9f5ae4c to 4d4c034 Aug 21, 2014
@SimonSapin
Copy link
Member Author

SimonSapin commented Aug 21, 2014

Another attempt: this time the test is marked with flaky_gpu and flaky_linux (the latter is new), so we’re really only testing CPU rendering on OS X. I’m sad to be doing this, but it should still be better than nothing.

https://travis-ci.org/servo/servo/builds/33218954

@glennw
Copy link
Member

glennw commented Aug 21, 2014

I bisected this yesterday and the white line started appearing on my linux box with this commit: 81f5da9

It's a big diff, but I will try to look into it over the next day or so to narrow down the exact cause.

@glennw
Copy link
Member

glennw commented Aug 21, 2014

r+

SimonSapin added a commit that referenced this pull request Aug 21, 2014
Add a (broken) Acid2 reftest. Fix #1993
@SimonSapin SimonSapin merged commit e1c55c1 into servo:master Aug 21, 2014
1 check passed
1 check passed
continuous-integration/travis-ci The Travis CI build passed
Details
@SimonSapin SimonSapin deleted the SimonSapin:acid2-reftest branch Aug 21, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

6 participants
You can’t perform that action at this time.