<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>140062</bug_id>
          
          <creation_ts>2015-01-04 18:01:44 -0800</creation_ts>
          <short_desc>[Linux] SeccompBroker processes use too much memory</short_desc>
          <delta_ts>2016-09-21 05:23:41 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKit2</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Minor</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>140072</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Michael Catanzaro">mcatanzaro</reporter>
          <assigned_to name="Michael Catanzaro">mcatanzaro</assigned_to>
          <cc>cgarcia</cc>
    
    <cc>mcatanzaro</cc>
    
    <cc>tmpsantos</cc>
    
    <cc>yoon</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1058622</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2015-01-04 18:01:44 -0800</bug_when>
    <thetext>When compiling with ENABLE_SECCOMP_FILTERS, each WebKitWebProcess forks off a second WebKitWebProcess to broker system calls for the original WebKitWebProcess. This occurs relatively late, after memory is allocated for various purposes that that the broker process doesn&apos;t need. Each broker process uses 12.1 MiB (on the GTK+ port), which would be OK if the broker was shared between all web processes, but it&apos;s too much when there is a separate broker for each web process.

There are various things we could try to do to fix this:

* fork off the broker process as early as possible. In particular, ChildProcessMain&lt;ChildProcessType, ChildProcessMainType&gt; calls InitializeWebKit2(), which we probably want to avoid if at all possible.
* exec the broker process after forking, so it only uses as much memory as it requires. (This has another advantage: the broker process would not confusingly be named WebKitWebProcess when viewed in top or System Monitor.) We&apos;d need to find some way to get the syscall policy to the broker via IPC before the &quot;real&quot; web process applies the policy.
* Have a single broker handle system calls for all other WebKit processes. This would also require transmitting the syscall policy via IPC, and it might degrade performance. (At least on the GTK+ port, this might well be a good tradeoff.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1059901</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2015-01-08 12:00:23 -0800</bug_when>
    <thetext>(In reply to comment #0)
&gt; * Have a single broker handle system calls for all other WebKit processes.

It makes sense to use the UI process for this.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>