Successfully identified regression in *glibc* in CI configuration tcwg_cross/gnu-master-aarch64-build_cross. So far, this commit has regressed CI configurations: - tcwg_cross/gnu-master-aarch64-build_cross
Culprit: <cut> commit 1f9c804fbd699104adefbce9e56d2c8aa711b6b9 Author: Florian Weimer fweimer@redhat.com Date: Wed Jul 7 08:40:41 2021 +0200
nptl: Use internal low-level lock type for !IS_IN (libc)
This avoids an ABI hazard (types changing between different modules of glibc) without introducing linknamespace issues. In particular, NSS modules now call __lll_lock_wait_private@@GLIBC_PRIVATE to wait on internal locks (the unlock path is inlined and performs a direct system call).
Reviewed-by: Adhemerval Zanella adhemerval.zanella@linaro.org </cut>
Results regressed to (for first_bad == 1f9c804fbd699104adefbce9e56d2c8aa711b6b9) # reset_artifacts: -10 # true: 0 # build_abe binutils: 1 # build_abe stage1: 2 # build_abe linux: 3 # First few build errors in logs: # 00:00:17 make[2]: *** [/home/tcwg-buildslave/workspace/tcwg_gnu_1/abe/builds/x86_64-pc-linux-gnu/aarch64-linux-gnu/glibc-glibc.git~master/sysd-rules:499: /home/tcwg-buildslave/workspace/tcwg_gnu_1/abe/builds/x86_64-pc-linux-gnu/aarch64-linux-gnu/glibc-glibc.git~master/csu/start.os] Error 1 # 00:00:17 make[2]: *** [/home/tcwg-buildslave/workspace/tcwg_gnu_1/abe/builds/x86_64-pc-linux-gnu/aarch64-linux-gnu/glibc-glibc.git~master/sysd-rules:483: /home/tcwg-buildslave/workspace/tcwg_gnu_1/abe/builds/x86_64-pc-linux-gnu/aarch64-linux-gnu/glibc-glibc.git~master/csu/crtn.o] Error 1 # 00:00:17 make[2]: *** [/home/tcwg-buildslave/workspace/tcwg_gnu_1/abe/builds/x86_64-pc-linux-gnu/aarch64-linux-gnu/glibc-glibc.git~master/sysd-rules:483: /home/tcwg-buildslave/workspace/tcwg_gnu_1/abe/builds/x86_64-pc-linux-gnu/aarch64-linux-gnu/glibc-glibc.git~master/csu/start.o] Error 1 # 00:00:17 make[2]: *** [/home/tcwg-buildslave/workspace/tcwg_gnu_1/abe/builds/x86_64-pc-linux-gnu/aarch64-linux-gnu/glibc-glibc.git~master/sysd-rules:483: /home/tcwg-buildslave/workspace/tcwg_gnu_1/abe/builds/x86_64-pc-linux-gnu/aarch64-linux-gnu/glibc-glibc.git~master/csu/crti.o] Error 1 # 00:00:17 make[2]: *** [../o-iterator.mk:9: /home/tcwg-buildslave/workspace/tcwg_gnu_1/abe/builds/x86_64-pc-linux-gnu/aarch64-linux-gnu/glibc-glibc.git~master/csu/check_fds.o] Error 1 # 00:00:17 make[2]: *** [../o-iterator.mk:9: /home/tcwg-buildslave/workspace/tcwg_gnu_1/abe/builds/x86_64-pc-linux-gnu/aarch64-linux-gnu/glibc-glibc.git~master/csu/check_fds.os] Error 1 # 00:00:17 ../sysdeps/aarch64/nptl/tls.h:91:19: error: ‘__builtin_thread_pointer’ is not supported on this target # 00:00:17 make[2]: *** [/home/tcwg-buildslave/workspace/tcwg_gnu_1/abe/builds/x86_64-pc-linux-gnu/aarch64-linux-gnu/glibc-glibc.git~master/sysd-rules:485: /home/tcwg-buildslave/workspace/tcwg_gnu_1/abe/builds/x86_64-pc-linux-gnu/aarch64-linux-gnu/glibc-glibc.git~master/csu/libc-tls.o] Error 1 # 00:00:17 ../sysdeps/unix/sysv/linux/aarch64/sysdep.h:190:17: error: invalid register name for ‘_x0’ # 00:00:17 ../sysdeps/unix/sysv/linux/aarch64/sysdep.h:174:22: error: invalid register name for ‘_x8’
from (for last_good == 83e55c982ffcf42185254cff5ac16377672ae32e) # reset_artifacts: -10 # true: 0 # build_abe binutils: 1 # build_abe stage1: 2 # build_abe linux: 3 # build_abe glibc: 4 # build_abe stage2: 5 # build_abe qemu: 6
Artifacts of last_good build: https://ci.linaro.org/job/tcwg_cross-bisect-gnu-master-aarch64-build_cross/2... Artifacts of first_bad build: https://ci.linaro.org/job/tcwg_cross-bisect-gnu-master-aarch64-build_cross/2... Build top page/logs: https://ci.linaro.org/job/tcwg_cross-bisect-gnu-master-aarch64-build_cross/2...
Configuration details:
Reproduce builds: <cut> mkdir investigate-glibc-1f9c804fbd699104adefbce9e56d2c8aa711b6b9 cd investigate-glibc-1f9c804fbd699104adefbce9e56d2c8aa711b6b9
git clone https://git.linaro.org/toolchain/jenkins-scripts
mkdir -p artifacts/manifests curl -o artifacts/manifests/build-baseline.sh https://ci.linaro.org/job/tcwg_cross-bisect-gnu-master-aarch64-build_cross/2... --fail curl -o artifacts/manifests/build-parameters.sh https://ci.linaro.org/job/tcwg_cross-bisect-gnu-master-aarch64-build_cross/2... --fail curl -o artifacts/test.sh https://ci.linaro.org/job/tcwg_cross-bisect-gnu-master-aarch64-build_cross/2... --fail chmod +x artifacts/test.sh
# Reproduce the baseline build (build all pre-requisites) ./jenkins-scripts/tcwg_gnu-build.sh @@ artifacts/manifests/build-baseline.sh
cd glibc
# Reproduce first_bad build git checkout --detach 1f9c804fbd699104adefbce9e56d2c8aa711b6b9 ../artifacts/test.sh
# Reproduce last_good build git checkout --detach 83e55c982ffcf42185254cff5ac16377672ae32e ../artifacts/test.sh
cd .. </cut>
History of pending regressions and results: https://git.linaro.org/toolchain/ci/base-artifacts.git/log/?h=linaro-local/c...
Artifacts: https://ci.linaro.org/job/tcwg_cross-bisect-gnu-master-aarch64-build_cross/2... Build log: https://ci.linaro.org/job/tcwg_cross-bisect-gnu-master-aarch64-build_cross/2...
Full commit (up to 1000 lines): <cut> commit 1f9c804fbd699104adefbce9e56d2c8aa711b6b9 Author: Florian Weimer fweimer@redhat.com Date: Wed Jul 7 08:40:41 2021 +0200
nptl: Use internal low-level lock type for !IS_IN (libc)
This avoids an ABI hazard (types changing between different modules of glibc) without introducing linknamespace issues. In particular, NSS modules now call __lll_lock_wait_private@@GLIBC_PRIVATE to wait on internal locks (the unlock path is inlined and performs a direct system call).
Reviewed-by: Adhemerval Zanella adhemerval.zanella@linaro.org --- sysdeps/nptl/libc-lockP.h | 51 +++++------------------------------------------ 1 file changed, 5 insertions(+), 46 deletions(-)
diff --git a/sysdeps/nptl/libc-lockP.h b/sysdeps/nptl/libc-lockP.h index ef88a3e533..b66c938e44 100644 --- a/sysdeps/nptl/libc-lockP.h +++ b/sysdeps/nptl/libc-lockP.h @@ -33,18 +33,8 @@ #include <lowlevellock.h> #include <tls.h>
-#if IS_IN (libpthread) -/* This gets us the declarations of the __pthread_* internal names, - and hidden_proto for them. */ -# include <pthreadP.h> -#endif - /* Mutex type. */ -#if !IS_IN (libc) && !IS_IN (libpthread) -typedef pthread_mutex_t __libc_lock_t; -#else typedef int __libc_lock_t; -#endif typedef struct { pthread_mutex_t mutex; } __rtld_lock_recursive_t; typedef pthread_rwlock_t __libc_rwlock_t;
@@ -108,56 +98,25 @@ _Static_assert (LLL_LOCK_INITIALIZER == 0, "LLL_LOCK_INITIALIZER != 0");
/* Initialize the named lock variable, leaving it in a consistent, unlocked state. */ -#if IS_IN (libc) || IS_IN (libpthread) -# define __libc_lock_init(NAME) \ - ((void) ((NAME) = LLL_LOCK_INITIALIZER)) -#else -# define __libc_lock_init(NAME) __pthread_mutex_init (&(NAME)) -#endif +#define __libc_lock_init(NAME) ((void) ((NAME) = LLL_LOCK_INITIALIZER)) #define __libc_rwlock_init(NAME) __pthread_rwlock_init (&(NAME), NULL)
/* Finalize the named lock variable, which must be locked. It cannot be used again until __libc_lock_init is called again on it. This must be called on a lock variable before the containing storage is reused. */ -#if IS_IN (libc) || IS_IN (libpthread) -# define __libc_lock_fini(NAME) ((void) 0) -#else -# define __libc_lock_fini(NAME) __pthread_mutex_destroy (&(NAME)) -#endif +#define __libc_lock_fini(NAME) ((void) 0) #define __libc_rwlock_fini(NAME) ((void) 0)
/* Lock the named lock variable. */ -#if IS_IN (libc) || IS_IN (libpthread) -# ifndef __libc_lock_lock -# define __libc_lock_lock(NAME) \ - ({ lll_lock (NAME, LLL_PRIVATE); 0; }) -# endif -#else -# undef __libc_lock_lock -# define __libc_lock_lock(NAME) __pthread_mutex_lock (&(NAME)) -#endif +#define __libc_lock_lock(NAME) ({ lll_lock (NAME, LLL_PRIVATE); 0; }) #define __libc_rwlock_rdlock(NAME) __pthread_rwlock_rdlock (&(NAME)) #define __libc_rwlock_wrlock(NAME) __pthread_rwlock_wrlock (&(NAME))
/* Try to lock the named lock variable. */ -#if IS_IN (libc) || IS_IN (libpthread) -# ifndef __libc_lock_trylock -# define __libc_lock_trylock(NAME) \ - lll_trylock (NAME) -# endif -#else -# undef __libc_lock_trylock -# define __libc_lock_trylock(NAME) \ - __libc_maybe_call (__pthread_mutex_trylock, (&(NAME)), 0) -#endif +#define __libc_lock_trylock(NAME) lll_trylock (NAME)
/* Unlock the named lock variable. */ -#if IS_IN (libc) || IS_IN (libpthread) -# define __libc_lock_unlock(NAME) \ - lll_unlock (NAME, LLL_PRIVATE) -#else -# define __libc_lock_unlock(NAME) __pthread_mutex_unlock (&(NAME)) -#endif +#define __libc_lock_unlock(NAME) lll_unlock (NAME, LLL_PRIVATE) #define __libc_rwlock_unlock(NAME) __pthread_rwlock_unlock (&(NAME))
#if IS_IN (rtld) </cut>