Last Comment Bug 781482 - Plugins in dead/zombie compartments continue to play
: Plugins in dead/zombie compartments continue to play
Status: RESOLVED FIXED
: regression
Product: Core
Classification: Components
Component: Plug-ins (show other bugs)
: Trunk
: All All
: -- normal with 3 votes (vote)
: mozilla17
Assigned To: John Schoenick [:johns]
:
Mentors:
: 784070 (view as bug list)
Depends on:
Blocks: ZombieCompartments 778318
  Show dependency treegraph
 
Reported: 2012-08-09 05:01 PDT by Fanolian
Modified: 2012-08-29 11:14 PDT (History)
19 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Fix rebase error in nsObjectLoadingContent (882 bytes, patch)
2012-08-10 11:57 PDT, John Schoenick [:johns]
jaas: review+
john: checkin+
Details | Diff | Splinter Review

Description Fanolian 2012-08-09 05:01:31 PDT
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/17.0 Firefox/17.0
Build ID: 20120808030529

Steps to reproduce:

It is a recent regression since 20120808 build and a different issue from bug 778318. I think it is a Nightly bug rather than an extension's or userscript's.

Flash: 11.3.300.268 or 11.3.300.270
Greasemonkey 0.9.22 or Scriptish 0.1.7 (any combinations will reproduce the bug)
YousableTubeFix 2012.6.9 (https://userscripts.org/scripts/show/13333)

1. In a new profile, install Greasemonkey 0.9.22 or Scriptish 0.1.7 and YTF 2012.6.9. Keep the default settings.
2. Open any youtube video page, e.g. http://www.youtube.com/watch?v=E88d4e1gYh0.
3. While the video is still playing, close the page.


Actual results:

The video is still downloading and playing even though the tab is closed. A ghost window of the page is reported at about:compartments.


Expected results:

No ghost windows is created like 20120807 build or earlier.

Note:
1. If you have multiple youtube pages opened, ghost windows are shown only if all those pages are closed.
2. Killing plugin-container.exe kills the ghost windows.

YousableTubeFix's author is notified via https://userscripts.org/topics/115224.
Comment 1 Justin Lebar (not reading bugmail) 2012-08-09 07:43:08 PDT
> 1. If you have multiple youtube pages opened, ghost windows are shown only if all those pages are 
> closed.

This is a quirk of how ghost windows are designed.  See 

http://jlebar.com/2012/5/30/A_ghost_story.html
Comment 2 Kris Maglione [:kmag] 2012-08-09 08:49:08 PDT
This is interesting. The fact that videos keep playing is obviously a Firefox regression, which is presumably related to zombie compartments existing for those windows. What's more interesting, though, is that Greasemonkey Leaks the World seems to be back in spite of Kyle's fix.
Comment 3 Kyle Huey [:khuey] (Exited; not receiving bugmail, email if necessary) 2012-08-09 08:49:51 PDT
Can we get a regression range here?
Comment 4 Andrew McCreight [:mccr8] 2012-08-09 11:12:50 PDT
Not to blame everything on :johns, but the time window is right for this to be related to bug 745030, and it is plugin related...
Comment 5 John Schoenick [:johns] 2012-08-09 11:26:05 PDT
This is almost definitely from bug 745030, though I think it should be a quick fix
Comment 6 Andrew McCreight [:mccr8] 2012-08-09 11:43:31 PDT
I wonder if we can add some kind of test based on YousableTubeFix, as it seems to be a good bellwether. ;)
Comment 7 IU 2012-08-09 12:44:14 PDT
BTW, this regression (i.e. audio keeps playing) is also observable if you have Flashblock 1.5.16 and you do the following:

1. visit nbcnews.com
2. click any video link that launches the video player popup
3. let the video start playing then close the video player window

Audio continues to playing.
Comment 8 John Schoenick [:johns] 2012-08-10 11:57:58 PDT
Created attachment 650966 [details] [diff] [review]
Fix rebase error in nsObjectLoadingContent
Comment 9 John Schoenick [:johns] 2012-08-10 12:02:04 PDT
This happens due to a rebase error in applying bug 745030 that results in us not releasing the mIsStopping lock, preventing us from stopping plugins more than once per object. Oops.

bug 745030 exposed some other start/stop race conditions that need to be resolved before the uplift, so I'm going to try to get bug 767635 landed next week to fix these issues, otherwise we'll need to backout 745030.
Comment 10 John Schoenick [:johns] 2012-08-17 14:54:09 PDT
So bug 778318 is the direct issue here, where the issue discussed here is related to plugins continuing to play in inactive documents. However, the plugin is still alive because the document is still alive, not vice versa.

Additionally, since bug 767635 isn't ready yet, I'm going to try to just get this patch in 17, since backporting 767635 to aurora wont be desirable
Comment 11 Josh Aas 2012-08-21 13:03:51 PDT
Comment on attachment 650966 [details] [diff] [review]
Fix rebase error in nsObjectLoadingContent

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

I checked with John about clearing mStopping before the delayed stop early return and he says not doing it was intentional, that the delayed stop will result in the flag being cleared. That being the case, r+.
Comment 12 David 2012-08-21 13:23:18 PDT
Using the current nightly builds, since August 8, 2012 I can go to cnn.com., msnbc,com, cbs.com, yuutube, many others. The current flsah (11.3.300.271) and I can open several TABs that contain videos. Start to play the first TAB and close the TAB while it is playing. The audio continues to play. Start the next video and the video plays and both audios play. U have gotten as far as four before the audio of the first completed.

I can make this happen on demand. As it 'just do it'.
Comment 13 John Schoenick [:johns] 2012-08-21 16:48:07 PDT
Comment on attachment 650966 [details] [diff] [review]
Fix rebase error in nsObjectLoadingContent

https://hg.mozilla.org/integration/mozilla-inbound/rev/69c5fcb15368

try:
https://tbpl.mozilla.org/?tree=Try&rev=a16bc60ce498
Comment 14 Ed Morley [:emorley] 2012-08-22 02:45:15 PDT
https://hg.mozilla.org/mozilla-central/rev/69c5fcb15368
Comment 15 JoeG 2012-08-22 05:38:03 PDT
Confirmed with new Flash version 11.4.402.265 in Mozilla/5.0 (Windows NT 6.1;
Win64; x64; rv:17.0) Gecko/17.0 Firefox/17.0 ID:20120821135628 CSet:
1b51c7bf1e05

It doesn't happen in Namoroka, or even the latest Aurora as of 21 Aug 2012 on WinXP SP3.

Since Ed Morley's fix is dated 22.08, I hope this means it'll be fixed in today's Nightly.
Comment 16 JoeG 2012-08-22 07:50:46 PDT
Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:17.0) Gecko/17.0 Firefox/17.0 ID:20120822030558 CSet: abc17059522b

I've just updated to the above-mentioned build, and the issue has, unfortunately, not been resolved. 

On the FF Forum, "Dingler" alluded to this bug. https://bugzilla.mozilla.org/show_bug.cgi?id=784070

In any case, I can confirm that even with today's Nightly update, if you run a Flash video and then close the tab, navigate away, or do pretty much anything besides close FF, the audio continues playing.

I'm using 64-bit FF on Win 7 pro 64 bit. As stated, I'm also using the FlashBlock addon and the very latest version of the Flash plugin.
Comment 17 XtC4UaLL [:xtc4uall] 2012-08-22 08:39:22 PDT
(In reply to Joe Greenman from comment #16)
Wait one more Nightly since Comment 14 is not within today's Fixes (http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=1b51c7bf1e05&tochange=abc17059522b).
Comment 18 JoeG 2012-08-23 10:22:53 PDT
Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:17.0) Gecko/17.0 Firefox/17.0 ID:20120823030518 CSet: 5650196a8c7d

The fix worked on my machine. Thanks.
Comment 19 John Schoenick [:johns] 2012-08-29 11:14:31 PDT
*** Bug 784070 has been marked as a duplicate of this bug. ***

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