Closed Bug 1647695 Opened 7 months ago Closed 6 months ago

Display unresponsive processes in about:processes

Categories

(Core :: DOM: Content Processes, task, P2)

task

Tracking

()

RESOLVED FIXED
81 Branch
Fission Milestone M7
Tracking Status
firefox81 --- fixed

People

(Reporter: Yoric, Assigned: Yoric)

References

(Blocks 1 open bug)

Details

Attachments

(5 files)

I don't know if there's an API to detect this, but if there's one, this would be useful.

After discussing this with @smaug, we came up with a possible strategy:

  • The IdleScheduler maintains an array mActiveCounter[mChildId]. It is 0 if we have been informed by a child that it is idle.
  • At any time, if mActiveCounter[mChildId] == 0 or we have received a message from this child recently, the child is healthy.
  • Other children could be frozen. We need to send them a message to check they aren't.
  • Since we only ping non-idle children, we don't risk paging processes back into active memory, so we're not going to hurt the system.
Fission Milestone: --- → M7
Assignee: nobody → dteller
Status: NEW → ASSIGNED
Pushed by dteller@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/2a0969c26d95
Expose ChildID on frozen nsIHangReport;r=mconley
https://hg.mozilla.org/integration/autoland/rev/3417fe7200bd
Display an hourglass in front of frozen processes;r=florian
https://hg.mozilla.org/integration/autoland/rev/c1af633ab74e
Uniformizing naming conventions within fields of ChildProcInfoDictionary;r=tarek
Flags: needinfo?(dteller)

Sorry about that. Forgot to relaunch the tests after the latest round of reviews.

Flags: needinfo?(dteller)
Pushed by dteller@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/0f097362abf8
Expose ChildID on frozen nsIHangReport;r=mconley
https://hg.mozilla.org/integration/autoland/rev/1b1fa5dbd9bd
Display an hourglass in front of frozen processes;r=florian
https://hg.mozilla.org/integration/autoland/rev/01b6951d0aae
Uniformizing naming conventions within fields of ChildProcInfoDictionary;r=tarek

for the record:

I did not have the opportunity to review the last change, you changed the test and pushed it.

As is stands, I was r- on the patch without an explanation on the change

Flags: needinfo?(dteller)

Yes, I changed the test. The invariant it tested was bogus. Nothing in the code indicated that it should hold. I replaced it by a weaker invariant that is expected to hold.

Do you wish me to cancel the landing until you have time to review this?

Flags: needinfo?(dteller) → needinfo?(tarek)

Discussed with Yoric in riot - we'll do follow up bugs

Flags: needinfo?(tarek)

Backed out for failures on browser_aboutprocesses.js

backout: https://hg.mozilla.org/integration/autoland/rev/ea03df7a155432fc9cd0b4155c59a7a5dd97e6de

push: https://treeherder.mozilla.org/#/jobs?repo=autoland&revision=01b6951d0aaee040d5c51ef737046ea88cd9f7bb&selectedTaskRun=LHuqqqKOTZyd92waGzXH6g.0

failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=311904444&repo=autoland&lineNumber=3619

[task 2020-08-03T17:20:45.558Z] 17:20:45 INFO - TEST-START | toolkit/components/aboutprocesses/tests/browser/browser_aboutprocesses.js
[task 2020-08-03T17:21:30.614Z] 17:21:30 INFO - TEST-INFO | started process screentopng
[task 2020-08-03T17:21:30.874Z] 17:21:30 INFO - TEST-INFO | screentopng: exit 0
[task 2020-08-03T17:21:30.875Z] 17:21:30 INFO - Buffered messages logged at 17:20:45
[task 2020-08-03T17:21:30.875Z] 17:21:30 INFO - Entering test bound testAboutProcesses
[task 2020-08-03T17:21:30.876Z] 17:21:30 INFO - Setting up about:processes
[task 2020-08-03T17:21:30.877Z] 17:21:30 INFO - Buffered messages finished
[task 2020-08-03T17:21:30.878Z] 17:21:30 INFO - TEST-UNEXPECTED-FAIL | toolkit/components/aboutprocesses/tests/browser/browser_aboutprocesses.js | Test timed out -
[task 2020-08-03T17:21:30.878Z] 17:21:30 INFO - GECKO(14888) | MEMORY STAT vsizeMaxContiguous not supported in this build configuration.
[task 2020-08-03T17:21:30.878Z] 17:21:30 INFO - GECKO(14888) | MEMORY STAT | vsize 2966MB | residentFast 285MB | heapAllocated 93MB
[task 2020-08-03T17:21:30.878Z] 17:21:30 INFO - TEST-OK | toolkit/components/aboutprocesses/tests/browser/browser_aboutprocesses.js | took 45070ms
[task 2020-08-03T17:21:30.878Z] 17:21:30 INFO - Not taking screenshot here: see the one that was previously logged
[task 2020-08-03T17:21:30.878Z] 17:21:30 INFO - TEST-UNEXPECTED-FAIL | toolkit/components/aboutprocesses/tests/browser/browser_aboutprocesses.js | Found a tab after previous test timed out: https://example.org/ -
[task 2020-08-03T17:21:30.878Z] 17:21:30 INFO - Not taking screenshot here: see the one that was previously logged
[task 2020-08-03T17:21:30.878Z] 17:21:30 INFO - TEST-UNEXPECTED-FAIL | toolkit/components/aboutprocesses/tests/browser/browser_aboutprocesses.js | Found a tab after previous test timed out: about:processes -
[task 2020-08-03T17:21:30.878Z] 17:21:30 INFO - checking window state
[task 2020-08-03T17:21:30.879Z] 17:21:30 INFO - GECKO(14888) | Completed ShutdownLeaks collections in process 14888

GetProcInfo is designed to collect process & thread data while they're running,
which means that it needs to handle the case in which a thread shuts down while
we're looking at it.

By design, in case of failure, GetProcInfo return partial data in case of failure.
This patch ensures that we always either set the thread ID (which we use to display about:processes) correctly or remove
the thread entirely from the list.

Depends on D83667

As far as I can tell, it has problems loading https://example.org – but it seems to work better with https://example.com (neither of which should require network access). Replacing the one with the other seems to do the trick, if I can trust that I've been using TV correctly:

https://treeherder.mozilla.org/#/jobs?repo=try&revision=875b5abd0202d5791f7f9382f785c6d70ac17cde&selectedTaskRun=BWOSvEEMTpKHYWLZo_nxWA.0

Fixed another (Windows-only) issue while I was there because it oranged intermittently.

Attachment #9163808 - Attachment description: Bug 1647695 - Display an hourglass in front of frozen processes;r?florian → Bug 1647695 - Display an hourglass in front of frozen processes;r?florian!
Attachment #9163809 - Attachment description: Bug 1647695 - Uniformizing naming conventions within fields of ChildProcInfoDictionary;r?tarek → Bug 1647695 - Uniformizing naming conventions within fields of ChildProcInfoDictionary;r?tarek!
Pushed by dteller@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/d02588404368
Expose ChildID on frozen nsIHangReport;r=mconley
https://hg.mozilla.org/integration/autoland/rev/b3e8e9466c0d
Display an hourglass in front of frozen processes;r=florian
https://hg.mozilla.org/integration/autoland/rev/2facd744d7c3
Uniformizing naming conventions within fields of ChildProcInfoDictionary;r=tarek
https://hg.mozilla.org/integration/autoland/rev/873dc7235673
Make Windows GetProcInfo a bit more resilient;r=tarek
You need to log in before you can comment on or make changes to this bug.