New issue
Advanced search Search tips

Issue 716153 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner:
Closed: Apr 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug

Blocking:
issue 716093



Sign in to add a comment

Hang monitor not working

Project Member Reported by rbyers@chromium.org, Apr 27 2017

Issue description

Chrome Version       : 58.0.3029.78
OS Version: 9334.52.0
URLs (if applicable) :

What steps will reproduce the problem?
1. Load a web page that just busy-loops, eg. paste this into jsbin.com:
var x=0;
while(x<0) x++;

What is the expected result?
Expect to see the tab hang and eventually (before too long) get the kill/wait dialog.

What happens instead of that?
Just hangs apparently forever consuming 100% CPU
I believe this also makes us more blind to hang bugs which should be generating crash reports but aren't (eg. issue 716093).

 

Comment 1 by rbyers@chromium.org, Apr 27 2017

Cc: -dtapu...@chromium.org
Owner: dtapu...@chromium.org
I also can't close such a tab (eg. clicking the tab close X).  Why on earth is closing a tab blocked on the renderer?

Dave, is there anyone that owns hang handling?  I'm not sure how to route this.

Comment 2 by rbyers@chromium.org, Apr 27 2017

Summary: Hang monitor not working (was: Hang monitor not working?)

Comment 3 by rbyers@chromium.org, Apr 27 2017

Blocking: 716093
Cc: a...@chromium.org creis@chromium.org
avi@ was the last one in this code. Not sure if his changes got merged to 58.

Comment 5 by a...@chromium.org, Apr 27 2017

Owner: a...@chromium.org
Status: Assigned (was: Unconfirmed)

Comment 6 by a...@chromium.org, Apr 27 2017

Please confirm you don't have DevTools open for that tab.

Comment 7 by a...@chromium.org, Apr 27 2017

I'm assuming you meant an infinite loop in your first comment (var x=0;while(x<0) x++; doesn't loop).

A modified version:

<html lang="en">
<head>
  <meta http-equiv="content-type" content="text/html; charset=utf-8">
  <title></title>
</head>
<body>
<button onclick="var x=0;while(1) x++;">clickme</button>
</body>
</html>

works as it should in 59.0.3071.25, showing a hang dialog. Will dig further.

(Please confirm your repro setup as in comment 6.)
Seems to be working for me on Linux (M58 and ToT)
Right sorry, yes an infinite loop (x>=0 - typo because I couldn't copy/paste out of my hung renderer).

And yes it was reproducing without devtools open.  But I think maybe I wasn't waiting long enough, or getting impatient switching between tabs?  If I click on the page and sit there with the tab open long enough then yes I can now see the hang monitor.  Is the timeout reset when I switch tabs?

I also can't close the tab while the renderer is hung (even when there is no unload handler or anything).  Is that a bug?

Comment 11 by a...@chromium.org, Apr 27 2017

There are two basic rules for the hang timer. First, a page in the background is allowed to hang as much as it wants; the user won't notice it is hung. Second, if a user isn't trying to interact with a page the user won't notice it is hung.

So the hang timer begins once a user gives a page an input event. If 30 seconds elapse from the first input event, and there are still outstanding input events, and the page hasn't gone into the background, the hang dialog will show.

So yes, you need to click on the page and yes, the timer is reset when you switch tabs. 

A failure to be able to close the page is unexpected. The close timer is one that I moved to be independent, and I rebuilt it for 59 (59.0.3030.0). I just tried in 59, and a hung page closes instantly.

If you can repro this is 59, that would be great. Unfortunately I'm not comfortable asking for a merge of this code; it's tricky.
Status: WontFix (was: Assigned)
Thanks for the details Avi!
I confirmed that the tab closing issue was only on 58.  59 seems fine (up to a second or two delay).

So it seems all is fine afterall, sorry for the noise!

Comment 13 by a...@chromium.org, Apr 27 2017

No problem at all! Far better to check on something suspicious and find it working ok than ignore something and hope it's fixed.


Sign in to add a comment