diff --git a/0018-fix-deadlock-problem-when-subprocess-exit.patch b/0018-fix-deadlock-problem-when-subprocess-exit.patch new file mode 100644 index 0000000000000000000000000000000000000000..c52b6336b694ffb4a41f2406a9a3c4e790a70e8d --- /dev/null +++ b/0018-fix-deadlock-problem-when-subprocess-exit.patch @@ -0,0 +1,25 @@ +From 4ad5ee6eafcdef8178adf1cea53ab8a617d3fd78 Mon Sep 17 00:00:00 2001 +From: yangjiaqi +Date: Wed, 15 Dec 2021 17:19:01 +0800 +Subject: [PATCH] fix deadlock problem when subprocess exit + +--- + src/proc_fuse.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/proc_fuse.c b/src/proc_fuse.c +index d02f841..0f66c40 100644 +--- a/src/proc_fuse.c ++++ b/src/proc_fuse.c +@@ -563,7 +563,7 @@ struct devinfo* container_dev_read(pid_t pid) { + fflush(stream); + child_out: + fclose(stream); +- exit(0); ++ _exit(EXIT_SUCCESS); + } + + close(mypipe[1]); +-- +2.32.0 (Apple Git-132) + diff --git a/lxcfs.spec b/lxcfs.spec index 4580571a0021fb638dc9c92bdf3297295cfa2d50..44698d47016a8e6e66b29d028ec8a48c6308c057 100644 --- a/lxcfs.spec +++ b/lxcfs.spec @@ -4,7 +4,7 @@ #Basic Information Name: lxcfs Version: 4.0.11 -Release: 1 +Release: 2 Summary: FUSE filesystem for LXC License: LGPL 2.1+ URL: http://linuxcontainers.org @@ -27,6 +27,7 @@ Patch9014: 0014-fix-proc-diskstats-show-in-container.patch Patch9015: 0015-lxcfs-adapt-4.18-kernel.patch Patch9016: 0016-remove-lxcfs-tools-dependency-for-common-use.patch Patch9017: 0017-proc_fuse-fix-wait-child-process-hang.patch +Patch9018: 0018-fix-deadlock-problem-when-subprocess-exit.patch #Dependency BuildRequires: autoconf automake libtool help2man @@ -88,6 +89,9 @@ fi %{_unitdir}/* %changelog +* Fri Dec 17 2021 yangjiaqi - 4.0.11-2 +- fix deadlock caused by subprocess calling lxcfs_exit + * Sat Nov 27 2021 yangjiaqi - 4.0.11-1 - update to 4.0.11