From 9a5273f8f882dada1f7edeb5e2606fd3960980b6a73581de2f4d1eea356f07df Mon Sep 17 00:00:00 2001 From: Nicolas Morey-Chaisemartin Date: Thu, 18 Feb 2021 06:01:29 +0000 Subject: [PATCH] Accepting request 873251 from home:NMoreyChaisemartin:branches:science:HPC - Re-add mvapich2-fix-double-free.patch as the bug was somehow be reintroduced (bsc#1144000) - Add mvapich2-remove-deprecated-sys_siglist.patch to fix compilation errors with newer glibc OBS-URL: https://build.opensuse.org/request/show/873251 OBS-URL: https://build.opensuse.org/package/show/science:HPC/mvapich2?expand=0&rev=78 --- mvapich2-fix-double-free.patch | 26 ++++++++++++++ mvapich2-remove-deprecated-sys_siglist.patch | 37 ++++++++++++++++++++ mvapich2.changes | 8 +++++ mvapich2.spec | 15 +++++--- 4 files changed, 81 insertions(+), 5 deletions(-) create mode 100644 mvapich2-fix-double-free.patch create mode 100644 mvapich2-remove-deprecated-sys_siglist.patch diff --git a/mvapich2-fix-double-free.patch b/mvapich2-fix-double-free.patch new file mode 100644 index 0000000..934b888 --- /dev/null +++ b/mvapich2-fix-double-free.patch @@ -0,0 +1,26 @@ +commit 29cf7e8f54363de3ad614b3480517f02b84ade5e +Author: Nicolas Morey-Chaisemartin +Date: Thu May 2 09:56:40 2019 +0200 + + mvapich2 fix double free + + Fix double free that causes a SEGV when mvapich2 fails to open + a rdma device + + Signed-off-by: Nicolas Morey-Chaisemartin + +diff --git src/mpid/ch3/channels/mrail/src/gen2/rdma_iba_priv.c src/mpid/ch3/channels/mrail/src/gen2/rdma_iba_priv.c +index 89f666c8988b..48454297223c 100644 +--- src/mpid/ch3/channels/mrail/src/gen2/rdma_iba_priv.c ++++ src/mpid/ch3/channels/mrail/src/gen2/rdma_iba_priv.c +@@ -790,10 +790,6 @@ int rdma_open_hca(struct mv2_MPIDI_CH3I_RDMA_Process_t *proc) + } + + if (!ib_dev) { +- /* Clean up before exit */ +- if (dev_list) { +- ibv_free_device_list(dev_list); +- } + MPIR_ERR_SETFATALANDJUMP1(mpi_errno, MPI_ERR_OTHER, "**fail", + "**fail %s", "No IB device found"); + } diff --git a/mvapich2-remove-deprecated-sys_siglist.patch b/mvapich2-remove-deprecated-sys_siglist.patch new file mode 100644 index 0000000..c17cef1 --- /dev/null +++ b/mvapich2-remove-deprecated-sys_siglist.patch @@ -0,0 +1,37 @@ +commit d8dc7133c2c8255f194e1fa5e550ef1bd4796bf6 +Author: Nicolas Morey-Chaisemartin +Date: Thu Oct 15 10:12:24 2020 +0200 + + mvapich2 remove deprecated sys_siglist + + sys_siglist has been deprecated and even removed from newer glibc version. + Use strsignal as a replacement + + Signed-off-by: Nicolas Morey-Chaisemartin + +diff --git src/mpid/ch3/channels/common/src/util/error_handling.c src/mpid/ch3/channels/common/src/util/error_handling.c +index b6c67c41c056..27f7e63a64ac 100644 +--- src/mpid/ch3/channels/common/src/util/error_handling.c ++++ src/mpid/ch3/channels/common/src/util/error_handling.c +@@ -69,7 +69,7 @@ int show_backtrace = 0; + // Signal handler for errors + void error_sighandler(int sig, siginfo_t *info, void *secret) { + // Always print error +- PRINT_ERROR( "Caught error: %s (signal %d)\n", sys_siglist[sig], sig ); ++ PRINT_ERROR( "Caught error: %s (signal %d)\n", strsignal(sig), sig ); + // Show backtrace if required + if (show_backtrace) print_backtrace(); + // Raise the signal again with default handler +diff --git src/pm/mpirun/mpispawn.c src/pm/mpirun/mpispawn.c +index dd0c6f06f1c5..bcb562ea7552 100644 +--- src/pm/mpirun/mpispawn.c ++++ src/pm/mpirun/mpispawn.c +@@ -800,7 +800,7 @@ void child_handler(int signal) + gethostname(my_host_name, MAX_HOST_LEN); + + rank = mt_id; +- PRINT_DEBUG(DEBUG_Fork_verbose, "mpispawn child_handler: got signal %d: %s\n", signal, sys_siglist[signal]); ++ PRINT_DEBUG(DEBUG_Fork_verbose, "mpispawn child_handler: got signal %d: %s\n", signal, strsignal(signal)); + while (1) { + do { + pid = waitpid(-1, &status, WNOHANG); diff --git a/mvapich2.changes b/mvapich2.changes index bd3c652..bdffd39 100644 --- a/mvapich2.changes +++ b/mvapich2.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Thu Feb 18 04:46:04 UTC 2021 - Nicolas Morey-Chaisemartin + +- Re-add mvapich2-fix-double-free.patch as the bug was + somehow be reintroduced (bsc#1144000) +- Add mvapich2-remove-deprecated-sys_siglist.patch to + fix compilation errors with newer glibc + ------------------------------------------------------------------- Sun Nov 29 13:44:44 UTC 2020 - Egbert Eich diff --git a/mvapich2.spec b/mvapich2.spec index de7ee32..47ba13e 100644 --- a/mvapich2.spec +++ b/mvapich2.spec @@ -1,7 +1,7 @@ # -# spec file for package mvapich2 +# spec file for package %{package_name} # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -254,6 +254,9 @@ Patch3: 0001-Drop-GCC-check.patch Patch4: reproducible.patch Patch5: fix-missing-return-code.patch Patch6: wrapper-revert-ldflag-order-change.patch +Patch7: mvapich2-fix-double-free.patch +Patch8: mvapich2-remove-deprecated-sys_siglist.patch + ## Armv7 specific patches # PATCH-FIX-UPSTREAM 0001-Drop-real128.patch (https://github.com/pmodels/mpich/issues/4005) Patch50: 0001-Drop-real128.patch @@ -393,6 +396,8 @@ is based on MPICH2 and MVICH. This package contains the static libraries %patch4 -p1 %patch5 %patch6 +%patch7 +%patch8 # Only apply these patches on Armv7 %ifarch armv7hl @@ -461,7 +466,7 @@ rm -f %{buildroot}%{p_libdir}/libfmpich.la \ %{buildroot}%{p_libdir}/libopa.la \ %{buildroot}%{p_libdir}/libmpi.la \ %{buildroot}%{p_libdir}/libmpicxx.la \ - %{buildroot}%{p_libdir}/libmpifort.la + %{buildroot}%{p_libdir}/libmpifort.la install -m 0755 -d %{buildroot}%{_datadir}/doc/%{name} install -m 0644 COPYRIGHT* %{buildroot}%{_datadir}/doc/%{name} install -m 0644 CHANGE* %{buildroot}%{_datadir}/doc/%{name} @@ -577,7 +582,7 @@ fi %hpc_mpi_dirs %hpc_modules_files %endif -%doc %{_datadir}/doc/%{name}/COPYRIGHT* +%doc %{_datadir}/doc/%{name}/COPYRIGHT* %doc %{_datadir}/doc/%{name}/CHANGE* %dir %{p_prefix} %dir %{p_bindir} @@ -596,7 +601,7 @@ fi %files doc %defattr(-, root, root) %doc %{_datadir}/doc/%{name} -%exclude /%{_datadir}/doc/%{name}/COPYRIGHT* +%exclude /%{_datadir}/doc/%{name}/COPYRIGHT* %exclude /%{_datadir}/doc/%{name}/CHANGE* %files devel