diff options
author | takeshi_hoshina <takeshi_hoshina@mail.toyota.co.jp> | 2020-11-02 11:07:33 +0900 |
---|---|---|
committer | takeshi_hoshina <takeshi_hoshina@mail.toyota.co.jp> | 2020-11-02 11:07:33 +0900 |
commit | 1c7d6584a7811b7785ae5c1e378f14b5ba0971cf (patch) | |
tree | cd70a267a5ef105ba32f200aa088e281fbd85747 /external/poky/meta/recipes-devtools/unfs3 | |
parent | 4204309872da5cb401cbb2729d9e2d4869a87f42 (diff) |
basesystem-jjsandbox/ToshikazuOhiwa/master-jj
recipes
Diffstat (limited to 'external/poky/meta/recipes-devtools/unfs3')
-rw-r--r-- | external/poky/meta/recipes-devtools/unfs3/unfs3/0001-Add-listen-action-for-a-tcp-socket.patch | 54 | ||||
-rw-r--r-- | external/poky/meta/recipes-devtools/unfs3/unfs3_git.bb (renamed from external/poky/meta/recipes-devtools/unfs3/unfs3_0.9.22.r497.bb) | 24 |
2 files changed, 64 insertions, 14 deletions
diff --git a/external/poky/meta/recipes-devtools/unfs3/unfs3/0001-Add-listen-action-for-a-tcp-socket.patch b/external/poky/meta/recipes-devtools/unfs3/unfs3/0001-Add-listen-action-for-a-tcp-socket.patch new file mode 100644 index 00000000..e9b9d3df --- /dev/null +++ b/external/poky/meta/recipes-devtools/unfs3/unfs3/0001-Add-listen-action-for-a-tcp-socket.patch @@ -0,0 +1,54 @@ +From b42ab8e1aca951dd06c113159491b3fd5cf06f2e Mon Sep 17 00:00:00 2001 +From: Haiqing Bai <Haiqing.Bai@windriver.com> +Date: Thu, 24 Oct 2019 09:39:04 +0800 +Subject: [PATCH] Add "listen" action for a tcp socket which does not call + 'listen' after 'bind' + +It is found that /usr/bin/unfsd customus 100% cpu after starting qemu with 'nfs' +option, and below lots of error messages shows when strace the process: + +poll([{fd=3, events=POLLIN|POLLPRI|POLLRDNORM|POLLRDBAND},{fd=4, events=POLLIN|POLLPRI|POLLRDNORM|POLLRDBAND}, +{fd=5, events=POLLIN|POLLPRI|POLLRDNORM|POLLRDBAND},{fd=6, events =POLLIN|POLLPRI|POLLRDNORM|POLLRDBAND}], +4, 2000) = 2 ([{fd=4, revents=POLLHUP},{fd=6, revents=POLLHUP}]) +accept(4, 0x7ffd5e6dddc0, [128]) = -1 EINVAL (Invalid argument) +accept(6, 0x7ffd5e6dddc0, [128]) = -1 EINVAL (Invalid argument) + +% time seconds usecs/call calls errors syscall +------ ----------- ----------- --------- --------- ---------------- + 70.87 0.005392 0 513886 513886 accept + 29.13 0.002216 0 256943 poll + 0.00 0.000000 0 4 read + +The root cause is that 'listen' is not called for the binded +socket. The depended libtipc does not call 'listen' if found +the incomming socket is binded, so 'accept' reports the error +in the 'for' loop and cpu consumed. + +Upstream-Status: Pending + +Signed-off-by: Haiqing Bai <Haiqing.Bai@windriver.com> +--- + daemon.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/daemon.c b/daemon.c +index 028a181..4c85903 100644 +--- a/daemon.c ++++ b/daemon.c +@@ -814,6 +814,13 @@ static SVCXPRT *create_tcp_transport(unsigned int port) + fprintf(stderr, "Couldn't bind to tcp port %d\n", port); + exit(1); + } ++ ++ if (listen(sock, SOMAXCONN) < 0) { ++ perror("listen"); ++ fprintf(stderr, "Couldn't listen on the address \n"); ++ close(sock); ++ exit(1); ++ } + } + + transp = svctcp_create(sock, 0, 0); +-- +1.9.1 + diff --git a/external/poky/meta/recipes-devtools/unfs3/unfs3_0.9.22.r497.bb b/external/poky/meta/recipes-devtools/unfs3/unfs3_git.bb index 5a81a8fd..d60cee87 100644 --- a/external/poky/meta/recipes-devtools/unfs3/unfs3_0.9.22.r497.bb +++ b/external/poky/meta/recipes-devtools/unfs3/unfs3_git.bb @@ -1,26 +1,19 @@ SUMMARY = "Userspace NFS server v3 protocol" +DESCRIPTION = "UNFS3 is a user-space implementation of the NFSv3 server \ +specification. It provides a daemon for the MOUNT and NFS protocols, which \ +are used by NFS clients for accessing files on the server." SECTION = "console/network" LICENSE = "unfs3" LIC_FILES_CHKSUM = "file://LICENSE;md5=9475885294e17c0cc0067820d042792e" -# SVN support for upstream version check isn't implemented yet -RECIPE_UPSTREAM_VERSION = "0.9.22.r497" -RECIPE_UPSTREAM_DATE = "Oct 08, 2015" -CHECK_DATE = "Dec 10, 2015" - DEPENDS = "flex-native bison-native flex" DEPENDS += "libtirpc" DEPENDS_append_class-nativesdk = " flex-nativesdk" ASNEEDED = "" -MOD_PV = "497" -S = "${WORKDIR}/trunk" -# Only subversion url left in OE-Core, use a mirror tarball instead since -# this rarely changes. -# svn://svn.code.sf.net/p/unfs3/code;module=trunk;rev=${MOD_PV};protocol=http -# rename the tarball in mirror to avoid clash with user local svn tarball -SRC_URI = "http://downloads.yoctoproject.org/mirror/sources/unfs3-0.9.22.r497.tar.gz \ +S = "${WORKDIR}/git" +SRC_URI = "git://github.com/unfs3/unfs3.git;protocol=https \ file://unfs3_parallel_build.patch \ file://alternate_rpc_ports.patch \ file://fix_pid_race_parent_writes_child_pid.patch \ @@ -30,9 +23,12 @@ SRC_URI = "http://downloads.yoctoproject.org/mirror/sources/unfs3-0.9.22.r497.ta 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 \ " -SRC_URI[md5sum] = "2e43e471c77ade0331901c40b8f8e9a3" -SRC_URI[sha256sum] = "21009468a9ba07b72ea93780d025a63ab4e55bf8fc3127803c296f0900fe1bac" +SRCREV = "c12a5c69a8d59be6916cbd0e0f41c159f1962425" +UPSTREAM_CHECK_GITTAGREGEX = "unfs3\-(?P<pver>.+)" + +PV = "0.9.22+${SRCPV}" BBCLASSEXTEND = "native nativesdk" |