Closed Bug 1519463 Opened 3 years ago Closed 3 years ago

ver-pelis-online.com shows "this page may be slowing down your browser" and crashes tab eventually

Categories

(Core :: Performance, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1490401
Tracking Status
firefox66 --- affected

People

(Reporter: yoasif, Unassigned)

References

Details

(Keywords: nightly-community, Whiteboard: [webcompat][qf-])

Attachments

(1 file)

Saw this reported on twitter -- https://twitter.com/ariel_anonis/status/1083761234703470592

how to crash your @firefox and your system whit a web site "~# firefox --new-window http://ver-pelis-online.com/estrenos/527-venom-ver.html

STR:

  1. Open Firefox
  2. Visit http://ver-pelis-online.com/estrenos/527-venom-ver.html
  3. Wait

What happens:

I see the "a web page is slowing down your browser" message for a while until the tab eventually crashes.

Expected result:

The tab should not crash here, especially without generating a crash report.

Profile: https://perfht.ml/2VKC3il

FWIW, the page does not crash in Chromium.

Whiteboard: [qf]

Profile that contains the page: https://perfht.ml/2QYfjb0

Chrome also runs the AdscoreInit function, but only takes 700ms in it, and the "d" function (which is what calls window.matchMedia) only ran for 15.9ms.

Emilio, do you have an idea what could be making window.matchMedia so expensive on this page?

Flags: needinfo?(emilio)
Whiteboard: [qf] → [qf:p2:pageload]

(In reply to Markus Stange [:mstange] from comment #3)

Emilio, do you have an idea what could be making window.matchMedia so expensive on this page?

My guess is that they're calling it a lot in some sort of infinite loop, looking at the GC in that page, but not sure yet. Will take a look.

Yeah, logging the calls to SetText shows:

SetText((min-device-width: -80303999px))
SetText((min-device-width: -80305999px))
SetText((min-device-width: -80307999px))
SetText((min-device-width: -80309999px))
SetText((min-device-width: -80311999px))
SetText((min-device-width: -80313999px))
[...]
SetText((min-device-width: -80559999px))
SetText((min-device-width: -80561999px))
SetText((min-device-width: -80563999px))
SetText((min-device-width: -80565999px))
SetText((min-device-width: -80567999px))
SetText((min-device-width: -80569999px))
SetText((min-device-width: -80571999px))
SetText((min-device-width: -80573999px))
SetText((min-device-width: -80575999px))
SetText((min-device-width: -80577999px))
SetText((min-device-width: -80579999px))
SetText((min-device-width: -80581999px))
SetText((min-device-width: -80583999px))
SetText((min-device-width: -80585999px))
SetText((min-device-width: -80587999px))
SetText((min-device-width: -80589999px))
SetText((min-device-width: -80591999px))
SetText((min-device-width: -80593999px))
SetText((min-device-width: -80595999px))
SetText((min-device-width: -80597999px))
SetText((min-device-width: -80599999px))
SetText((min-device-width: -80601999px))
SetText((min-device-width: -80603999px))
SetText((min-device-width: -80605999px))
SetText((min-device-width: -80607999px))
SetText((min-device-width: -80609999px))
SetText((min-device-width: -80611999px))
SetText((min-device-width: -80613999px))
SetText((min-device-width: -80615999px))
SetText((min-device-width: -80617999px))
SetText((min-device-width: -80619999px))
SetText((min-device-width: -80621999px))
SetText((min-device-width: -80623999px))
SetText((min-device-width: -80625999px))
SetText((min-device-width: -80627999px))
SetText((min-device-width: -80629999px))
SetText((min-device-width: -80631999px))
SetText((min-device-width: -80633999px))
SetText((min-device-width: -80635999px))
SetText((min-device-width: -80637999px))
SetText((min-device-width: -80639999px))
SetText((min-device-width: -80641999px))
SetText((min-device-width: -80643999px))
SetText((min-device-width: -80645999px))
SetText((min-device-width: -80647999px))
SetText((min-device-width: -80649999px))
SetText((min-device-width: -80651999px))
SetText((min-device-width: -80653999px))
SetText((min-device-width: -80655999px))
SetText((min-device-width: -80657999px))
SetText((min-device-width: -80659999px))
SetText((min-device-width: -80661999px))
SetText((min-device-width: -80663999px))
SetText((min-device-width: -80665999px))
SetText((min-device-width: -80667999px))
SetText((min-device-width: -80669999px))
SetText((min-device-width: -80671999px))
SetText((min-device-width: -80673999px))
SetText((min-device-width: -80675999px))
SetText((min-device-width: -80677999px))
SetText((min-device-width: -80679999px))
SetText((min-device-width: -80681999px))
SetText((min-device-width: -80683999px))
SetText((min-device-width: -80685999px))
SetText((min-device-width: -80687999px))
SetText((min-device-width: -80689999px))
SetText((min-device-width: -80691999px))
SetText((min-device-width: -80693999px))
SetText((min-device-width: -80695999px))
SetText((min-device-width: -80697999px))
SetText((min-device-width: -80699999px))
SetText((min-device-width: -80701999px))
SetText((min-device-width: -80703999px))
SetText((min-device-width: -80705999px))
SetText((min-device-width: -80707999px))
SetText((min-device-width: -80709999px))
SetText((min-device-width: -80711999px))
SetText((min-device-width: -80713999px))
SetText((min-device-width: -80715999px))
SetText((min-device-width: -80717999px))
SetText((min-device-width: -80719999px))
SetText((min-device-width: -80721999px))
SetText((min-device-width: -80723999px))
SetText((min-device-width: -80725999px))
SetText((min-device-width: -80727999px))
SetText((min-device-width: -80729999px))
SetText((min-device-width: -80731999px))
SetText((min-device-width: -80733999px))
SetText((min-device-width: -80735999px))
SetText((min-device-width: -80737999px))
SetText((min-device-width: -80739999px))
SetText((min-device-width: -80741999px))
SetText((min-device-width: -80743999px))
SetText((min-device-width: -80745999px))
SetText((min-device-width: -80747999px))
SetText((min-device-width: -80749999px))
SetText((min-device-width: -80751999px))
SetText((min-device-width: -80753999px))
SetText((min-device-width: -80755999px))
SetText((min-device-width: -80757999px))
SetText((min-device-width: -80759999px))
SetText((min-device-width: -80761999px))
SetText((min-device-width: -80763999px))
SetText((min-device-width: -80765999px))
SetText((min-device-width: -80767999px))
SetText((min-device-width: -80769999px))
SetText((min-device-width: -80771999px))
SetText((min-device-width: -80773999px))
SetText((min-device-width: -80775999px))
SetText((min-device-width: -80777999px))
[...]
SetText((min-device-width: -46171999px))
SetText((min-device-width: -46173999px))
SetText((min-device-width: -46175999px))
SetText((min-device-width: -46177999px))
SetText((min-device-width: -46179999px))
SetText((min-device-width: -46181999px))
SetText((min-device-width: -46183999px))
SetText((min-device-width: -46185999px))
SetText((min-device-width: -46187999px))
SetText((min-device-width: -46189999px))
SetText((min-device-width: -46191999px))
SetText((min-device-width: -46193999px))
SetText((min-device-width: -46195999px))
SetText((min-device-width: -46197999px))
SetText((min-device-width: -46199999px))
SetText((min-device-width: -46201999px))

I bet I know what's going on.

In particular, I bet they're trying to call matchMedia on a display: none iframe.

Bingo. So we're hitting:

https://searchfox.org/mozilla-central/rev/dac799c9f4e9f5f05c1071cba94f2522aa31f7eb/layout/style/MediaQueryList.cpp#138

Over and over, returning false. And the tracking script has a very stupid loop that doesn't stop on zero.

So this is basically bug 1490401.

Depends on: 1490401
Flags: needinfo?(emilio)

Thanks! So this is a webcompat issue and not a perf bug.

Keywords: perf
Whiteboard: [qf:p2:pageload] → [webcompat][qf-]
Duplicate of this bug: 1521305

(In reply to Emilio Cobos Álvarez (:emilio) from comment #7)

Bingo. So we're hitting:

https://searchfox.org/mozilla-central/rev/dac799c9f4e9f5f05c1071cba94f2522aa31f7eb/layout/style/MediaQueryList.cpp#138

Over and over, returning false. And the tracking script has a very stupid loop that doesn't stop on zero.

Sorry, new here! Just wanted to confirm my understanding of the line that you linked:

Semantically, what you are saying is that if presContext is NULL, then there is nothing being "presented" to the screen? That is why this causes a problem when the display is 'none'?

Thanks for the clarification!
Will

So this is basically bug 1490401.

(In reply to Will Hawkins from comment #10)

Semantically, what you are saying is that if presContext is NULL, then there is nothing being "presented" to the screen? That is why this causes a problem when the display is 'none'?

Yes, we only set up all the layout and presentation stuff when the frame is displayed. So for a display: none iframe we don't create a pres context / pres shell for that document.

(In reply to Emilio Cobos Álvarez (:emilio) from comment #11)

(In reply to Will Hawkins from comment #10)

Semantically, what you are saying is that if presContext is NULL, then there is nothing being "presented" to the screen? That is why this causes a problem when the display is 'none'?

Yes, we only set up all the layout and presentation stuff when the frame is displayed. So for a display: none iframe we don't create a pres context / pres shell for that document.

Thank you!

ni? myself to bring up with Mike at next webcompat triage meeting

Flags: needinfo?(svoisen)

Should be fixed via bug 1490401. Though the script seems to have been updated in the meantime.

Status: NEW → RESOLVED
Closed: 3 years ago
Flags: needinfo?(svoisen)
Resolution: --- → DUPLICATE
Duplicate of bug: 1490401
You need to log in before you can comment on or make changes to this bug.