All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Anuj Mittal" <anuj.mittal@intel.com>
To: openembedded-core@lists.openembedded.org
Subject: [hardknott][PATCH 17/28] boost-build-native: workaround one rarely hang problem on fedora34
Date: Fri, 16 Jul 2021 10:42:15 +0800	[thread overview]
Message-ID: <760b7b6a031c9dcc9a44e086e1d2dbb2171b3c97.1626403078.git.anuj.mittal@intel.com> (raw)
In-Reply-To: <cover.1626403078.git.anuj.mittal@intel.com>

From: Changqing Li <changqing.li@windriver.com>

Reproduce scenes:
* On fedora34
* autofs.service is started
* test is nis user, which mounted at /nis by autofs
* under /nis/test, there are symlinks point to another nis mount point /nis/yan

Result:
task boost-build-native:do_install hang forever

NOTE: recipe ovmf-edk2-stable202102-r0: task do_package_write_rpm: Succeeded
NOTE: Running noexec task 8124 of 8152 (/layers/oe-core/meta/recipes-core/ovmf/ovmf_git.bb:do_build)
Bitbake still alive (5000s)
Bitbake still alive (10000s)
Bitbake still alive (15000s)
Bitbake still alive (20000s)
Bitbake still alive (25000s)
Bitbake still alive (30000s)
Bitbake still alive (35000s)
Bitbake still alive (40000s)
Bitbake still alive (45000s)
Bitbake still alive (50000s)

$ps aux | grep b2
test 2773444 0.0 0.0 13532 2748 ? D Jul01 0:00 ./b2 install --prefix=/build/tmp-glibc/work/x86_64-linux/boost-build-native/4.4.1-r0/recipe-sysroot-native/usr staging-prefix=/build/tmp-glibc/work/x86_64-linux/boost-build-native/4.4.1-r0/image/build/tmp-glibc/work/x86_64-linux/boost-build-native/4.4.1-r0/recipe-sysroot-native/usr

$ sudo cat /proc/2773444/stack
[<0>] autofs_wait+0x257/0x720
[<0>] autofs_mount_wait+0x49/0xf0
[<0>] autofs_d_manage+0x76/0x1a0
[<0>] __traverse_mounts+0xd9/0x220
[<0>] step_into+0x3ad/0x6d0
[<0>] walk_component+0x62/0x190
[<0>] link_path_walk.part.0.constprop.0+0x20d/0x350
[<0>] path_lookupat+0x3a/0x1b0
[<0>] filename_lookup+0x9b/0x180
[<0>] vfs_statx+0x64/0x100
[<0>] __do_sys_newfstatat+0x1e/0x40
[<0>] do_syscall_64+0x33/0x40
[<0>] entry_SYSCALL_64_after_hwframe+0x44/0xa9

$ dmesg
[1559743.424610] autofs4:pid:2773444:autofs_mount_wait: waiting for mount name=yan
[1559743.424621] autofs4:pid:2773444:autofs_wait: existing wait id = 0x00000056, name = yan, nfy=1
[1560001.400440] autofs4:pid:2774530:autofs_mount_wait: waiting for mount name=yan
[1560001.400452] autofs4:pid:2774530:autofs_wait: existing wait id = 0x00000056, name = yan, nfy=1
[1560022.493282] autofs4:pid:2774537:autofs_mount_wait: waiting for mount name=yan
[1560022.493292] autofs4:pid:2774537:autofs_wait: existing wait id = 0x00000056, name = yan, nfy=1
[1560122.076589] autofs4:pid:3979116:autofs_mount_wait: mount wait done status=-4
[1560162.222374] autofs4:pid:2774530:autofs_mount_wait: mount wait done status=-4
[1560167.116188] autofs4:pid:2774537:autofs_mount_wait: mount wait done status=-4
[1560188.140532] autofs4:pid:2774671:autofs_mount_wait: waiting for mount name=yan
[1560188.140540] autofs4:pid:2774671:autofs_wait: existing wait id = 0x00000056, name = yan, nfy=1
[1560189.651905] autofs4:pid:2774671:autofs_mount_wait: mount wait done status=-4

Analyzation:
b2 will walk the HOME dir, when access the symlink point to /nis/yan,
autofs hang at autofs_wait.  the process stay at D stat forever. This
maybe caused by abnormal status of autofs.service. The problem cannot
reproduce after restart autofs.service. There should be an autofs bug.
and there is an autofs hang problem bug on fedora34 on it's bugzilla:
https://bugzilla.redhat.com/show_bug.cgi?id=1953390

Workaround:
Since b2 don't actually write something to HOME dir, change HOME dir to
/var/run, a dir not mounted by autofs.

Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
(cherry picked from commit 7ff692d2e9787bb5b36929a208597595473db0c7)
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
---
 meta/recipes-support/boost/boost-build-native_4.3.0.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-support/boost/boost-build-native_4.3.0.bb b/meta/recipes-support/boost/boost-build-native_4.3.0.bb
index 19e991e65f..00f3a86dd6 100644
--- a/meta/recipes-support/boost/boost-build-native_4.3.0.bb
+++ b/meta/recipes-support/boost/boost-build-native_4.3.0.bb
@@ -20,7 +20,7 @@ do_compile() {
 }
 
 do_install() {
-    ./b2 install --prefix=${prefix} staging-prefix=${D}${prefix}
+    HOME=/var/run ./b2 install --prefix=${prefix} staging-prefix=${D}${prefix}
 }
 
 # The build is either release mode (pre-stripped) or debug (-O0).
-- 
2.31.1


  parent reply	other threads:[~2021-07-16  2:42 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-16  2:41 [hardknott][PATCH 00/28] review request Anuj Mittal
2021-07-16  2:41 ` [hardknott][PATCH 01/28] oeqa/selftest/runcmd: Tweal test timeouts Anuj Mittal
2021-07-16  2:42 ` [hardknott][PATCH 02/28] sstate/staging: Handle directory creation race issue Anuj Mittal
2021-07-16  2:42 ` [hardknott][PATCH 03/28] devtool: deploy-target: Fix preserving attributes when using --strip Anuj Mittal
2021-07-16  2:42 ` [hardknott][PATCH 04/28] oeqa/selftest/archiver: Allow tests to ignore empty directories Anuj Mittal
2021-07-16  2:42 ` [hardknott][PATCH 05/28] openssh: Remove temporary keys before generating new ones Anuj Mittal
2021-07-16  2:42 ` [hardknott][PATCH 06/28] linux-yocto/5.10: update to v5.10.47 Anuj Mittal
2021-07-16  2:42 ` [hardknott][PATCH 07/28] linux-yocto/5.4: update to v5.4.129 Anuj Mittal
2021-07-16  2:42 ` [hardknott][PATCH 08/28] linux-yocto/5.10: scsi-debug needs scsi-disk Anuj Mittal
2021-07-16  2:42 ` [hardknott][PATCH 09/28] linux-firmware: Package RSI 911x WiFi firmware Anuj Mittal
2021-07-16  2:42 ` [hardknott][PATCH 10/28] libconvert-asn1-perl: fix CVE-2013-7488 Anuj Mittal
2021-07-16  2:42 ` [hardknott][PATCH 11/28] busybox: upgrade 1.33.0 -> 1.33.1 Anuj Mittal
2021-07-16  2:42 ` [hardknott][PATCH 12/28] perl: correct libpth and glibpth Anuj Mittal
2021-07-16  2:42 ` [hardknott][PATCH 13/28] rxvt-unicode: fix CVE-2021-33477 Anuj Mittal
2021-07-16  2:42 ` [hardknott][PATCH 14/28] binutils: Fix CVE-2021-20197 Anuj Mittal
2021-07-16  2:42 ` [hardknott][PATCH 15/28] runqemu: Remove potential lock races around tap device handling Anuj Mittal
2021-07-16  2:42 ` [hardknott][PATCH 16/28] glibc-testsuite: Fix build failures when directly running recipe Anuj Mittal
2021-07-16  2:42 ` Anuj Mittal [this message]
2021-07-16  2:42 ` [hardknott][PATCH 18/28] linux-yocto-dev: base AUTOREV on specified version Anuj Mittal
2021-07-16  2:42 ` [hardknott][PATCH 19/28] go: upgrade 1.16.3 -> 1.16.4 Anuj Mittal
2021-07-16  2:42 ` [hardknott][PATCH 20/28] go: upgrade 1.16.4 -> 1.16.5 Anuj Mittal
2021-07-16  2:42 ` [hardknott][PATCH 21/28] curl: Fix CVE-2021-22898 Anuj Mittal
2021-07-16  2:42 ` [hardknott][PATCH 22/28] curl: Fix CVE-2021-22897 Anuj Mittal
2021-07-16  2:42 ` [hardknott][PATCH 23/28] oeqa/selftest/multiprocesslauch: Fix test race Anuj Mittal
2021-07-16  2:42 ` [hardknott][PATCH 24/28] dwarfsrcfiles: Avoid races over debug-link files Anuj Mittal
2021-07-16  2:42 ` [hardknott][PATCH 25/28] kernel-devsrc: fix scripts/prepare for ARM64 Anuj Mittal
2021-07-16  2:42 ` [hardknott][PATCH 26/28] kernel-devsrc: fix scripts prepare for powerpc Anuj Mittal
2021-07-16  2:42 ` [hardknott][PATCH 27/28] busybox: add tmpdir option into mktemp applet Anuj Mittal
2021-07-16  2:42 ` [hardknott][PATCH 28/28] xserver-xorg: Fix builds without glx Anuj Mittal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=760b7b6a031c9dcc9a44e086e1d2dbb2171b3c97.1626403078.git.anuj.mittal@intel.com \
    --to=anuj.mittal@intel.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.