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

RESOLVED WORKSFORME

Status

()

Core
DOM: Content Processes
RESOLVED WORKSFORME
2 years ago
2 years ago

People

(Reporter: vladan, Assigned: jimm)

Tracking

38 Branch
x86_64
Windows 7
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(e10sm8+)

Details

Attachments

(1 attachment)

(Reporter)

Description

2 years ago
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
(Reporter)

Updated

2 years ago
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)?
(Reporter)

Comment 2

2 years ago
(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?
(Reporter)

Comment 3

2 years ago
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"?
(Reporter)

Updated

2 years ago
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
(Reporter)

Comment 5

2 years ago
(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)

Comment 8

2 years ago
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.

Comment 9

2 years ago
(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.

Comment 10

2 years ago
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?
(Reporter)

Comment 11

2 years ago
(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)
(Reporter)

Updated

2 years ago
Flags: needinfo?(vdjeric)

Comment 12

2 years ago
(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.
(Reporter)

Comment 13

2 years ago
(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)
(Reporter)

Comment 14

2 years ago
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)
(Reporter)

Updated

2 years ago
Blocks: 1116806
Blocks: 1135130
No longer blocks: 1116806
Depends on: 1127888
tracking-e10s: --- → m8+
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
(Assignee)

Updated

2 years ago
Depends on: 1119442
(Assignee)

Updated

2 years ago
Assignee: wmccloskey → jmathies
(Assignee)

Comment 18

2 years ago
Created attachment 8678344 [details]
testplugin - hangit.html
(Assignee)

Comment 19

2 years ago
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
Last Resolved: 2 years ago
Flags: needinfo?(wmccloskey)
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.