From 0ca55a7833b1d209ba5966c0171a5ed1b5d47073 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: May 20 2020 15:07:38 +0000 Subject: import dapl-2.1.5-3.el7 --- diff --git a/SOURCES/0001-workaround-for-librdmacm-resource-leak.patch b/SOURCES/0001-workaround-for-librdmacm-resource-leak.patch new file mode 100644 index 0000000..1feb091 --- /dev/null +++ b/SOURCES/0001-workaround-for-librdmacm-resource-leak.patch @@ -0,0 +1,39 @@ +From 31b463b833d0c70eca1f727bd6dfe269e2348e69 Mon Sep 17 00:00:00 2001 +From: Honggang Li +Date: Fri, 31 Jan 2020 15:09:10 +0800 +Subject: [PATCH] workaround for librdmacm resource leak + +librdmacm was designed to open all verbs devices and keeps them open +until the library unloads. In case librdmacm only unload when process +exit, the resource allocated for opened verbs devices will free by OS. +If dlclose called to unload librdmacm, those resource will be leak. + +Repeatedly load and unload librdmacm with dlopen and dlclose, will +significantly magnify the resource leak issue. + +Signed-off-by: Honggang Li +--- + dat/udat/linux/dat_osd.c | 9 +-------- + 1 file changed, 1 insertion(+), 8 deletions(-) + +diff --git a/dat/udat/linux/dat_osd.c b/dat/udat/linux/dat_osd.c +index cbb95ba..f93726f 100644 +--- a/dat/udat/linux/dat_osd.c ++++ b/dat/udat/linux/dat_osd.c +@@ -172,12 +172,5 @@ DAT_RETURN + dat_os_library_unload ( + const DAT_OS_LIBRARY_HANDLE library_handle) + { +- if ( 0 != dlclose (library_handle) ) +- { +- return DAT_INTERNAL_ERROR; +- } +- else +- { +- return DAT_SUCCESS; +- } ++ return DAT_SUCCESS; + } +-- +2.24.1 + diff --git a/SPECS/dapl.spec b/SPECS/dapl.spec index 118410b..aa20d16 100644 --- a/SPECS/dapl.spec +++ b/SPECS/dapl.spec @@ -1,12 +1,14 @@ Name: dapl Version: 2.1.5 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Library providing access to the DAT 2.0 API Group: System Environment/Libraries License: GPLv2 or BSD or CPL Url: https://www.openfabrics.org/ Source0: https://www.openfabrics.org/downloads/dapl/dapl-%{version}.tar.gz Patch1: 0001-dapltest-dapltest-with-no-argument-not-working-in-pp.patch +Patch2: 0001-workaround-for-librdmacm-resource-leak.patch + BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Requires(post): /sbin/ldconfig Requires(postun): /sbin/ldconfig @@ -47,6 +49,7 @@ Useful test suites to validate the dapl library API's and operation. #aclocal -I config && libtoolize --force --copy && autoheader && \ # automake --foreign --add-missing --copy && autoconf %patch1 -p1 +%patch2 -p1 %build %configure CFLAGS="$CFLAGS -fno-strict-aliasing" --enable-ext-type=ib --sysconfdir=/etc/rdma @@ -88,6 +91,10 @@ rm -rf %{buildroot} %{_mandir}/man1/* %changelog +* Fri Jan 31 2020 Honggang Li - 2.1.5-3 +- Fix file descriptor leak issue for cma provider +- Resolves: bz1784193 + * Thu Apr 21 2016 Honggang Li - 2.1.5-2 - Ensure dapltest with no argument working in ppc64 arch. - Resolves: bz1056487