Closed Bug 1129174 Opened 10 years ago Closed 9 years ago

[e10s] Plugin hangs can cause slow script UI to appear

Categories

(Core :: DOM: Content Processes, defect)

38 Branch
x86_64
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME
Tracking Status
e10s m8+ ---

People

(Reporter: vladan, Assigned: jimm)

References

Details

Attachments

(1 file)

With e10s, sometimes the slow-script notification bar will appear and clicking on "Stop script" only makes the notification re-appear. Oddly enough, clicking on "kill web process" isn't enough to make the session usable again -- the content pages never reload, and the slow-script bar appears again.

- I've seen this in the Nightlies from the last couple of weeks
- I can't reproduce it reliably. Open tabs during last event: gmail, google calendar, twitter, google maps, youtube, a few other more  static pages
-- Installed extensions: Gecko profiler, Pocket service, Send Tab to Device
- I've seen this on more than one machine
Summary: Slow script notification never goes away in e10s → In e10s, clicking "Stop script" doesn't stop the script or clear the slow script notification
Is the page actually unresponsive? Are you able to scroll? When you select "Stop script" or "kill web process", does anything appear in the error console (you might have to open it using a menu rather than a command key)?
(In reply to Bill McCloskey (:billm) from comment #1)
> Is the page actually unresponsive? Are you able to scroll? 

I think it was responsive initially but shortly all the pages turned black

> When you select "Stop script" or "kill web process", does anything appear in the error
> console (you might have to open it using a menu rather than a command key)?

I didn't look in the Error Console, but I'm confident I can reproduce this issue again with a day or two.
Any other debug info you need?
Just got this hang again. The page was completely unresponsive immediately, nothing appeared in the error console after I pressed "Stop script".
Next time, can you try "Debug Script"?
Summary: In e10s, clicking "Stop script" doesn't stop the script or clear the slow script notification → [e10s] clicking "Stop script" doesn't stop the script or clear the slow script notification
(In reply to Bill McCloskey (:billm) from comment #4)
> Next time, can you try "Debug Script"?

I just tried it. It showed a callstack consisting solely of obfuscated GMail JS. Stopping the script didn't resolve the hang though and I had to restart the browser.

I think you can reproduce this hang by running e10s with a pinned GMail tab.
(In reply to Vladan Djeric (:vladan) from comment #5)
> I just tried it. It showed a callstack consisting solely of obfuscated GMail
> JS. Stopping the script didn't resolve the hang though and I had to restart
> the browser.

I remember that other report you filed where the "script blocked" notification appears when moving around in gmail. Could you try disabling add-ons for a day or so just to see if it resolves the problem?

> I think you can reproduce this hang by running e10s with a pinned GMail tab.

I run in this configuration every day, so presumably there must be some other trigger.
Does disabling add-ons have any effect?
Flags: needinfo?(vdjeric)
I get this exact hang on both my work PC and my home PC, it's very frustrating.

The only addon in common between them is HTTPS everywhere.
(In reply to Bill McCloskey (:billm) from comment #4)
> Next time, can you try "Debug Script"?

Hitting debug script makes the tab responsive for a few moments, and you can browse that page. Clicking on anything doesn't work and switching tabs doesn't work though.
Sorry for the comment spam, but since disabling async plugin init I can't repeat this bug.

I think it's related to that? I had the setting turned on on both home and work.

Vladen, did you turn on dom.ipc.plugins.asyncInit to true?
(In reply to Grant from comment #10)
> Vladen, did you turn on dom.ipc.plugins.asyncInit to true?

Yes, I do have asyncInit enabled
Flags: needinfo?(vdjeric)
Flags: needinfo?(vdjeric)
(In reply to Vladan Djeric (:vladan) -- please needinfo! from comment #11)
> (In reply to Grant from comment #10)
> > Vladen, did you turn on dom.ipc.plugins.asyncInit to true?
> 
> Yes, I do have asyncInit enabled

Does disabling it fix this problem? 

Disabling it has fixed both my home and work PC's, nightly is much more enjoyable now.
(In reply to Bill McCloskey (:billm) from comment #7)
> Does disabling add-ons have any effect?

Issue still happens with addons disabled. I haven't tried turning off asyncInit yet though
Flags: needinfo?(vdjeric)
Flags: needinfo?(vdjeric)
I don't get these hangs on e10s when asyncInit = false
Flags: needinfo?(vdjeric)
Thanks very much Vladan! Aaron, have you done much testing of asyncInit with e10s?
Flags: needinfo?(aklotz)
Probably bug 1127888. Patch under review.
Flags: needinfo?(aklotz)
I'm going to repurpose this bug to cover the fact that the slow script UI was appearing even though the underlying problem was a plugin hang. I believe the basic problem was as follows:

- our slow script timeout is 10s
- our plugin hang timeout is 45s

If the plugin hang is initiated from JS code, then we'll get a JS timeout after 10 seconds. 35 seconds after that, we'll get a plugin hang notification. In between, we show the slow script UI. After that, I think we'll show the plugin hang UI.

In these cases, I think we always want to show the plugin hang UI. That's what this bug will be about. It's not clear if we should show the UI after 10s or 45s. I'm not sure it really matters that much.
Summary: [e10s] clicking "Stop script" doesn't stop the script or clear the slow script notification → [e10s] Plugin hangs can cause slow script UI to appear
Assignee: nobody → wmccloskey
Depends on: 1119442
Assignee: wmccloskey → jmathies
Not having any luck reproducing. I tried a few things:

1) hung js with a plugin in the page
2) hung plugin via a js call
3) hung plugin with some heavy js running in the page

in each case the hang notification did the right thing.
Flags: needinfo?(wmccloskey)
I thought about this some more and I guess we won't get a JS slow script notification when a plugin is running because the interrupt callback won't fire. So I'll close this as WFM.
Status: NEW → RESOLVED
Closed: 9 years ago
Flags: needinfo?(wmccloskey)
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: