<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">On 8/19/19 10:01 PM, Alexander Kanavin
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CANNYZj9y6uP-=iSDLj=wQ-LTuAgBTsHL7F84eiCSs8=aycjZMg@mail.gmail.com">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <div dir="ltr">
        <div>Should the limit be simply raised? The 256M setup is
          crumbling on several fronts (runtime tests, modernisation of
          X, various non-x86 qemu targets). Adding per-image/target
          exceptions, custom non-upstreamable patches, or sticking to
          deprecated configurations isn't the right thing to do, I
          think.<br>
        </div>
        <div><br>
        </div>
      </div>
    </blockquote>
    <p>The modification of set default RLIMIT_NOFILE(4k) just keeps sync
      with the one in sysvinit,</p>
    <p>if the fronts you mentioned are working fine on sysvinit, I think
      it should be OK on systemd<br>
    </p>
    <p>but whether it has side effect or not still depends on the result
      of image test</p>
    <p><br>
    </p>
    <p>The fix is trying to fix the blocking issue while switching init
      manager from sysvinit to systemd for poky</p>
    <p><br>
    </p>
    <p>Hi RP,</p>
    <p>Should we make HIGH_RLIMIT_NOFILE configurable from local.conf?</p>
    <p>Then we could modify it according to the requirement, such as set
      it to 4k at image test <br>
    </p>
    <p>//Hongxu<br>
    </p>
    <blockquote type="cite"
cite="mid:CANNYZj9y6uP-=iSDLj=wQ-LTuAgBTsHL7F84eiCSs8=aycjZMg@mail.gmail.com">
      <div dir="ltr">
        <div><br>
        </div>
        <div>Alex<br>
        </div>
      </div>
      <br>
      <div class="gmail_quote">
        <div dir="ltr" class="gmail_attr">On Mon, 19 Aug 2019 at 15:34,
          Hongxu Jia &lt;<a href="mailto:hongxu.jia@windriver.com"
            target="_blank" moz-do-not-send="true">hongxu.jia@windriver.com</a>&gt;
          wrote:<br>
        </div>
        <blockquote class="gmail_quote" style="margin:0px 0px 0px
          0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Since
          do_testimage for core-image-sato-sdk has memory limitation
          (256Mib)<br>
          which caused rpc.statd failed with out of memory.<br>
          [  531.306146] Out of memory: Kill process 193 (rpc.statd)
          score 200 or sacrifice child<br>
          <br>
          The rpc.statd allocates memory according to RLIMIT_NOFILE,<br>
          so decrease it to 4k to keep sync with sysvinit<br>
          <br>
          After applying the patch, the memory cost is the same with
          sysvinit<br>
          rpcuser    340  0.0  1.0   3212  2588 ?        Ss   13:20 
           0:00 /usr/sbin/rpc.statd -F<br>
          root       473  0.0  0.2   3464   496 ?        Ss   13:23 
           0:00 /usr/sbin/rpc.mountd<br>
          <br>
          Signed-off-by: Hongxu Jia &lt;<a
            href="mailto:hongxu.jia@windriver.com" target="_blank"
            moz-do-not-send="true">hongxu.jia@windriver.com</a>&gt;<br>
          ---<br>
           ...0001-decreasing-the-default-RLIMIT_NOFILE.patch | 35
          ++++++++++++++++++++++<br>
           meta/recipes-core/systemd/<a href="http://systemd_242.bb"
            rel="noreferrer" target="_blank" moz-do-not-send="true">systemd_242.bb</a> 
                   |  4 +++<br>
           2 files changed, 39 insertions(+)<br>
           create mode 100644
meta/recipes-core/systemd/systemd/0001-decreasing-the-default-RLIMIT_NOFILE.patch<br>
          <br>
          diff --git
a/meta/recipes-core/systemd/systemd/0001-decreasing-the-default-RLIMIT_NOFILE.patch
b/meta/recipes-core/systemd/systemd/0001-decreasing-the-default-RLIMIT_NOFILE.patch<br>
          new file mode 100644<br>
          index 0000000..fb8e2c9<br>
          --- /dev/null<br>
          +++
b/meta/recipes-core/systemd/systemd/0001-decreasing-the-default-RLIMIT_NOFILE.patch<br>
          @@ -0,0 +1,35 @@<br>
          +From 55c7196163e481c508fa708b9b8f5e7bf2d2f007 Mon Sep 17
          00:00:00 2001<br>
          +From: Hongxu Jia &lt;<a
            href="mailto:hongxu.jia@windriver.com" target="_blank"
            moz-do-not-send="true">hongxu.jia@windriver.com</a>&gt;<br>
          +Date: Mon, 19 Aug 2019 07:16:47 -0400<br>
          +Subject: [PATCH] decreasing the default RLIMIT_NOFILE<br>
          +<br>
          +Since do_testimage for core-image-sato-sdk has memory limits
          (256Mib)<br>
          +which caused rpc.statd failed with out of memory.<br>
          +[  531.306146] Out of memory: Kill process 193 (rpc.statd)
          score 200 or sacrifice child<br>
          +<br>
          +The rpc.statd allocates memory according to RLIMIT_NOFILE,<br>
          +so decrease it to 4k which keep sync with sysvinit<br>
          +<br>
          +Upstream-Status: Inappropriate [oe specific]<br>
          +<br>
          +Signed-off-by: Hongxu Jia &lt;<a
            href="mailto:hongxu.jia@windriver.com" target="_blank"
            moz-do-not-send="true">hongxu.jia@windriver.com</a>&gt;<br>
          +---<br>
          + meson.build | 2 +-<br>
          + 1 file changed, 1 insertion(+), 1 deletion(-)<br>
          +<br>
          +diff --git a/meson.build b/meson.build<br>
          +index 18a7cc5..e30894b 100644<br>
          +--- a/meson.build<br>
          ++++ b/meson.build<br>
          +@@ -79,7 +79,7 @@ conf.set10('HAVE_SYSV_COMPAT',
          sysvinit_path != '' and sysvrcnd_path != '',<br>
          + <br>
          + conf.set10('BUMP_PROC_SYS_FS_FILE_MAX',
          get_option('bump-proc-sys-fs-file-max'))<br>
          + conf.set10('BUMP_PROC_SYS_FS_NR_OPEN', 
          get_option('bump-proc-sys-fs-nr-open'))<br>
          +-conf.set('HIGH_RLIMIT_NOFILE',          512*1024)<br>
          ++conf.set('HIGH_RLIMIT_NOFILE',          4*1024)<br>
          + <br>
          + # join_paths ignores the preceding arguments if an absolute
          component is<br>
          + # encountered, so this should canonicalize various paths
          when they are<br>
          +-- <br>
          +2.8.1<br>
          +<br>
          diff --git a/meta/recipes-core/systemd/<a
            href="http://systemd_242.bb" rel="noreferrer"
            target="_blank" moz-do-not-send="true">systemd_242.bb</a>
          b/meta/recipes-core/systemd/<a href="http://systemd_242.bb"
            rel="noreferrer" target="_blank" moz-do-not-send="true">systemd_242.bb</a><br>
          index 1953fef..ab15ad2 100644<br>
          --- a/meta/recipes-core/systemd/<a
            href="http://systemd_242.bb" rel="noreferrer"
            target="_blank" moz-do-not-send="true">systemd_242.bb</a><br>
          +++ b/meta/recipes-core/systemd/<a
            href="http://systemd_242.bb" rel="noreferrer"
            target="_blank" moz-do-not-send="true">systemd_242.bb</a><br>
          @@ -58,6 +58,10 @@ SRC_URI_MUSL =
          "<a class="moz-txt-link-freetext" href="file://0001-Use-getenv-when-secure-versions-are-not">file://0001-Use-getenv-when-secure-versions-are-not</a>-<a
            href="http://available.pa" target="_blank"
            moz-do-not-send="true">available.pa</a><br>
                         
          <a class="moz-txt-link-freetext" href="file://0001-do-not-disable-buffer-in-writing-files.patch">file://0001-do-not-disable-buffer-in-writing-files.patch</a> \<br>
                          "<br>
          <br>
          +SRC_URI_append_qemuall = " \<br>
          +             
           <a class="moz-txt-link-freetext" href="file://0001-decreasing-the-default-RLIMIT_NOFILE.patch">file://0001-decreasing-the-default-RLIMIT_NOFILE.patch</a> \<br>
          +"<br>
          +<br>
           PAM_PLUGINS = " \<br>
               pam-plugin-unix \<br>
               pam-plugin-loginuid \<br>
          -- <br>
          2.8.1<br>
          <br>
          -- <br>
          _______________________________________________<br>
          Openembedded-core mailing list<br>
          <a href="mailto:Openembedded-core@lists.openembedded.org"
            target="_blank" moz-do-not-send="true">Openembedded-core@lists.openembedded.org</a><br>
          <a
            href="http://lists.openembedded.org/mailman/listinfo/openembedded-core"
            rel="noreferrer" target="_blank" moz-do-not-send="true">http://lists.openembedded.org/mailman/listinfo/openembedded-core</a><br>
        </blockquote>
      </div>
    </blockquote>
    <p><br>
    </p>
  </body>
</html>