Closed Bug 1206845 Opened 9 years ago Closed 9 years ago

Incompatible (apparently) video hangs browser

Categories

(Core :: Audio/Video: Playback, defect, P1)

x86_64
Windows 8.1
defect

Tracking

()

VERIFIED FIXED
mozilla44
Tracking Status
firefox41 --- wontfix
firefox42 --- fixed
firefox43 --- fixed
firefox44 --- verified
firefox-esr38 --- affected

People

(Reporter: dqeswn, Assigned: jya)

References

(Blocks 1 open bug, )

Details

(Whiteboard: [bugday-20151028])

Attachments

(1 file)

With trunk when I open the extreme quality video from the website its tab hangs. Afterwards no webpage content will be shown. And the browser hangs when I try to close it.

With e10s disabled the whole browser hangs when I open that video.

With FF32 I get "Video can't playback because the file is corrupt" error. Which is not actually correct, because the video file is fine, but I guess that's what the browser shows when it fails to play the file.
Blocks: html, MSE
Flags: needinfo?(jyavenard)
Confirming, except on my machine the video locked the browser and had to be force killed.

Running win32 non-e10s on win7 x64, with 8meg RAM on AMD HD3200 256meg chipset, and a Phenom x4 CPU.

build: https://hg.mozilla.org/mozilla-central/rev/ccd6b5f5e544c1d708849144943a776941bd3794
Status: UNCONFIRMED → NEW
Ever confirmed: true
It looks like this bug reached stable with FF41.
Hangs for me on Mac.
Priority: -- → P1
(In reply to Anthony Jones (:kentuckyfriedtakahe, :k17e) from comment #3)
> Hangs for me on Mac.

Hangs for me on Windows.
Attachment #8671865 - Flags: review?(roc)
Assignee: nobody → jyavenard
Flags: needinfo?(jyavenard)
No longer blocks: MSE
Comment on attachment 8671865 [details] [diff] [review]
Prevent overflows in MediaCache.

Review of attachment 8671865 [details] [diff] [review]:
-----------------------------------------------------------------

A bit of background:
The media cache stores information in number of blocks, each 32kB in size; the block index is stored on a 32 bits int, determined by the formula UINT32_t blockIndex = offset / BLOCK_SIZE.

And then to go back to the actual offset we do int64_t offset = blockIndex * BLOCK_SIZE. This operation will overflow if blockIndex is > INT32_MAX / BLOCK_SIZE.

This causes infinite loops on the main thread when it attempts to update the media cache as well as on the decoder's thread when it attempt to build the array of MediaByteRange of cached data.

Rather than fixing all the places where this calculation is performed, I felt it was easier to make BLOCK_SIZE a 64 bits constant, so that all calculations are performed on 64 bits.

Something could be improved here as we end up searching iteratively on a 272000 array every time 32kB is downloaded. But that's another topic
Comment on attachment 8671865 [details] [diff] [review]
Prevent overflows in MediaCache.

Review of attachment 8671865 [details] [diff] [review]:
-----------------------------------------------------------------

Delicious!
Attachment #8671865 - Flags: review?(roc) → review+
request beta uplift
Flags: needinfo?(jyavenard)
https://hg.mozilla.org/mozilla-central/rev/8ecae3736f32
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
Comment on attachment 8671865 [details] [diff] [review]
Prevent overflows in MediaCache.

Approval Request Comment
[Feature/regressing bug #]: 475441
[User impact if declined]: Attempting to watch online video > 4GB will cause browser hang and 100%+ CPU usage.
[Describe test coverage new/current, TreeHerder]: 
[Risks and why]: Can't think of any. We just force a calculation to be done on 64 bits arithmetic
[String/UUID change made/needed]: none
Attachment #8671865 - Flags: approval-mozilla-beta?
Attachment #8671865 - Flags: approval-mozilla-aurora?
Comment on attachment 8671865 [details] [diff] [review]
Prevent overflows in MediaCache.

Improve the video, taking it. Should be in 42 beta 6.
Attachment #8671865 - Flags: approval-mozilla-beta?
Attachment #8671865 - Flags: approval-mozilla-beta+
Attachment #8671865 - Flags: approval-mozilla-aurora?
Attachment #8671865 - Flags: approval-mozilla-aurora+
QA Whiteboard: [good first verify]
¡Hola!

Steps from https://bugzilla.mozilla.org/show_bug.cgi?id=1206845#c0 no longer cause a hang on Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:44.0) Gecko/20100101 Firefox/44.0 ID:20151026030422 CSet: 5ca03a00d26823ce91ee0eaa2937bed605bd53c1

¡Gracias!
Alex
Status: RESOLVED → VERIFIED
Whiteboard: [bugday-20151028]
This Bug's fix is verified in latest Firefox 44.0a2 Aurora

The Bug (https://bugzilla.mozilla.org/show_bug.cgi?id=1206845) not hanged on

Build Id:  	20151029045227
User Agent: Mozilla/5.0 (X11; Linux i686; rv:44.0) Gecko/20100101 Firefox/44.0

[testday-20151030]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: