Closed Bug 1713742 Opened 5 years ago Closed 5 years ago

enable forkserver on OpenBSD

Categories

(Core :: IPC, enhancement)

All
OpenBSD
enhancement

Tracking

()

RESOLVED FIXED
91 Branch
Tracking Status
firefox91 --- fixed

People

(Reporter: gaston, Assigned: gaston)

Details

Attachments

(1 file, 1 obsolete file)

Attached patch patch-toolkit_moz_configure (obsolete) — Splinter Review

it's been enabled on FreeBSD in bug #1607103, afaict it's not really used (?? should be used for fission ?) but enabling it on OpenBSD didnt produce more errors than before...

Attachment #9224387 - Flags: review?(gsvelto)

:sinker, any idea about the implications/interactoins with our sandboxing (added in bug #1457092 then improved in bug #1584839 and bug #1580268) ?

Flags: needinfo?(thinker.li)

After enabling support you also need to flip the dom.ipc.forkserver.enable preference to use it. If it works the only difference you should see is a drop of several megabytes (we measured between 5 and 7 MiB) in the RSS of child processes.

Assignee: nobody → landry
Status: NEW → ASSIGNED

The patch is fine but it needs to be submitted using Phabricator in order to land it. If your busy I can do it for you.

Flags: needinfo?(landry)

It seems to work fine, in my limited testing with 90.0b1. all the processes that were previously named 'tab' now have /usr/local/lib/firefox/firefox -contentproc -appdir /usr/local/lib/firefox/browser 48553 forkserver in the process list, and are indeed consuming a bit less ressources:

landry   48553 11.4  4.6 372144 375608 p4  S+pU    7:45AM    0:07.25 firefox
landry   96300  4.2  1.9 123248 152900 p4  S+pU    7:45AM    0:02.25 /usr/local/lib/firefox/firefox -contentproc -appdir /usr/local/lib/firefox/browser 48553 forkserver
landry    7762  2.6  1.4 55172 111604 p4  S+pU    7:45AM    0:01.30 /usr/local/lib/firefox/firefox -contentproc -appdir /usr/local/lib/firefox/browser 48553 forkserver
landry   25373  0.0  0.4  2128 31344 p4  S+      7:45AM    0:00.05 /usr/local/lib/firefox/firefox -contentproc -appdir /usr/local/lib/firefox/browser 48553 forkserver
landry   81008  0.0  0.5  4904 40332 p4  S+      7:45AM    0:00.06 /usr/local/lib/firefox/firefox -contentproc -parentBuildID 20210601230611 -prefsLen 1 -prefMapSize 248765 -appdir /usr/local/lib/firefox/browser 48553 socket
landry   18885  0.0  0.7 18928 59824 p4  S+pU    7:45AM    0:00.21 /usr/local/lib/firefox/firefox -contentproc -appdir /usr/local/lib/firefox/browser 48553 forkserver
landry   66644  0.8  1.1 35844 93748 p4  S+pU    7:45AM    0:00.59 /usr/local/lib/firefox/firefox -contentproc -appdir /usr/local/lib/firefox/browser 48553 forkserver
landry   70099  0.0  0.7 19468 54236 p4  S+pU    7:45AM    0:00.12 /usr/local/lib/firefox/firefox -contentproc -appdir /usr/local/lib/firefox/browser 48553 forkserver

without forkserver enabled:

landry   96915 25.2  4.8 403628 393260 p4  S+pU    7:48AM    0:11.61 firefox
landry   99597  6.4  2.0 106308 161024 p4  S+pU    7:48AM    0:03.07 /usr/local/lib/firefox/firefox -contentproc -childID 4 -isForBrowser -prefsLen 5254 -prefMapSize 248765 -jsInit 285440 -parentBuildID 20210601230611 -appdir /usr/local/lib/firefox/browser 96915 tab
landry   80805  3.1  1.6 57308 129760 p4  S+pU    7:48AM    0:01.44 /usr/local/lib/firefox/firefox -contentproc -childID 1 -isForBrowser -prefsLen 65 -prefMapSize 248765 -jsInit 285440 -parentBuildID 20210601230611 -appdir /usr/local/lib/firefox/browser 96915 tab
landry   69369  2.5  1.5 55280 126428 p4  S+pU    7:48AM    0:01.20 /usr/local/lib/firefox/firefox -contentproc -childID 2 -isForBrowser -prefsLen 388 -prefMapSize 248765 -jsInit 285440 -parentBuildID 20210601230611 -appdir /usr/local/lib/firefox/browser 96915 tab
landry   51711  3.0  1.6 56056 129092 p4  S+pU    7:48AM    0:01.27 /usr/local/lib/firefox/firefox -contentproc -childID 5 -isForBrowser -prefsLen 5914 -prefMapSize 248765 -jsInit 285440 -parentBuildID 20210601230611 -appdir /usr/local/lib/firefox/browser 96915 tab
landry   24641  0.0  0.5  4636 40016 p4  S+      7:48AM    0:00.07 /usr/local/lib/firefox/firefox -contentproc -parentBuildID 20210601230611 -prefsLen 1 -prefMapSize 248765 -appdir /usr/local/lib/firefox/browser 96915 socket
landry   74573  0.8  1.3 35824 108064 p4  S+pU    7:48AM    0:00.56 /usr/local/lib/firefox/firefox -contentproc -childID 3 -isForBrowser -prefsLen 482 -prefMapSize 248765 -jsInit 285440 -parentBuildID 20210601230611 -appdir /usr/local/lib/firefox/browser 96915 tab
landry   20276  0.2  0.8 17088 68992 p4  S+pU    7:48AM    0:00.17 /usr/local/lib/firefox/firefox -contentproc -childID 7 -isForBrowser -prefsLen 5980 -prefMapSize 248765 -jsInit 285440 -parentBuildID 20210601230611 -appdir /usr/local/lib/firefox/browser 96915 tab

will run with the setting enabled for a while to see if it doesnt conflict with the sandboxing work i started in bug #1713745 and bug #1713999.

as for submitting the patch via Phabricator, my moz-phab fu is rusty, but since i have a bunch of patches to upstream, guess that's an incentive for me to try and submit it...

Flags: needinfo?(landry)

i guess there's another bug tracking dom.ipc.forkserver.enable being turned on for all platforms ?

(In reply to Landry Breuil (:gaston) from comment #5)

i guess there's another bug tracking dom.ipc.forkserver.enable being turned on for all platforms ?

We don't have one. I think we can file one per platform as we go. ATM the only platform that has it enabled and turned on by default is KaiOS but we hoped to be able to turn it on on Linux soon-ish.

Attachment #9224387 - Attachment is obsolete: true
Attachment #9224387 - Flags: review?(gsvelto)

Alright, this is queued for landing.

remove ni since Gabriele has handled it!

Flags: needinfo?(thinker.li)
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → 91 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: