Hello community, here is the log from the commit of package mpich for openSUSE:Factory checked in at 2020-04-15 19:57:28 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/mpich (Old) and /work/SRC/openSUSE:Factory/.mpich.new.2738 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "mpich" Wed Apr 15 19:57:28 2020 rev:17 rq:794232 version:3.3.2 Changes: -------- --- /work/SRC/openSUSE:Factory/mpich/mpich.changes 2019-11-30 10:39:55.712153832 +0100 +++ /work/SRC/openSUSE:Factory/.mpich.new.2738/mpich.changes 2020-04-15 19:57:35.989713055 +0200 @@ -1,0 +2,7 @@ +Tue Apr 14 07:22:58 UTC 2020 - Nicolas Morey-Chaisemartin <[email protected]> + +- Add ch3-fix-improper-error-handling-from-MPL_get_sockaddr.patch and + pmi-fix-a-wrong-condition-checking-return-of-MPL_get_sockaddr.patch to fix crash when + using getsockaddr (bsc#1168092) + +------------------------------------------------------------------- New: ---- ch3-fix-improper-error-handling-from-MPL_get_sockaddr.patch pmi-fix-a-wrong-condition-checking-return-of-MPL_get_sockaddr.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ mpich.spec ++++++ --- /var/tmp/diff_new_pack.6UtApD/_old 2020-04-15 19:57:37.481714175 +0200 +++ /var/tmp/diff_new_pack.6UtApD/_new 2020-04-15 19:57:37.481714175 +0200 @@ -1,7 +1,7 @@ # # spec file for package mpich # -# Copyright (c) 2019 SUSE LLC +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -157,6 +157,8 @@ Source100: _multibuild # PATCH-FIX-UPSTREAM 0001-Drop-real128.patch (https://github.com/pmodels/mpich/issues/4005) Patch0: 0001-Drop-real128.patch +Patch1: ch3-fix-improper-error-handling-from-MPL_get_sockaddr.patch +Patch2: pmi-fix-a-wrong-condition-checking-return-of-MPL_get_sockaddr.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: fdupes @@ -285,6 +287,8 @@ # Only apply this patch on Armv7 %ifarch armv7hl %patch0 -p1 +%patch1 +%patch2 %endif %build ++++++ ch3-fix-improper-error-handling-from-MPL_get_sockaddr.patch ++++++ commit c84f36fc972269c16c8ba79956f621a28c416381 Author: Hui Zhou <[email protected]> Date: Mon Nov 18 14:52:55 2019 -0600 ch3: fix improper error handling from MPL_get_sockaddr MPL layer does not directly return mpi_errno. Use MPIR_ERR_CHKANDJUMP macro to create the appropriate return code. See pmodels/mpich#4318. Cherry-picked from [8d923937ec5d]. diff --git src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_init.c src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_init.c index 4c2383ed8f02..bc58211eb6cc 100644 --- src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_init.c +++ src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_init.c @@ -307,8 +307,9 @@ static int GetSockInterfaceAddr(int myRank, char *ifname, int maxIfname, if (MPIR_CVAR_NEMESIS_TCP_NETWORK_IFACE) { char s[100]; int len; - mpi_errno = MPL_get_sockaddr_iface(MPIR_CVAR_NEMESIS_TCP_NETWORK_IFACE, p_addr); - MPIR_ERR_CHKANDJUMP1(mpi_errno, mpi_errno, MPI_ERR_OTHER, "**iface_notfound", "**iface_notfound %s", MPIR_CVAR_NEMESIS_TCP_NETWORK_IFACE); + int ret = MPL_get_sockaddr_iface(MPIR_CVAR_NEMESIS_TCP_NETWORK_IFACE, p_addr); + MPIR_ERR_CHKANDJUMP1(ret != 0, mpi_errno, MPI_ERR_OTHER, "**iface_notfound", + "**iface_notfound %s", MPIR_CVAR_NEMESIS_TCP_NETWORK_IFACE); MPL_sockaddr_to_str(p_addr, s, 100); MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CONNECT, VERBOSE, (MPL_DBG_FDEST, @@ -354,12 +355,13 @@ static int GetSockInterfaceAddr(int myRank, char *ifname, int maxIfname, ifname_string = ifname; - /* If we didn't find a specific name, then try to get an IP address - directly from the available interfaces, if that is supported on - this platform. Otherwise, we'll drop into the next step that uses - the ifname */ - mpi_errno = MPL_get_sockaddr_iface( NULL, p_addr); - if (mpi_errno) MPIR_ERR_POP(mpi_errno); + /* If we didn't find a specific name, then try to get an IP address + * directly from the available interfaces, if that is supported on + * this platform. Otherwise, we'll drop into the next step that uses + * the ifname */ + int ret = MPL_get_sockaddr_iface(NULL, p_addr); + MPIR_ERR_CHKANDJUMP1(ret != 0, mpi_errno, MPI_ERR_OTHER, "**iface_notfound", + "**iface_notfound %s", NULL); ifaddrFound = 1; } else { @@ -369,8 +371,9 @@ static int GetSockInterfaceAddr(int myRank, char *ifname, int maxIfname, /* If we don't have an IP address, try to get it from the name */ if (!ifaddrFound) { - mpi_errno = MPL_get_sockaddr(ifname_string, p_addr); - MPIR_ERR_CHKANDJUMP2(mpi_errno, mpi_errno, MPI_ERR_OTHER, "**gethostbyname", "**gethostbyname %s %d", ifname_string, h_errno); + int ret = MPL_get_sockaddr(ifname_string, p_addr); + MPIR_ERR_CHKANDJUMP2(ret != 0, mpi_errno, MPI_ERR_OTHER, "**gethostbyname", + "**gethostbyname %s %d", ifname_string, h_errno); } fn_exit: ++++++ pmi-fix-a-wrong-condition-checking-return-of-MPL_get_sockaddr.patch ++++++ commit 5024f130a96c5fb666158fb9f20d1260d0243d5c Author: Hui Zhou <[email protected]> Date: Wed Jan 15 13:29:56 2020 -0600 pmi: fix a wrong condition checking return of MPL_get_sockaddr Cherry-picked from [3e6af3c2fbaf]. See pmodels/mpich#4318. diff --git src/mpl/include/mpl_sockaddr.h src/mpl/include/mpl_sockaddr.h index c0eb7494193c..a9860c135337 100644 --- src/mpl/include/mpl_sockaddr.h +++ src/mpl/include/mpl_sockaddr.h @@ -21,6 +21,9 @@ typedef struct sockaddr_storage MPL_sockaddr_t; +/* The following functions when return an int, it returns 0 on success, + * non-zero indicates error. It is consistent with posix socket functions. + */ void MPL_sockaddr_set_aftype(int type); int MPL_get_sockaddr(const char *s_hostname, MPL_sockaddr_t * p_addr); int MPL_get_sockaddr_direct(int type, MPL_sockaddr_t * p_addr); diff --git src/pmi/simple/simple_pmi.c src/pmi/simple/simple_pmi.c index df37a8689ffb..7f660bdac9cb 100644 --- src/pmi/simple/simple_pmi.c +++ src/pmi/simple/simple_pmi.c @@ -881,7 +881,7 @@ static int PMII_Connect_to_pm(char *hostname, int portnum) int q_wait = 1; ret = MPL_get_sockaddr(hostname, &addr); - if (!ret) { + if (ret) { PMIU_printf(1, "Unable to get host entry for %s\n", hostname); return PMI_FAIL; }
