From 6d77529d62248d77aff8e293905d9a156997a12c Mon Sep 17 00:00:00 2001 From: Haiqing Bai Date: Thu, 24 Oct 2019 10:33:04 +0800 Subject: unfs3: fixed the issue that unfsd consumes 100% CPU The 'accept' function on the socket of unfsd daemon is always in below error state: accept(4, 0x7ffd5e6dddc0, [128]) = -1 EINVAL (Invalid argument) accept(6, 0x7ffd5e6dddc0, [128]) = -1 EINVAL (Invalid argument) And 'strace -c -p ' shows: % time seconds usecs/call calls errors syscall ------ ----------- ----------- --------- --------- ---------------- 70.87 0.005392 0 513886 513886 accept 29.13 0.002216 0 256943 poll This error state is in the 'for' loop of the daemon, so it consumes 100% CPU. The reason is that 'listen' is not called for the TCP socket before 'accept'. Actually the called 'svc_tli_create' from libtirpc will not call 'listen' on a bound socket. (From OE-Core rev: 1f6784d2e839f81749d21ad1b615a9f7bb0e64d6) Signed-off-by: Haiqing Bai Signed-off-by: Richard Purdie --- meta/recipes-devtools/unfs3/unfs3_git.bb | 1 + 1 file changed, 1 insertion(+) (limited to 'meta/recipes-devtools/unfs3/unfs3_git.bb') diff --git a/meta/recipes-devtools/unfs3/unfs3_git.bb b/meta/recipes-devtools/unfs3/unfs3_git.bb index 79d09788d3..d60cee87c9 100644 --- a/meta/recipes-devtools/unfs3/unfs3_git.bb +++ b/meta/recipes-devtools/unfs3/unfs3_git.bb @@ -23,6 +23,7 @@ SRC_URI = "git://github.com/unfs3/unfs3.git;protocol=https \ file://tcp_no_delay.patch \ file://0001-daemon.c-Libtirpc-porting-fixes.patch \ file://0001-attr-fix-utime-for-symlink.patch \ + file://0001-Add-listen-action-for-a-tcp-socket.patch \ " SRCREV = "c12a5c69a8d59be6916cbd0e0f41c159f1962425" UPSTREAM_CHECK_GITTAGREGEX = "unfs3\-(?P.+)" -- cgit v1.2.3-54-g00ecf