Re: [OE-core] [PATCH V3] nfs-utils: decrease RLIMIT_NOFILE to 4k for systemd
On Wed, 2019-08-28 at 09:29 +0800, Kang Kai wrote: > On 2019/8/28 上午7:29, richard.pur...@linuxfoundation.org wrote: > > On Tue, 2019-08-27 at 17:43 +0800, Kang Kai wrote: > > > Hi Richard, > > > > > > This patch could fix the test_image failure with systemd. Would > > > like > > > to > > > try systemd as default init manager on yocto build again > > > to check whether any more blocking issues? > > > > There is at least one issue: > > > > https://autobuilder.yoctoproject.org/typhoon/#/builders/67/builds/967 > > > > Please monitor this build which should show up any other issues: > > Got it. Thanks. > > > > https://autobuilder.yoctoproject.org/typhoon/#/builders/85/builds/645 > > > > (master-next was looking green other than this change). > > It fails with libedit-native do fetch errors. I'll check it but it > seems not systemd related at first sight. Agreed, that is a different issue. For the systemd vs sysvinit we have: qemux86-lsb parselogs failure: https://autobuilder.yoctoproject.org/typhoon/#/builders/67/builds/967 qemuarm-lsb parselogs failure: https://autobuilder.yoctoproject.org/typhoon/#/builders/38/builds/970 qemumips runtime systemd test failure: https://autobuilder.yoctoproject.org/typhoon/#/builders/60/builds/962 qemumips64 runtime systemd test failure: https://autobuilder.yoctoproject.org/typhoon/#/builders/74/builds/967 oe-selftest failures: https://autobuilder.yoctoproject.org/typhoon/#/builders/56/builds/658 2019-08-28 00:55:15,114 - oe-selftest - INFO - RESULTS - runqemu.RunqemuTests.test_boot_machine_slirp_qcow2: ERROR (1025.19s) 2019-08-28 00:55:15,114 - oe-selftest - INFO - RESULTS - runqemu.RunqemuTests.test_boot_recipe_image_vdi: ERROR (1010.73s) 2019-08-28 00:55:15,114 - oe-selftest - INFO - RESULTS - runqemu.RunqemuTests.test_boot_recipe_image_vmdk: ERROR (1028.30s) 2019-08-28 00:55:15,114 - oe-selftest - INFO - RESULTS - wic.Wic.test_iso_image: FAILED (63.97s) and it looks like those runqemu failures happen on qemux86-64: https://autobuilder.yoctoproject.org/typhoon/#/builders/73/builds/969 qemumips: https://autobuilder.yoctoproject.org/typhoon/#/builders/60/builds/962 qemux86: https://autobuilder.yoctoproject.org/typhoon/#/builders/59/builds/961 qemuppc: https://autobuilder.yoctoproject.org/typhoon/#/builders/63/builds/961 qemumips64: https://autobuilder.yoctoproject.org/typhoon/#/builders/74/builds/967 qemuarm: https://autobuilder.yoctoproject.org/typhoon/#/builders/53/builds/969 so it looks like 3-4 different issues. Cheers, Richard -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] [PATCH V3] nfs-utils: decrease RLIMIT_NOFILE to 4k for systemd
On 2019/8/28 上午7:29, richard.pur...@linuxfoundation.org wrote: On Tue, 2019-08-27 at 17:43 +0800, Kang Kai wrote: Hi Richard, This patch could fix the test_image failure with systemd. Would like to try systemd as default init manager on yocto build again to check whether any more blocking issues? There is at least one issue: https://autobuilder.yoctoproject.org/typhoon/#/builders/67/builds/967 Please monitor this build which should show up any other issues: Got it. Thanks. https://autobuilder.yoctoproject.org/typhoon/#/builders/85/builds/645 (master-next was looking green other than this change). It fails with libedit-native do fetch errors. I'll check it but it seems not systemd related at first sight. Regards, Kai Cheers, Richard -- Kai Kang -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] [PATCH V3] nfs-utils: decrease RLIMIT_NOFILE to 4k for systemd
On Tue, 2019-08-27 at 17:43 +0800, Kang Kai wrote: > Hi Richard, > > This patch could fix the test_image failure with systemd. Would like > to > try systemd as default init manager on yocto build again > to check whether any more blocking issues? There is at least one issue: https://autobuilder.yoctoproject.org/typhoon/#/builders/67/builds/967 Please monitor this build which should show up any other issues: https://autobuilder.yoctoproject.org/typhoon/#/builders/85/builds/645 (master-next was looking green other than this change). Cheers, Richard -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] [PATCH V3] nfs-utils: decrease RLIMIT_NOFILE to 4k for systemd
On 2019/8/20 下午1:45, Hongxu Jia wrote: On systemd, it set RLIMIT_NOFILE to 512k, since do_testimage for core-image-sato-sdk has memory limitation (256Mib) which caused rpc.statd failed with out of memory. [ 531.306146] Out of memory: Kill process 193 (rpc.statd) score 200 or sacrifice child The rpc.statd and rpc.mountd allocates memory according to RLIMIT_NOFILE, so decrease it to 4k to keep sync with sysvinit Hi Richard, This patch could fix the test_image failure with systemd. Would like to try systemd as default init manager on yocto build again to check whether any more blocking issues? Thanks, Kai After applying the patch, the memory cost is the same with sysvinit: root@qemux86-64:~# systemctl status nfs-statd * nfs-statd.service - NFS status monitor for NFSv2/3 locking. Loaded: loaded (/lib/systemd/system/nfs-statd.service; enabled; vendor preset: enabled) Active: active (running) since Tue 2019-08-20 03:16:18 UTC; 3min 26s ago Main PID: 343 (rpc.statd) Tasks: 1 (limit: 271) Memory: 1.0M root@qemux86-64:~# systemctl status nfs-mountd * nfs-mountd.service - NFS Mount Daemon Loaded: loaded (/etc/systemd/system/nfs-mountd.service; enabled; vendor preset: enabled) Active: active (running) since Tue 2019-08-20 03:19:01 UTC; 1min 21s ago Main PID: 451 (rpc.mountd) Tasks: 1 (limit: 271) Memory: 736.0K Suggested-by: Chen Qi Signed-off-by: Hongxu Jia --- meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-mountd.service | 1 + meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-statd.service | 1 + meta/recipes-connectivity/nfs-utils/nfs-utils_2.3.3.bb | 4 3 files changed, 6 insertions(+) diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-mountd.service b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-mountd.service index 3c3a802..c01415d 100644 --- a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-mountd.service +++ b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-mountd.service @@ -11,6 +11,7 @@ ConditionPathExists=@SYSCONFDIR@/exports [Service] EnvironmentFile=-@SYSCONFDIR@/nfs-utils.conf ExecStart=@SBINDIR@/rpc.mountd -F $MOUNTD_OPTS +LimitNOFILE=@HIGH_RLIMIT_NOFILE@ [Install] WantedBy=multi-user.target diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-statd.service b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-statd.service index 6e196b8..4fa64e1 100644 --- a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-statd.service +++ b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-statd.service @@ -8,6 +8,7 @@ After=network.target nss-lookup.target rpcbind.service [Service] EnvironmentFile=-@SYSCONFDIR@/nfs-utils.conf ExecStart=@SBINDIR@/rpc.statd -F $STATD_OPTS +LimitNOFILE=@HIGH_RLIMIT_NOFILE@ [Install] WantedBy=multi-user.target diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils_2.3.3.bb b/meta/recipes-connectivity/nfs-utils/nfs-utils_2.3.3.bb index ac4437b..28f9898 100644 --- a/meta/recipes-connectivity/nfs-utils/nfs-utils_2.3.3.bb +++ b/meta/recipes-connectivity/nfs-utils/nfs-utils_2.3.3.bb @@ -119,6 +119,9 @@ do_compile_prepend() { make clean } +# Works on systemd only +HIGH_RLIMIT_NOFILE ??= "4096" + do_install_append () { install -d ${D}${sysconfdir}/init.d install -m 0755 ${WORKDIR}/nfsserver ${D}${sysconfdir}/init.d/nfsserver @@ -133,6 +136,7 @@ do_install_append () { install -m 0644 ${WORKDIR}/nfs-statd.service ${D}${systemd_unitdir}/system/ sed -i -e 's,@SBINDIR@,${sbindir},g' \ -e 's,@SYSCONFDIR@,${sysconfdir},g' \ + -e 's,@HIGH_RLIMIT_NOFILE@,${HIGH_RLIMIT_NOFILE},g' \ ${D}${systemd_unitdir}/system/*.service if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then install -m 0644 ${WORKDIR}/proc-fs-nfsd.mount ${D}${systemd_unitdir}/system/ -- Kai Kang -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH V3] nfs-utils: decrease RLIMIT_NOFILE to 4k for systemd
On systemd, it set RLIMIT_NOFILE to 512k, since do_testimage for core-image-sato-sdk has memory limitation (256Mib) which caused rpc.statd failed with out of memory. [ 531.306146] Out of memory: Kill process 193 (rpc.statd) score 200 or sacrifice child The rpc.statd and rpc.mountd allocates memory according to RLIMIT_NOFILE, so decrease it to 4k to keep sync with sysvinit After applying the patch, the memory cost is the same with sysvinit: root@qemux86-64:~# systemctl status nfs-statd * nfs-statd.service - NFS status monitor for NFSv2/3 locking. Loaded: loaded (/lib/systemd/system/nfs-statd.service; enabled; vendor preset: enabled) Active: active (running) since Tue 2019-08-20 03:16:18 UTC; 3min 26s ago Main PID: 343 (rpc.statd) Tasks: 1 (limit: 271) Memory: 1.0M root@qemux86-64:~# systemctl status nfs-mountd * nfs-mountd.service - NFS Mount Daemon Loaded: loaded (/etc/systemd/system/nfs-mountd.service; enabled; vendor preset: enabled) Active: active (running) since Tue 2019-08-20 03:19:01 UTC; 1min 21s ago Main PID: 451 (rpc.mountd) Tasks: 1 (limit: 271) Memory: 736.0K Suggested-by: Chen Qi Signed-off-by: Hongxu Jia --- meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-mountd.service | 1 + meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-statd.service | 1 + meta/recipes-connectivity/nfs-utils/nfs-utils_2.3.3.bb | 4 3 files changed, 6 insertions(+) diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-mountd.service b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-mountd.service index 3c3a802..c01415d 100644 --- a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-mountd.service +++ b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-mountd.service @@ -11,6 +11,7 @@ ConditionPathExists=@SYSCONFDIR@/exports [Service] EnvironmentFile=-@SYSCONFDIR@/nfs-utils.conf ExecStart=@SBINDIR@/rpc.mountd -F $MOUNTD_OPTS +LimitNOFILE=@HIGH_RLIMIT_NOFILE@ [Install] WantedBy=multi-user.target diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-statd.service b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-statd.service index 6e196b8..4fa64e1 100644 --- a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-statd.service +++ b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-statd.service @@ -8,6 +8,7 @@ After=network.target nss-lookup.target rpcbind.service [Service] EnvironmentFile=-@SYSCONFDIR@/nfs-utils.conf ExecStart=@SBINDIR@/rpc.statd -F $STATD_OPTS +LimitNOFILE=@HIGH_RLIMIT_NOFILE@ [Install] WantedBy=multi-user.target diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils_2.3.3.bb b/meta/recipes-connectivity/nfs-utils/nfs-utils_2.3.3.bb index ac4437b..28f9898 100644 --- a/meta/recipes-connectivity/nfs-utils/nfs-utils_2.3.3.bb +++ b/meta/recipes-connectivity/nfs-utils/nfs-utils_2.3.3.bb @@ -119,6 +119,9 @@ do_compile_prepend() { make clean } +# Works on systemd only +HIGH_RLIMIT_NOFILE ??= "4096" + do_install_append () { install -d ${D}${sysconfdir}/init.d install -m 0755 ${WORKDIR}/nfsserver ${D}${sysconfdir}/init.d/nfsserver @@ -133,6 +136,7 @@ do_install_append () { install -m 0644 ${WORKDIR}/nfs-statd.service ${D}${systemd_unitdir}/system/ sed -i -e 's,@SBINDIR@,${sbindir},g' \ -e 's,@SYSCONFDIR@,${sysconfdir},g' \ + -e 's,@HIGH_RLIMIT_NOFILE@,${HIGH_RLIMIT_NOFILE},g' \ ${D}${systemd_unitdir}/system/*.service if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then install -m 0644 ${WORKDIR}/proc-fs-nfsd.mount ${D}${systemd_unitdir}/system/ -- 2.8.1 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core