trailers.apple.com video can hang Firefox or reboot computer when faking Chrome's User-Agent and disabling QuickTime plugin

RESOLVED FIXED

Status

()

Core
Audio/Video: Playback
--
critical
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: cpeterson, Assigned: jya)

Tracking

({crash, hang, regression})

unspecified
x86_64
Mac OS X
crash, hang, regression
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox39 unaffected, firefox40- wontfix, firefox41+ fixed, firefox42+ verified, firefox43 fixed)

Details

(Reporter)

Description

2 years ago
[Tracking Requested - why for this release]:
This is a regression in Firefox 40 that can hang Firefox or even reboot my computer.

@ Jean-Yves, I bisected this video regression to some video changes you committed in Nightly 40. Do you think this bug could affect normal web content without extraordinary measures like faking Chrome's UA?


STR:
1. Install the "User-Agent Switcher" add-on: https://addons.mozilla.org/en-US/firefox/addon/user-agent-switcher-firefox/
2. Using the add-on's toolbar button, switch your UA from Firefox to Chrome.
3. Disable the QuickTime plugin in about:addons.
4. Try to watch a movie trailer at http://trailers.apple.com/ such as http://trailers.apple.com/trailers/disney/thegooddinosaur/

RESULT:
By faking Chrome's UA, the website will serve .mov or .m4v HTML5 video instead of trying to use the QuickTime plugin. Firefox 39 will play the videos correctly, but Firefox 40 will either render a green video, hang Firefox, or reboot my MacBook Pro.


I bisected the regression to this pushlog with three suspicious changesets:

https://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=7b83fb4bb908&tochange=ee75ba3d3937

Jean-Yves Avenard — Bug 1137529: Partial revert of commit c6e173b28eca.
Jean-Yves Avenard — Bug 1153097: Use 32 bits int to compare frequencies. Also potentially fix out of bound memory access.
Jean-Yves Avenard — Bug 1153469: Ensure IOSurface isn't released before being composited.
Flags: needinfo?(jyavenard)
(Assignee)

Comment 1

2 years ago
What those bugs do is enable hardware acceleration.

likely similar to bug 1168552.

It's Apple's VT that crashes when using hardware acceleration. I've lodged a bug with Apple for those videos.

As you know, there's no way FF itself can cause a reboot.

Is there a particular resolution that you select that will cause the failure? Maybe we could add a workaround that disable HW acceleration for those videos. I remember Apple's earlier VDA choking on some particular content (especially interlaced videos, or resolution not using a multiple of 4 pixels)
Assignee: nobody → jyavenard
Flags: needinfo?(jyavenard)
(Reporter)

Comment 2

2 years ago
I have trouble with pretty much any trailer or resolution on trailers.apple.com website. Playing the following trailer:

http://trailers.apple.com/trailers/disney/thegooddinosaur/

* The "SD" video size flashes green frames, but doesn't seem to hang Firefox or the OS.

* The "720p HD" video size (the player's default resolution) hangs Firefox for ~20 seconds and then the video starts playing, but flashing frames in the wrong order.

* The "1080p HD" video size either flashes frames in the wrong order or reboots my computer.

One correction to the STR: you must install the "User Agent Switcher" (no hyphen) add-on, not the "User-Agent Switcher" (with hyphen) linked in comment 0! The addon with hyphenated name overrides the UA header, but not the navigator.userAgent property (which is what the trailers.apple.com website actually checks).

https://addons.mozilla.org/en-US/firefox/addon/user-agent-switcher/

The "User Agent Switcher" add-on doesn't include any UA strings by default. I had to create a new UA entry copying Chrome:

"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.81 Safari/537.36"

My MacBook Pro system info:

OS X Version 10.10.4 (14E46)
MacBook Pro (Retina, 13-inch, Late 2013)
Graphics: Intel Iris 1536 MB
(Reporter)

Updated

2 years ago
Blocks: 1168552
(Assignee)

Comment 3

2 years ago
how does that go if you set media.hardware-video-decoding.enabled to false
(Reporter)

Comment 4

2 years ago
When I set media.hardware-video-decoding.enabled=false or media.apple.forcevda=true (as described in bug 1168552 comment 3), the video plays correctly but doesn't have the QuickTime-style player controls to pause playback or change the video size.
(Assignee)

Comment 5

2 years ago
 media.apple.forcevda=true would have no effect if media.hardware-video-decoding.enabled=false
(Reporter)

Comment 6

2 years ago
I tested the prefs independently, restarting Firefox each time I changed the prefs.
(Assignee)

Comment 7

2 years ago
so you're saying that with media.hardware-video-decoding.enabled=true and media.apple.forcevda=true , you don't see the hang ?

that's interesting. I always assumed that VideoToolbox used the VDA framework internally for hardware acceleration.
(Reporter)

Comment 8

2 years ago
Yes.

* media.hardware-video-decoding.enabled=true (default) and media.apple.forcevda=false (default) -> hang and then video rendering problems.

* media.hardware-video-decoding.enabled=true (default) and media.apple.forcevda=true -> no hang and video plays correctly.

* media.hardware-video-decoding.enabled=false and media.apple.forcevda=false (default) -> no hang and video plays correctly.
(Assignee)

Comment 9

2 years ago
Matt, any ideas on why VT when HW acceleration is in use could cause a computer reboot?
Flags: needinfo?(matt.woodrow)
No idea at all sorry, except that GPU drivers are crazy :)
Flags: needinfo?(matt.woodrow)
AIUI, as reported this is not a bug that the general userbase will encounter. It is possible for someone to hit this bug in the wild though. Given that we're at the end of the Beta cycle, don't have a fix, and don't have a concrete use case that fails in the default Firefox configuration in the wild today, I don't think we should consider this fix for 40. As this is marked as a regression in 40, I am tracking 41+.
status-firefox40: affected → wontfix
tracking-firefox40: ? → -
tracking-firefox41: --- → +
tracking-firefox42: --- → +
(Assignee)

Updated

2 years ago
Depends on: 1061525
(Reporter)

Comment 12

2 years ago
I am working with Mozilla's webcompat team to reach Apple about switching these trailer videos from QuickTime to HTML5 video (on Firefox versions that don't crash, of course). The Apple trailer website serves HTML5 video to all browsers except Firefox, where it requires the QuickTime plugin.

https://github.com/webcompat/web-bugs/issues/1470
(Reporter)

Comment 13

2 years ago
Verified fixed by bug 1061525 in Nightly 42.0a1 (2015-08-11).
Status: NEW → RESOLVED
Last Resolved: 2 years ago
status-firefox42: affected → verified
status-firefox43: --- → fixed
Resolution: --- → FIXED
Chris, this bug is marked tracking for FF41. Do we need to request the fix be uplifted to m-b (Beta41) branch? The scary thing is bug 1061525 has 7 patches and that seems like a rather big change for a Beta release. Thoughts?
Flags: needinfo?(cpeterson)
(Reporter)

Comment 15

2 years ago
Jean-Yves says we can just uplift patch #7 from bug 1061525. That patch will switch from the crashing hardware video compositor to a software video compositor that we used in Firefox 36 and 37. I will request uplift in bug 1061525.
Flags: needinfo?(cpeterson)
(Reporter)

Updated

2 years ago
See Also: → bug 1149814
Changing FF41 status to "fixed" just like in bug 1061525.
status-firefox41: affected → fixed
You need to log in before you can comment on or make changes to this bug.