Youtube janks due to MediaSource.IsTypeSupported calls
Categories
(Core :: Audio/Video: Playback, defect, P3)
Tracking
()
People
(Reporter: b141, Unassigned)
References
(Blocks 1 open bug)
Details
(Whiteboard: [media-youtube] [media-performance])
Attachments
(8 files)
User Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.72 Safari/537.36
Steps to reproduce:
type in search bar old one search as youtbe watch some video then "click back button" then it hang browser 100% CPU usage when back to last video. Its happens random only one solution was to hit stop before back to old video feed. try to disbale GPu disbale some extension nothing help today it hang when 2 gmail tabs was open . Start happens from Firefox 86 and on 87 is same
Actual results:
browser hang on youtube hav eto wait 30 second to cpu stabilize today on gmail it use 100% cup and not stop.
My extensions:
brief currency Converter disbale javascript, don';t track me google, fb purity, firefox multi-account, fixed zoom, leech block ng, searchpreview, show fix go,stylus,translte menum ublock orgin
Expected results:
stop use 100% cpu
Reporter | ||
Comment 1•4 years ago
|
||
Comment 2•4 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Firefox::Address Bar' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.
Updated•4 years ago
|
Comment 3•4 years ago
|
||
Can you please create a performance profile when your Firefox is in such a condition? For details see:
https://developer.mozilla.org/en-US/docs/Mozilla/Performance/Reporting_a_Performance_Problem
Thanks.
Reporter | ||
Comment 4•4 years ago
|
||
(In reply to Henrik Skupin (:whimboo) [⌚️UTC+1] from comment #3)
Can you please create a performance profile when your Firefox is in such a condition? For details see:
https://developer.mozilla.org/en-US/docs/Mozilla/Performance/Reporting_a_Performance_ProblemThanks.
Got it was not so hard like last time when cpu was used 100% for long time but maybe its depends on video that you saw if you watch 5 minutes then click "back" then it hit you harder
its work only when you search in "youtube" using old search mini bar then its something with youtube history
So that mean it coult be "Google" fault
https://share.firefox.dev/3fAFOmC
Right now i live in so big stress about this issue that i'm not stop movie before click "back" because its only when you click back
Comment 5•4 years ago
|
||
Thank you for the profile. Did you actually record with the Media preset? If not maybe you could create one more profile?
By checking the profile I assume that you did a click on back
around 35s? Here I can see that the call to MediaSource.isTypeSupported
nearly takes all the time. Bryce, do you know why this could happen?
(In reply to Henrik Skupin (:whimboo) [⌚️UTC+1] from comment #5)
Thank you for the profile. Did you actually record with the Media preset? If not maybe you could create one more profile?
As you note above, profile using the 'Media' preset in the profiler would help provide more information (it should be available in the drop down menu in the profiler).
Reporter, it would also be useful to know if the problem happens with a new profile
By checking the profile I assume that you did a click on
back
around 35s? Here I can see that the call toMediaSource.isTypeSupported
nearly takes all the time. Bryce, do you know why this could happen?
As you note, we're getting a lot of MediaSource.isTypeSupported
requests. That's a lot more than we'd expect to see in such a small time frame, but we'd also not want to jank even if we get a lot of requests. A profile using the Media preset will tell us more, but if I had to guess this could be the result of slow IPC since we can end up doing an IPC call to check if the type is supported.
Moving to media based on the information we have so far. I can't reproduce, but the profile shows the issue. I'll assign for now and see if I can investigate further. To be clear, reporter, it would still be useful to the investigation if you could help get a profiler run with the 'Media' preset and also testing this in a fresh profile.
Comment 8•4 years ago
|
||
I'll set the needinfo for the reporter so it's clear that a new profile is wanted.
Beside that please also see the comment 0 especially for Start happens from Firefox 86 and on 87 is same
. So it sounds like a regression started with Firefox 86.
Reporter | ||
Comment 9•4 years ago
|
||
- also disable now NOD32 antivirus
- disable gpu in firefox
- it start from Firefox 86
- Play DRM-controlled content -- is disabled
- integrated GPU 520 thinkpad t460 i5
- try to use
and now
today get this issue also with enable antivirus
https://www.youtube.com/results?search_query=MC+doland+self+serwice
Comment 10•4 years ago
|
||
Reporter please provide a new Gecko profile when the problem happens, and this time as mentioned with the Media preset set. Thanks.
Comment 11•4 years ago
|
||
This is exactly same as bug 1685321, but I thought that got fixed by enabling RDD already. Because now the supported information should be propagated from GPU/RDD process and prevent from running WMF on the content process that would block main thread.
So it seems that there is still something wrong to make us to run WMF on the content process even if we've enabled RDD. According to the probe we still have around 141.14k WMF usage on the content process.
I'm not 100% clear on how this works with the new RDD code. Since IsTypeSupported is blocking, do we ever need to wait on the IPC call? I would have expected a risk of us janking no matter where the WMF code is running if
- We need to stand up a decoder to check if type is supported.
- We do so slowly.
- (Optional) This will be made worse if we get a lot of IsTypeSupported calls at once.
Comment 13•4 years ago
|
||
As the profile in comment 4 didn't capture the media related threads, I can't simply tell based on that. But it looked like that we didn't use either RDD or GPU process in that situation. Would you mind to provide the information from about:support
as well?
Thank you.
Comment 14•4 years ago
|
||
(In reply to Bryce Seager van Dyk (:bryce) from comment #12)
- We need to stand up a decoder to check if type is supported.
No, if RDD/GPU (if supports video decoder in GPU) works properly, the only thing we need to just to check the cached data without initializing any decoder or WMF stuffs.
- We do so slowly.
- (Optional) This will be made worse if we get a lot of IsTypeSupported calls at once.
The code in MediaSource::IsTypeSupported
is quite simple, so I think the blocker would be something related with WMF. In bug1685321, I created some patches to make the PDMFactory singleton so that we can only need to run WMF once per process. And I had do a simple measurement on the time difference, it only improved little bits and the part of reason was I didn't encouter the issue where WMF runs so slow on my computer (so it probably works for the reporter's case)
But the most important part I would like to figure out is still why we would check the support via the WMF decoder module in the content process if we do enabling RDD correctly. (in theory, we should check the cached value propagated from RDD/GPU process without interacting with WMF decoder module in the content process)
Comment 15•4 years ago
|
||
Reporter, it would be great to get another Gecko profile with the Media preset set. If you have the time we would kinda appreciate when you can share such one with us. Thanks!
Reporter | ||
Comment 16•4 years ago
|
||
create new profile DDDD
add old search bar
go to youtbe
add yutube to old search bar
go to
https://profiler.firefox.com/
type in search bar youtube "fuck microsoft"
cant replicate this issue on new profile https://share.firefox.dev/3tmKjFz
but then it hit me with little hight cpu usage (just create this topic do something else back to youtube click back )
https://share.firefox.dev/3mPmbc4
then switch to 720p
in middle of record install ublock
also "my profile" is litler old and get disk cache on ram drive
https://share.firefox.dev/2RA9zu6 (just maybe performance issue)
BTW.
Also yesterday was installing update to windows 10 on 20 machines
When Chrome is present Edge Chromium is not installed
When Firefox is present Edge Chromium was installed shortcut was create on desktop no way to uninstall
When no browser was installed Edge chrome was installed and run after restart
On 12/20 VM chromium edge was installed
Reporter | ||
Comment 17•4 years ago
|
||
do some more test and get even for few seconds "a web page is slowing down your browser" also ublock is installed on new profile with this test
2 times get browser unresponsive then type youtube mini search bar "marcopolo" back 100% cpu usage for 6 seconds maybe
search for "japonia" watch some movie more than 4 minute "unresponsive gui few seconds"
(maybe because YouTube back to beginning of movie when you watch like 40% when hit back and when you need back to main list ned hit again "back" )
slow down but not so hard
was like 54Mb and get error when uploading
https://drive.google.com/file/d/198DrNbixoAjkEQB6-y7npy2Hgeki5kvW/view?usp=sharing
Reporter | ||
Comment 18•4 years ago
|
||
make new profile get all my extension and ready to go oh no again when click back using search mini bar in youtube
My extensions
Firefox Multi-Account Containers
SearchPreview
Show fixed Go
Stylu
uBlock Origin
Google Consent Dialog Remover
LeechBlock NG
Reporter | ||
Comment 19•4 years ago
|
||
also disable stylus ublock get same popup about slow js maybe my HD Intel® 520 just suck
all you dev is got like ryzen with 32 cores and 20GB ram or more try maybe use computers that users had at home not at work
- Are these new profiles using the 'Media' setting on the profiler? It looks like some may not be. That setting would help us gather more relevant info.
- I'm not clear on if this is happening or being made worse by having addons installed. Do you see the problem on a profile with no addons?
- Can you navigate to
about:support
on a profile you're seeing the issue on and copy the data using one of the buttons provided and paste it on this bug?
Reporter | ||
Comment 21•4 years ago
|
||
Reporter | ||
Comment 22•4 years ago
|
||
I'm not clear on if this is happening or being made worse by having addons installed. Do you see the problem on a profile with no addons?
Tested with and without extension and get popup about slow script
I've attached an image to show what I mean by the Media
profiler config -- it should be in the profiler drop down box if you click the arrow on the right of the profiler icon.
Reporter | ||
Comment 24•4 years ago
|
||
Waterfox -- G3.2.0 based on gecko 78.9.0 --- not a single slowdown just work amazing fast as fuck tested for 30 minutes
I think i will be moving to Weterfox as is not affected by this issue
https://share.firefox.dev/3sla481
try to click back on youtbe video
https://share.firefox.dev/3e8mrPt
(In reply to 213213213213 from comment #24)
https://share.firefox.dev/3sla481
try to click back on youtbe video
https://share.firefox.dev/3e8mrPt
It looks like those profiles didn't capture the problem we saw in earlier ones. There's some slow down due to page layout, but not the media problem we saw in initial profiles. Did you start and stop the profiler during the issue happening?
Reporter | ||
Comment 26•4 years ago
|
||
ok my bad click manual on "record" button then again record button then is like 10 seconds just click on toolbar mini button like before and it ok
Thanks, that's helpful. It looks similar to the issue we saw above.
I wonder if the issue is not the specific media call, but going back on YT causing too many scripts to run for some reason, and depending on the scripts being run we get problems in different areas.
Reporter | ||
Comment 28•4 years ago
|
||
Reporter | ||
Comment 29•4 years ago
|
||
another one https://share.firefox.dev/3e8HPnJ
Also do some test just before change youtube video "click pause" then click back button -- that solve my issue but when forgot to stop its bad gui laaggg
also it can depends on codec old movies is maybe not affected so much new movies are
https://share.firefox.dev/3uR2BiA
Something happens maybe on Firefox 86
And this is a Graphic profile
https://share.firefox.dev/3tnJZ9H
{
"ns": "yt",
"el": "detailpage",
"cpn": "ohcKQ-kd1VgO9qLN",
"docid": "Elt0ZQo5bHY",
"ver": 2,
"referrer": "https://www.youtube.com/results?search_query=dance+music",
"cmt": "2.606",
"ei": "Lal4YK-CHsfukAPYs4D4CQ",
"fmt": "397",
"fs": "0",
"rt": "3.251",
"of": "4-AAzUjBBbe1NRdPUni0EQ",
"euri": "",
"lact": 2,
"cl": "368098471",
"mos": 0,
"state": "8",
"vm": "CAMQABgCKiBpaGFvRkVWTjlSWVFGbThWMzd3VVFUTEthLVUtQ2cyODoyQU9HdF9PS3lWUjNOalRzRTBRaDBZUjZtSHVDWUVJeThSVFRCMTFlRHhkRFJmT19Kcnc",
"volume": 62,
"cbr": "Firefox",
"cbrver": "87.0",
"c": "WEB",
"cver": "2.20210414.07.00",
"cplayer": "UNIPLAYER",
"cos": "Windows",
"cosver": "6.3",
"cplatform": "DESKTOP",
"hl": "en_US",
"cr": "MX",
"len": "3647.301",
"fexp": "23858057,23890959,23969934,23971644,23983296,23986026,24001373,24006795,24007246,24012117,24014440,24021968,24025869",
"feature": "search",
"afmt": "251",
"vct": "2.606",
"vd": "3647.301",
"vpl": "0.000-18.315",
"vbu": "0.000-30.001",
"vpa": "0",
"vsk": "0",
"ven": "0",
"vpr": "1",
"vrs": "4",
"vns": "2",
"vec": "null",
"vemsg": "",
"vvol": "0.62",
"vdom": "1",
"vsrc": "1",
"vw": "853",
"vh": "480",
"lct": "2.513",
"lsk": false,
"lmf": false,
"lbw": "1743343.268",
"lhd": "0.193",
"lst": "0.000",
"laa": "itag_251_type_3_seg_2_range_352556-512797_time_20.0-30.0_off_0_len_160242_end_1",
"lva": "itag_397_type_3_seg_7_range_710379-796192_time_37.4-42.7_off_0_len_85814_end_1",
"lar": "itag_251_type_3_seg_2_range_352556-512797_time_20.0-30.0_off_0_len_160242_end_1",
"lvr": "itag_397_type_3_seg_7_range_710379-796192_time_37.4-42.7_off_0_len_85814_end_1",
"laq": "0",
"lvq": "0",
"lab": "0.000-30.001",
"lvb": "0.000-42.709",
"ismb": 4160000,
"relative_loudness": "-2.153",
"optimal_format": "480p",
"user_qual": "auto",
"debug_videoId": "Elt0ZQo5bHY",
"0sz": false,
"op": "",
"yof": false,
"dis": "",
"gpu": "ANGLE_(Intel(R)_HD_Graphics_520_Direct3D11_vs_5_0_ps_5_0)",
"cgr": true,
"debug_playbackQuality": "large",
"debug_date": "Thu Apr 15 2021 15:59:25 GMT-0500 (Eastern Standard Time)"
}
Thanks. I think we're okay on profiles for now and don't need graphics profiles right now -- if those are all gathered with addons enabled, it could be useful to try gathering the same data in a fresh Firefox profile without addons enabled to compare.
I'm not sure what the youtube attachment is, for now profiles + the info already on the bug should be sufficient.
Reporter | ||
Comment 31•4 years ago
|
||
with disabled addons new profile fresh so i have to watch some f__ ads never see it before in my life really YouTube has ads? and ads popup. How you can really watch anything without ublock ?
try to replicate was ok so then add mini search and add youtube as search engine and then booom catch this error
at the end get it: https://share.firefox.dev/3tp6rPx
so you have to use mini search bar youtube to get this issue by 100% before . Maybe ask Google to stop video on back and fix "web-history" when use min search bar
Comment 32•4 years ago
|
||
(In reply to 213213213213 from comment #31)
try to replicate was ok so then add mini search and add youtube as search engine and then booom catch this error
Can you link to the relevant extensions here? I'd be interested in looking, that 17s restyle is insane, and there might be something exploding in the CSS engine (probably due to CSS injected by that extension or something).
Reporter | ||
Comment 33•4 years ago
|
||
extension from old profile now use almost same
Reporter | ||
Comment 34•4 years ago
|
||
So what we know:
- its happens with and without extension
- its happens when click back or on other video link in right menu
- when video are paused is ok
- when close tab is ok
- user agent change to chrome same
- gmail are isolated container
- use proxy from Europe same
- on chrome no issue
- weterfox base on 78.9 no issue 78.10
interesting in console log
browser_chk! FF browserAPI.js:4:11
Today see some changes on YouTube red loader on top maybe YouTube choose me to do some dam beta tester . cant see in on chrome cant see in waterfox cant see only firefox. Im am a Youtube betaterser wherer they test on me some new feature.
My opinion
So in my opinion they changing something and they forgot to pause video before change History.pushState and all users that are not generated revenue are beta testers. Same like Microsoft do with Home version users that was force to test alfa big relase where enterprise get this update after one year because was tested and stable
try to replicate was ok so then add mini search and add youtube as search engine and then booom catch this error
Could you expand on the specific steps you're doing here since it sounds like this needs to happen to repro the issue?
Reporter | ||
Comment 36•4 years ago
|
||
that i mean 0;16 sec
Reporter | ||
Comment 37•4 years ago
|
||
anyway move to Firefox ESR 78.10 don't have any issue with youtube fixed ;)
Comment 38•4 years ago
|
||
It would still be good to know when this particular issue has been started. Given that you can easily reproduce maybe you could run a regression test via mozregression? It would give us the exact build that actually showed the problem first, and makes it easy to find the causing patch. Thanks a lot!
Reporter | ||
Comment 39•4 years ago
|
||
Also this bug was also replicable when youtube was embended inside page i.e iframe watch on other pages one time just switch page and get hit by slow down.
Is Firefox portable or something OK for this regresion test, because my "FF profile" don't work when upgrade to 78 then back to ESR?
Comment 40•4 years ago
|
||
If you can reproduce the problem also with a fresh profile you won't have to worry of using your daily one with mozregression. Otherwise you could simply duplicate the profile folder on disk, and use that copy for running the regression test. Therefore mozregression has the --profile-persistence
command line argument (probably also available in the GUI version):
--profile-persistence {clone,clone-first,reuse}
Persistence of the used profile. Before each tested build, a profile is used. If the value of this option is 'clone',
each test uses a fresh clone. If the value is 'clone-first', the profile is cloned once then reused for all builds
during the bisection. If the value is 'reuse', the given profile is directly used. Note that the profile might be
modified by mozregression. Defaults to clone.
Then also use --profile PATH
to specify your daily profile on disk.
Reporter | ||
Comment 41•4 years ago
|
||
alos one time get hit by this bug when click "skip ad"
Reporter | ||
Comment 42•4 years ago
|
||
search for bug on google: Decoder=d01d9d6000 Decode error: NS_ERROR_DOM_MEDIA_FATAL_ERR (0x806e0005)
found this also thinkpad user problem
https://support.mozilla.org/ru/questions/1269008
disable TPM or whatever its call test on 89.0.a1 get hit by this bug but not so bad try for 5 minute
New Firefox 89.0.a1 is so ugly (tabs) so damm crap no mini search - please ususcruibe me for this topic i will be move to chromium or edge because look better than Firefox anyway.
Thank you for you time still unresolved but don't care anymore on 89.a1 is now less visible slowdown
Comment hidden (advocacy) |
Could you gather another profile using the Firefox profiler and the 'Media' preset then upload/share and paste the link into this bug? It would be useful to know that we're still looking at the same issue.
Was today force to upgrade from ESR to new Firefox so decide to install waterfox because new skin is better
and got "same" issue this time on soundcloud and still same on youtbe
If you're seeing the issue in Waterfox, then we have limited ability to fix it. Mozilla doesn't maintain Waterfox, it just forks from Mozilla code.
Reporter | ||
Comment 45•3 years ago
|
||
Install Firefox portable set to media go to https://soundcloud.com/armadamusic and start clicking play music every few 4-8 seconds without stop
share.firefox.dev/30rL6Mt
The profile there looks like a separate issue than the original one here. In the original Firefox is spending too much time doing some media calculations. The later issue appears to be that it's spending too much time doing some layout and Javascript stuff -- though it's possible that's a symptom rather than the root cause. I've created bug 1741464 to track the more recent issue and linked the profile there too.
Reporter | ||
Comment 47•3 years ago
|
||
orginal issue was with youtube
load youtube run some random video, oh no ads cpu one process 96%
share.firefox.dev/3clxSmK
That most recent profile run also shows a what appeases to be a different problem than the earlier one. I understand they all result in the browser being unresponsive, but it may be due to a different underlying cause that we need to track down.
For that most recent profile, did the browser become unresponsive when YouTube played an ad?
Reporter | ||
Comment 49•3 years ago
|
||
when you don't stop played video/audio and click "back" [its janks]
if you just stop every time video/audio and then press back on navigation its nothing happens
when video stop/ends playing its nothing happens
on random every 3/10 when you watch some video/audio and hit back then one of process is 100%/97% of CPU right now ruining "task manager' so i can kill one of Firefox sub process and continue work.
in some run/test got played ads and then click back then was janks but on profile/URL that was send before was without ad. ( to clarify do many tests and few times was janks when youtube ad was play and hit back )
Comment 50•2 years ago
|
||
Unassigning bugs assigned to Bryce because he no longer works at Mozilla.
![]() |
||
Updated•2 years ago
|
Reporter | ||
Comment 51•2 years ago
|
||
After update to Windows 10 this bug go away same machine
onmost 2 years dealing withy 100% cpu usagen move to another youtube video
and now its gone any way windwos 10 suck
Description
•