Last Comment Bug 429903 - Hang with Flash and nsIContentPolicy (Adblock, NoScript, ...)
: Hang with Flash and nsIContentPolicy (Adblock, NoScript, ...)
Status: RESOLVED FIXED
: dogfood, hang, regression
Product: Core
Classification: Components
Component: General (show other bugs)
: Trunk
: All All
: -- critical with 6 votes (vote)
: mozilla1.9
Assigned To: Ben Turner (not reading bugmail, use the needinfo flag!)
:
Mentors:
: 429682 429758 429813 (view as bug list)
Depends on:
Blocks: abp 425157
  Show dependency treegraph
 
Reported: 2008-04-20 00:56 PDT by Justin Dolske [:Dolske]
Modified: 2010-12-16 15:42 PST (History)
44 users (show)
shaver: blocking1.9+
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Sample w/ mostly-bogus symbols (20.22 KB, text/plain)
2008-04-20 00:56 PDT, Justin Dolske [:Dolske]
no flags Details
Sample w/ legit symbols (21.97 KB, text/plain)
2008-04-21 02:14 PDT, Justin Dolske [:Dolske]
no flags Details
Minimal content policy (1.74 KB, text/plain)
2008-04-22 10:29 PDT, Wladimir Palant
no flags Details
Don't allow singular prototype cycles (2.12 KB, patch)
2008-04-22 17:10 PDT, Ben Turner (not reading bugmail, use the needinfo flag!)
jst: review+
jst: superreview+
mbeltzner: approval1.9+
Details | Diff | Splinter Review

Description Justin Dolske [:Dolske] 2008-04-20 00:56:27 PDT
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.
Comment 1 Simon Bünzli 2008-04-20 01:22:23 PDT
See also bug 429682 (of which this one's probably a DUPE) and the older bug 418811.
Comment 2 Nick Warne 2008-04-20 01:24:27 PDT
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 Wladimir Palant 2008-04-20 06:45:38 PDT
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.
Comment 4 Justin Dolske [:Dolske] 2008-04-21 02:14:18 PDT
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.
Comment 5 Justin Dolske [:Dolske] 2008-04-21 02:16:42 PDT
Oh, also ran some of the DTrace JS scripts during the hang. It didn't show any activity.
Comment 6 Dennis Jacobfeuerborn 2008-04-21 11:38:36 PDT
I'm seeing this too and it makes browsing the web rather uncomfortable.
Comment 7 Frank Freibuth 2008-04-21 15:07:37 PDT
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. 
Comment 8 Johnny Stenback (:jst, jst@mozilla.com) 2008-04-21 16:44:25 PDT
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?
Comment 9 Justin Dolske [:Dolske] 2008-04-21 17:02:29 PDT
*** Bug 429758 has been marked as a duplicate of this bug. ***
Comment 10 Justin Dolske [:Dolske] 2008-04-21 17:04:47 PDT
*** Bug 429682 has been marked as a duplicate of this bug. ***
Comment 11 mmortal03 2008-04-21 18:38:51 PDT
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?
Comment 12 Nick Warne 2008-04-21 23:31:23 PDT
Just a note on the last comment;  I use adblock etc. but found that disabling NoScript stops the hangs.
Comment 13 Frank Freibuth 2008-04-22 00:55:29 PDT
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.
Comment 14 Justin Dolske [:Dolske] 2008-04-22 01:08:05 PDT
(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...
Comment 15 1for-matik 2008-04-22 03:36:33 PDT
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 Wladimir Palant 2008-04-22 03:46:46 PDT
That's caused by bug 425157 then - even though I don't really see how.
Comment 17 WildcatRay 2008-04-22 05:33:36 PDT
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 Nick Warne 2008-04-22 05:44:06 PDT
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 Mike Pesce (:By-Tor) 2008-04-22 05:51:03 PDT
(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 WildcatRay 2008-04-22 05:59:14 PDT
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/
> 

Comment 21 Darren Kalck [:D-Kalck] 2008-04-22 06:02:48 PDT
"Hang with Flash and nsIConterntPolicy (Adblock, NoScript, ...)" <-- should't be nsIContentPolicy ?
Comment 22 Mike Shaver (:shaver -- probably not reading bugmail closely) 2008-04-22 06:07:27 PDT
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.
Comment 23 Mike Shaver (:shaver -- probably not reading bugmail closely) 2008-04-22 06:55:09 PDT
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.
Comment 24 nightisfalling 2008-04-22 09:06:06 PDT
This link also freezes Beta 5, even in safe mode.

http://www.yuribou.net/blog

Comment 25 Frank Freibuth 2008-04-22 09:13:03 PDT
(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 Michael Warburton 2008-04-22 09:22:32 PDT
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 Christiaan Hofman 2008-04-22 09:38:58 PDT
This is probably a dupe of Bug 429813. Sample looks pretty similar. Also a deadlock after Flash kicks in.
Comment 28 Carsten Book [:Tomcat] - PTO-back Sept 4th 2008-04-22 09:48:08 PDT
(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 Michael Warburton 2008-04-22 09:52:23 PDT
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 Nick Warne 2008-04-22 10:29:34 PDT
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 Wladimir Palant 2008-04-22 10:29:47 PDT
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.
Comment 32 Justin Dolske [:Dolske] 2008-04-22 11:56:33 PDT
*** Bug 429813 has been marked as a duplicate of this bug. ***
Comment 33 Kai Engert (:kaie) 2008-04-22 14:21:51 PDT
(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.
Comment 34 Ben Turner (not reading bugmail, use the needinfo flag!) 2008-04-22 17:10:16 PDT
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.
Comment 35 Brendan Eich [:brendan] 2008-04-22 17:18:53 PDT
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
Comment 36 Justin Dolske [:Dolske] 2008-04-22 18:22:18 PDT
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.]
Comment 37 Al Billings [:abillings] 2008-04-22 18:53:26 PDT
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.
Comment 38 Johnny Stenback (:jst, jst@mozilla.com) 2008-04-22 22:25:39 PDT
Fix checked in!
Comment 39 mixxster 2008-04-26 19:41:14 PDT
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 40 Brendan Eich [:brendan] 2008-04-26 20:43:24 PDT
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
Comment 41 Justin Dolske [:Dolske] 2008-04-26 21:21:40 PDT
I previously filed bug 429592 for having crash reporter do something with hangs.
Comment 42 mixxster 2008-04-27 09:08:56 PDT
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 Tom Graham 2008-06-29 05:58:30 PDT
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.
Comment 44 Ben Turner (not reading bugmail, use the needinfo flag!) 2008-06-29 13:31:05 PDT
(In reply to comment #43)

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


Note You need to log in before you can comment on or make changes to this bug.