Hang with Flash and nsIContentPolicy (Adblock, NoScript, ...)

RESOLVED FIXED in mozilla1.9

Status

()

Core
General
--
critical
RESOLVED FIXED
10 years ago
7 years ago

People

(Reporter: Dolske, Assigned: Ben Turner (not reading bugmail, use the needinfo flag!))

Tracking

(Blocks: 1 bug, {dogfood, hang, regression})

Trunk
mozilla1.9
dogfood, hang, regression
Points:
---
Dependency tree / graph
Bug Flags:
blocking1.9 +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(3 attachments, 1 obsolete attachment)

(Reporter)

Description

10 years ago
Created attachment 316662 [details]
Sample w/ mostly-bogus symbols

I've recently been getting hangs (pinwheel of death) on Flash sites. I've let it burn CPU for a while, and it doesn't seem to recover. The hang usually happs in the middle of playing a Flash video. I think I first started seeming it started about about a week ago. Attached is a sample from such a hang -- ufortunately it's from a nightly, so most of the symbols are bogus. I tried running a debug build for a couple of days but wasn't able to get it to hang. [Maybe an opt build + symbols would help...]

Tried browsing YouTube clips with a nightly with new clean profile, and wasn't able to reproduce. Installed Adblock into that profile, and was quickly able to get a hang.

Not sure if this belongs in Core or FF::ExtensionCompat, but leaning towards the former because it might involve Flash, and I'm not getting a slow-script warning.
Flags: blocking1.9?

Comment 1

10 years ago
See also bug 429682 (of which this one's probably a DUPE) and the older bug 418811.

Comment 2

10 years ago
Please refer to my comments here:

https://bugzilla.mozilla.org/show_bug.cgi?id=429813

I will build latest and try without Adblobck extension also.

Nixk

Comment 3

10 years ago
I got a bug report myself (https://www.mozdev.org/bugs/show_bug.cgi?id=18646#c5) - didn't have time to verify it however.
(Reporter)

Comment 4

10 years ago
Created attachment 316782 [details]
Sample w/ legit symbols

Ah. Finally managed to catch the hang in my opt build with symbols, and grabbed a sample.
Attachment #316662 - Attachment is obsolete: true
(Reporter)

Comment 5

10 years ago
Oh, also ran some of the DTrace JS scripts during the hang. It didn't show any activity.

Comment 6

10 years ago
I'm seeing this too and it makes browsing the web rather uncomfortable.

Comment 7

10 years ago
I'm experiencing the exact same problem (freeze at one full CPU-core).

From previous threads and bugs:

20080414 1838hrs build Broken
20080414 1645hrs build OK 

Regression range:

http://bonsai.mozilla.org/cvsquery.cgi?treeid=default&module=PhoenixTinderbox&branch=HEAD&branchtype=match&dir=&file=&filetype=match&who=&whotype=match&sortby=Date&hours=2&date=explicit&mindate=2008-04-14+15%3A00%3A00&maxdate=2008-04-14+19%3A00%3A00&cvsroot=%2Fcvsroot

While the freeze does mostly happen with embedded flash (being the most prominently used plugin throughout the web) I experienced the exact same behavior with embedded quicktime and windows media clips as well. 
Justin, or anyone... Any chance you could pull by date 2008-04-14 16:58 (before the fix for bug 423355 landed) and see if you can reproduce there? If not, pull at 2008-04-14 16:38 (before bug 425157 landed) and see if it's caused by either of those?
(Reporter)

Updated

10 years ago
Duplicate of this bug: 429758
(Reporter)

Updated

10 years ago
Duplicate of this bug: 429682

Updated

10 years ago
OS: Mac OS X → All
Hardware: PC → All

Comment 11

10 years ago
Now bug 429682 has been made a duplicate of this, meaning that, from what I can see, there is only one bug report dealing with these recent random crashing bug(s), it is this one.  However, here in the title we are specifying Adblock.  I don't use Adblock and have still gotten the crashes consistently. (I do use NoScript).  

That other bug, Bug 418811 – Firefox hang (in Flash plugin?), was a little better named from my perspective, but it has been marked incomplete because it was reporting something that occurred before any of this started happening.

Furthermore, I don't even know if this is strictly a flash problem, as I have gotten it by surfing for images on Google Images, and opening pages that have everything disabled by NoScript.

So, are there multiple bugs going on here, or is the Adblock case simply the easiest method to reproduce the same underlying bug?

Updated

10 years ago
Keywords: dogfood, hang, regression

Comment 12

10 years ago
Just a note on the last comment;  I use adblock etc. but found that disabling NoScript stops the hangs.

Comment 13

10 years ago
I use Adblock Plus and Greasemonkey 0.8.2008 RC but don't use NoScript. The hangs are significantly reduced when disabling Adblock Plus but do not stop completely. It looks like these freezes are not exclusive to Adblock Plus but maybe at least a broader palette of extensions.
In the nightly-threads people reported the exact same hangs on brand new profiles and even without the Flash plugin as well but I can't reproduce that yet.
(Reporter)

Comment 14

10 years ago
(In reply to comment #8)
> Justin, or anyone... Any chance you could pull by date

Grrr. I first did a control by building currently trunk (opt, no debug), and and having a hard time reproducing the problem. I guess there's still something different between my build environment and nightlies, which makes it hard to pin this down. :(

Hourly builds are available from http://hourly-archive.localgho.st/ if someone want to match them up to around jst's timestamps. Tomcat mentioned he might be able to look too...

Updated

10 years ago
Summary: Hang with Adblock and Flash → Hang with Flash and nsIConterntPolicy (Adblock, NoScript, ...)

Comment 15

10 years ago
I have tested linux builds to find a more precisely regressionrange for that bug.

Here is the results :

20080414 1636 is OK
20080414 1652 is Broken

http://bonsai.mozilla.org/cvsquery.cgi?module=PhoenixTinderbox&date=explicit&mindate=1208216160&maxdate=1208217119

Comment 16

10 years ago
That's caused by bug 425157 then - even though I don't really see how.
Blocks: 425157

Comment 17

10 years ago
I thought the same thing, but after setting NoScript to "Allow Scripts Globally," I still experienced the CPU spiking to 100% and the browser becoming unresponsive. If I remember correctly, it was when visiting dilbert.com with build "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9pre) Gecko/2008042106 Minefield/3.0pre ID:2008042106".

(In reply to comment #12)
> Just a note on the last comment;  I use adblock etc. but found that disabling
> NoScript stops the hangs.
> 

Comment 18

10 years ago
Ray:  I mean _disable_ it completely in tools->add-ons.  I have been lock up free since.  If I enable it again, I can get the hang within seconds when browsing this site:

http://www.speedmaster-mission.net/

Comment 19

10 years ago
(In reply to comment #12)
> Just a note on the last comment;  I use adblock etc. but found that disabling
> NoScript stops the hangs.
> 

I've never used NoScript and the hangs only seem to stop if I completely disable AdBlockPlus.

Comment 20

10 years ago
Why should it make any difference for either NoScript or AdBlock Plus? I ask this because if they are being told not to do anything, shouldn't they not be interfering with normal browser function? (Curious)

(In reply to comment #18)
> Ray:  I mean _disable_ it completely in tools->add-ons.  I have been lock up
> free since.  If I enable it again, I can get the hang within seconds when
> browsing this site:
> 
> http://www.speedmaster-mission.net/
> 

"Hang with Flash and nsIConterntPolicy (Adblock, NoScript, ...)" <-- should't be nsIContentPolicy ?
If they are application-level disabled, the content-policy hooks will not be installed, but if they're instructed not to do anything I strongly suspect that the hooks run, but just return early.

A quick extension that just installed a null CP hook might help test here, if someone is up to it.
Summary: Hang with Flash and nsIConterntPolicy (Adblock, NoScript, ...) → Hang with Flash and nsIContentPolicy (Adblock, NoScript, ...)
I tried to convince myself that we would ship with this, but I don't think we can -- ABP and NoScript are too widely used, and the failure mode is too painful.  Marking blocking, with a heavy heart.
Flags: blocking1.9? → blocking1.9+

Comment 24

10 years ago
This link also freezes Beta 5, even in safe mode.

http://www.yuribou.net/blog

Comment 25

10 years ago
(In reply to comment #24)
> This link also freezes Beta 5, even in safe mode.
> 
> http://www.yuribou.net/blog
> 

Which would make it an unrelated bug then, I guess. The regression-window for this one is pretty clearly defined.

While disabling Adblock Plus reduced the the amount of freezes significantly I just experienced another high-CPU-freeze while watching an embedded Youtube-Video with this configuration: 

Adblock Plus 0.7.5.4 [DISABLED]
Adblock Plus: Element Hiding Helper 1.0.4 [DISABLED]
BugMeNot 1.8
Deutsches Wörterbuch 1.0.1
Firebug 1.2.0a20X [DISABLED]
Flagfox [de] 3.2.3
FlashGot 0.9.7
FoxyProxy 2.7.2
Glasser 1.0.5 [DISABLED]
Greasemonkey 0.8.20080418.0
IE View Lite 1.3.3
Image Zoom 0.3.1
Java Console 6.0.04
Linkification 1.3.3
Nightly Tester Tools 1.3
OpenSearchFox 0.1.5
Screen grab! 0.93
ScribeFire 2.0 [DISABLED]
StumbleUpon 3.18
Stylish 0.5.6
United States English Dictionary 3.0.1
Web Developer 1.1.5

Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9pre) Gecko/2008042207 Minefield/3.0pre ID:2008042207

Comment 26

10 years ago
I've been doing some testing of this, I've created a brand new profile, no extensions, Flash 9.0 r48.... And I still get frequent crashes trying to view Flash videos on the BBC news site.

I have noticed something else in the last few days which I initially just put down to my network connection but now I'm not so sure, I'm not even sure if it's related to this. Basically quite a few times I'm getting a timeout accessing a site, click refresh and it's fine. I'm going to do some more testing.

Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9pre) Gecko/2008042204 Minefield/3.0pre

Comment 27

10 years ago
This is probably a dupe of Bug 429813. Sample looks pretty similar. Also a deadlock after Flash kicks in.
(In reply to comment #14)
> (In reply to comment #8)
> > Justin, or anyone... Any chance you could pull by date
> Hourly builds are available from http://hourly-archive.localgho.st/ if someone
> want to match them up to around jst's timestamps. Tomcat mentioned he might be
> able to look too...
> 
Hi Justin, Hi Jst
Run Tests with the hourly Builds on Mac 10.5:

Build: Apr 14 16:44 is okay (no hang)
Build: Apr 14 17:28 hangs on www.slacker.com (thats one testcase from bretr)

so it seems that Bug 425157 is the culprit.

(In reply to comment #26) Michael: Flash 9.0 r48 is old, the latest Version is
9.0 r124, so you maybe want to update to the latest Version :)

Comment 29

10 years ago
I had issues with flash video lagging really badly with 124, which is why I'm still on 48 ;)

I'll give it another go though.

Comment 30

10 years ago
Reference bug 425157.

Early today I reverted:

cvs update -r 1.639 layout/generic/nsObjectFrame.cpp

and still get the same lock with NoScript enabled :-/

My only previous build that works OK was cvs updated on 13 April.  I think any after the 14th produce this issue.

Nick

Comment 31

10 years ago
Created attachment 317042 [details]
Minimal content policy

(In reply to comment #22)
> If they are application-level disabled, the content-policy hooks will not be
> installed, but if they're instructed not to do anything I strongly suspect that
> the hooks run, but just return early.

Correct.

> A quick extension that just installed a null CP hook might help test here, if
> someone is up to it.

Not quite an extension, but my usual test policy is attached - drop it into firefox\components directory, create an .autoreg file in your profile and restart Firefox. However, the evidence is already clear that this doesn't have to do with anything either Adblock Plus or NoScript are doing, the mere presence of a JS content policy is already enough.
(Reporter)

Updated

10 years ago
Duplicate of this bug: 429813

Comment 33

10 years ago
(In reply to comment #25)
> (In reply to comment #24)
> > This link also freezes Beta 5, even in safe mode.
> > 
> > http://www.yuribou.net/blog
> 
> Which would make it an unrelated bug then, I guess. The regression-window for
> this one is pretty clearly defined.

For the record, we looked at this site while discussing 429110, and a reduced test case got filed as bug 430332 - not a real deadlock, after a while Firefox becomes responsive.
Created attachment 317135 [details] [diff] [review]
Don't allow singular prototype cycles

The problem as jst and brendan found is that we were apparently wrapping a plugin dom node, setting up it's prototype chain, and then losing the wrapper to a GC. Later, we would re-wrap the plugin dom node and incorrectly set the prototype of the plugin's xpcwrapper's proto object back to itself. Yuck.
Assignee: nobody → bent.mozilla
Status: NEW → ASSIGNED
Attachment #317135 - Flags: superreview?(jst)
Attachment #317135 - Flags: review?(jst)
Comment on attachment 317135 [details] [diff] [review]
Don't allow singular prototype cycles

Please add a similar assertion after CHECK_REQUEST in JS_SetParent. Thanks, and r=me for the jsapi.c changes.

/be
(Reporter)

Comment 36

10 years ago
Applied the patch to my build and clicked a bunch of YouTube videos; seems to fix the problem. [I was able to hang fairly reliably with my unpatched build earlier today.]
Check it in for the sake of everyone! I've had to kill my browser at least four times today simply because I made the mistake of opening a page that had an embedded Youtube video on it.

Updated

10 years ago
Attachment #317135 - Flags: superreview?(jst)
Attachment #317135 - Flags: superreview+
Attachment #317135 - Flags: review?(jst)
Attachment #317135 - Flags: review+
(Reporter)

Updated

10 years ago
Attachment #317135 - Flags: approval1.9?
Attachment #317135 - Flags: approval1.9? → approval1.9+
Fix checked in!
Status: ASSIGNED → RESOLVED
Last Resolved: 10 years ago
Resolution: --- → FIXED

Comment 39

10 years ago
I'm still having issues with never-ending hangs when watching embedded flash content, the crash appears to occur randomly, I've seen it in the middle of embedded youtube videos on nightly build 20080426_0305 (but very well may be on other builds)

Example: On this build I have always gotten never-ending hangs on the video embedded on http://googlesystem.blogspot.com/2008/03/youtubes-embedded-player-updated.html

I'm really new at testing nightlies, but this seems like a really bad bug, I get crashes quite often.

On a side note: Shouldn't crash reporter be smart enough to make reports for hangs as well?
This bug was patched, and the iloop was definitely fixed. Please file a new bug and if you can, get some stacks from the running program (debugger, pstack, anything like that).

Of course we want the crash reporter to report hangs too, but that's not going to happen in the short run.

/be
(Reporter)

Comment 41

10 years ago
I previously filed bug 429592 for having crash reporter do something with hangs.

Comment 42

10 years ago
I'm still having issues with never-ending hangs when watching embedded flash content, the crash appears to occur randomly, I've seen it in the middle of embedded youtube videos on nightly build 20080426_0305 (but very well may be on other builds)

Example: On this build I have always gotten never-ending hangs on the video embedded on http://googlesystem.blogspot.com/2008/03/youtubes-embedded-player-updated.html

I'm really new at testing nightlies, but this seems like a really bad bug, I get crashes quite often.

On a side note: Shouldn't crash reporter be smart enough to make reports for hangs as well?

Comment 43

9 years ago
To add - can i second that this bug is still live in one form or another.

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9) Gecko/2008052906 Firefox/3.0

Occurs on BBC iPlayer, youtube etc. No crash, just a second or two of video, then freeze (only in the flash window). Fx still usable, but requires a re-start to view video.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
(In reply to comment #43)

Please file a new bug for that. This bug was fixed even if similar symptoms occur elsewhere.

Status: REOPENED → RESOLVED
Last Resolved: 10 years ago9 years ago
Resolution: --- → FIXED

Updated

9 years ago
Blocks: 467520
You need to log in before you can comment on or make changes to this bug.