Closed Bug 1635494 Opened 4 years ago Closed 4 years ago

Kill processes from about:processes

Categories

(Core :: DOM: Content Processes, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
Fission Milestone M7
Tracking Status
firefox-esr68 --- unaffected
firefox75 --- unaffected
firefox76 --- unaffected
firefox77 --- unaffected
firefox78 --- wontfix
firefox82 --- wontfix
firefox83 --- fixed

People

(Reporter: Yoric, Assigned: Yoric)

References

(Blocks 1 open bug)

Details

Attachments

(3 files, 7 obsolete files)

47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review

We need a button to kill a process.

We may wish to allow both a graceful kill and a not-so-graceful one.

Assignee: nobody → dteller

I wonder if we should also have a "Pause process" for testing purposes.

So, after discussing this on chat, the consensus is that we shouldn't try to be gentle with the content process when we kill it.

We should, however, make sure that we don't send a crash report.

After chatting with gsvelto, it seems that a SIGKILL or a TerminateProcess should manage to kill the content process without sending a crash report.

A small xpcom module implemented in Rust, designed to provide low-level tools to deal with processes
from JS. For the moment, the only notable feature is kill(), designed to be used from about:processes

Services.processtools.kill() is designed to kill without causing crash reports.
Let's make sure it does not cause crash reports.

Depends on D82552

Just a utility shortcut to make using nsIProcessServiceTools more readable from JS.

Depends on D82553

This adds a new button to kill processes.

Depends on D82554

Attachment #9161872 - Attachment is obsolete: true
Attachment #9161530 - Attachment is obsolete: true
Attachment #9161911 - Attachment description: Bug 1635494 - Test that Services.processtools.kill doesn't cause crash reports;r?gsvelto → Bug 1635494 - Test that nsIProcessToolsService::kill doesn't cause crash reports;r?gsvelto
Attachment #9161912 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Fission Milestone: --- → M6b
Pushed by dteller@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/19c4d55874d9
nsIProcessToolsService;r=lina
https://hg.mozilla.org/integration/autoland/rev/36e670cd1653
Test that nsIProcessToolsService::kill doesn't cause crash reports;r=gsvelto
https://hg.mozilla.org/integration/autoland/rev/862a5dcbe7a5
Kill processes from about:processes;r=florian,flod
https://hg.mozilla.org/integration/autoland/rev/67a16c6149f7
Make 'kill browser' button stand out;r=florian,fluent-reviewers

Backed out for failures on test_process_kill.js

backout: https://hg.mozilla.org/integration/autoland/rev/5e83cc94405fdc2f94f3daea15b224b546505005

push: https://treeherder.mozilla.org/#/jobs?repo=autoland&group_state=expanded&selectedTaskRun=OYwSQenyTQmhSebt03ZQpg.0&revision=67a16c6149f716d706a99528e3a9df5b50ca468d

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

[task 2020-07-22T10:58:13.026Z] 10:58:13 INFO - TEST-START | toolkit/components/processtools/tests/xpcshell/test_process_kill.js
[task 2020-07-22T10:58:13.713Z] 10:58:13 WARNING - TEST-UNEXPECTED-FAIL | toolkit/components/processtools/tests/xpcshell/test_process_kill.js | xpcshell return code: 0
[task 2020-07-22T10:58:13.714Z] 10:58:13 INFO - TEST-INFO took 689ms
[task 2020-07-22T10:58:13.714Z] 10:58:13 INFO - >>>>>>>
[task 2020-07-22T10:58:13.714Z] 10:58:13 INFO - PID 8852 | [8852, Main Thread] WARNING: Failed to get directory to cache.: file /builds/worker/checkouts/gecko/security/sandbox/win/src/sandboxbroker/sandboxBroker.cpp, line 121
[task 2020-07-22T10:58:13.714Z] 10:58:13 INFO - PID 8852 | [8852, Main Thread] WARNING: Failed to get directory to cache.: file /builds/worker/checkouts/gecko/security/sandbox/win/src/sandboxbroker/sandboxBroker.cpp, line 121
[task 2020-07-22T10:58:13.715Z] 10:58:13 INFO - PID 8852 | [8852, Main Thread] WARNING: Failed to get directory to cache.: file /builds/worker/checkouts/gecko/security/sandbox/win/src/sandboxbroker/sandboxBroker.cpp, line 121
[task 2020-07-22T10:58:13.715Z] 10:58:13 INFO - PID 8852 | [8852, Main Thread] WARNING: Failed to get directory to cache.: file /builds/worker/checkouts/gecko/security/sandbox/win/src/sandboxbroker/sandboxBroker.cpp, line 121
[task 2020-07-22T10:58:13.715Z] 10:58:13 INFO - PID 8852 | [8852, Main Thread] WARNING: Failed to get directory to cache.: file /builds/worker/checkouts/gecko/security/sandbox/win/src/sandboxbroker/sandboxBroker.cpp, line 121
[task 2020-07-22T10:58:13.716Z] 10:58:13 INFO - PID 8852 | [8852, Main Thread] WARNING: Couldn't get the user appdata directory. Crash events may not be produced.: file /builds/worker/checkouts/gecko/toolkit/crashreporter/nsExceptionHandler.cpp, line 2914
[task 2020-07-22T10:58:13.716Z] 10:58:13 INFO - (xpcshell/head.js) | test MAIN run_test pending (1)
[task 2020-07-22T10:58:13.716Z] 10:58:13 INFO - (xpcshell/head.js) | test run_next_test 0 pending (2)
[task 2020-07-22T10:58:13.717Z] 10:58:13 INFO - (xpcshell/head.js) | test MAIN run_test finished (2)
[task 2020-07-22T10:58:13.717Z] 10:58:13 INFO - running event loop
[task 2020-07-22T10:58:13.717Z] 10:58:13 INFO - toolkit/components/processtools/tests/xpcshell/test_process_kill.js | Starting setup
[task 2020-07-22T10:58:13.717Z] 10:58:13 INFO - (xpcshell/head.js) | test setup pending (2)
[task 2020-07-22T10:58:13.717Z] 10:58:13 INFO - (xpcshell/head.js) | test run_next_test 0 finished (2)
[task 2020-07-22T10:58:13.717Z] 10:58:13 INFO - PID 8852 | [8852, Main Thread] WARNING: NS_ENSURE_SUCCESS(rv, kKnownEsrVersion) failed with result 0x80004002 (NS_NOINTERFACE): file /builds/worker/checkouts/gecko/toolkit/components/resistfingerprinting/nsRFPService.cpp, line 673
[task 2020-07-22T10:58:13.717Z] 10:58:13 INFO - (xpcshell/head.js) | test run_next_test 1 pending (2)
[task 2020-07-22T10:58:13.717Z] 10:58:13 INFO - (xpcshell/head.js) | test setup finished (2)
[task 2020-07-22T10:58:13.717Z] 10:58:13 INFO - toolkit/components/processtools/tests/xpcshell/test_process_kill.js | Starting test_subprocess_kill
[task 2020-07-22T10:58:13.717Z] 10:58:13 INFO - (xpcshell/head.js) | test test_subprocess_kill pending (2)
[task 2020-07-22T10:58:13.717Z] 10:58:13 INFO - (xpcshell/head.js) | test run_next_test 1 finished (2)

Flags: needinfo?(dteller)

Thanks, investigating!

Flags: needinfo?(dteller)

(In reply to Natalia Csoregi [:nataliaCs] from comment #13)

Also build bustage on Windows 2012 AArch64: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=310684322&repo=autoland&lineNumber=18934

That's in a third-party library upon which I do not depend and that I do not touch in my commit, so I plead innocent on that one.

(In reply to David Teller [:Yoric] (please use "needinfo") from comment #15)

(In reply to Natalia Csoregi [:nataliaCs] from comment #13)

Also build bustage on Windows 2012 AArch64: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=310684322&repo=autoland&lineNumber=18934

That's in a third-party library upon which I do not depend and that I do not touch in my commit, so I plead innocent on that one.

Or maybe not. Investigating.

Fission Milestone: M6b → M6c
Attachment #9165652 - Attachment is obsolete: true

There are some r+ patches which didn't land and no activity in this bug for 2 weeks.
:Yoric, could you have a look please?
For more information, please visit auto_nag documentation.

Flags: needinfo?(dteller)

Doesn't block any fission milestone.

Fission Milestone: M6c → ---
Flags: needinfo?(dteller)
Pushed by dteller@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/a91e04073f9f
nsIProcessToolsService;r=lina
https://hg.mozilla.org/integration/autoland/rev/aab5984f73db
Test that nsIProcessToolsService::kill doesn't cause crash reports;r=gsvelto

Thanks, investigating!

Flags: needinfo?(dteller)
Pushed by dteller@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/2608db2fa8be
nsIProcessToolsService;r=lina
https://hg.mozilla.org/integration/autoland/rev/14456b365a11
Test that nsIProcessToolsService::kill doesn't cause crash reports;r=gsvelto

The underlying issue is... irritating.
It's a minor Rust papercut, I guess, but which turns into a build bustage.

Flags: needinfo?(dteller)
Pushed by dteller@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/569b0d731bad
nsIProcessToolsService;r=lina
https://hg.mozilla.org/integration/autoland/rev/52cfbd2cc59e
Test that nsIProcessToolsService::kill doesn't cause crash reports;r=gsvelto

Tracking about:processes bug for Fission M7 Beta

Fission Milestone: --- → M7
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 82 Branch

Why are there two new patches for review in a bug that's closed as FIXED? Could you please describe what they do? Thanks!

Flags: needinfo?(dteller)

Oops, phabricator/lando auto-closed it when I landed the first two patches.

Status: RESOLVED → REOPENED
Flags: needinfo?(dteller)
Resolution: FIXED → ---
Status: REOPENED → ASSIGNED
Keywords: leave-open
Target Milestone: 82 Branch → ---
Attachment #9163184 - Attachment is obsolete: true
Pushed by dteller@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/3461db24677e
Kill processes from about:processes;r=florian,flod

Ok, this time, it's officially fixed!

Status: ASSIGNED → RESOLVED
Closed: 4 years ago4 years ago
Resolution: --- → FIXED
Attachment #9177374 - Attachment is obsolete: true
Attachment #9177401 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: