Successfully identified regression in *glibc* in CI configuration tcwg_cross/gnu-master-arm-build_cross. So far, this commit has regressed CI configurations: - tcwg_cross/gnu-master-arm-build_cross
Culprit: <cut> commit 832f50be6c9c010e46180d14126bbb81f35e808c Author: Florian Weimer fweimer@redhat.com Date: Tue Jul 6 13:22:01 2021 +0200
elf: Call free from base namespace on error in dl-libc.c [BZ #27646]
In dlerror_run, free corresponds to the local malloc in the namespace, but GLRO (dl_catch_error) uses the malloc from the base namespace. elf/tst-dlmopen-gethostbyname triggers this mismatch, but it does not crash, presumably because of a fastbin deallocation.
Fixes commit c2059edce20c124d1a99f1a94cc52e83b77a917a ("elf: Use _dl_catch_error from base namespace in dl-libc.c [BZ #27646]") and commit b2964eb1d9a6b8ab1250e8a881cf406182da5875 ("dlfcn: Failures after dlmopen should not terminate process [BZ #24772]"). </cut>
Results regressed to (for first_bad == 832f50be6c9c010e46180d14126bbb81f35e808c) # 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:11 ./sysdeps/arm/sysdep.h:49:4: error: #error unknown arm architecture # 00:00:11 ./sysdeps/arm/sysdep.h:53:5: error: is not defined, evaluates to 0 [-Werror=undef] # 00:00:11 ./sysdeps/arm/sysdep.h:56:5: error: is not defined, evaluates to 0 [-Werror=undef] # 00:00:11 ./sysdeps/arm/sysdep.h:59:5: error: is not defined, evaluates to 0 [-Werror=undef] # 00:00:11 ./sysdeps/arm/sysdep.h:62:5: error: is not defined, evaluates to 0 [-Werror=undef] # 00:00:11 ./sysdeps/arm/sysdep.h:49:4: error: #error unknown arm architecture # 00:00:11 ./sysdeps/arm/sysdep.h:53:5: error: is not defined, evaluates to 0 [-Werror=undef] # 00:00:11 ./sysdeps/arm/sysdep.h:56:5: error: is not defined, evaluates to 0 [-Werror=undef] # 00:00:11 ./sysdeps/arm/sysdep.h:59:5: error: is not defined, evaluates to 0 [-Werror=undef] # 00:00:11 ./sysdeps/arm/sysdep.h:62:5: error: is not defined, evaluates to 0 [-Werror=undef]
from (for last_good == c8935581de4ff931bc32fb03da5d87f0ee2378a1) # 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-arm-build_cross/61/ar... Artifacts of first_bad build: https://ci.linaro.org/job/tcwg_cross-bisect-gnu-master-arm-build_cross/61/ar... Build top page/logs: https://ci.linaro.org/job/tcwg_cross-bisect-gnu-master-arm-build_cross/61/
Configuration details:
Reproduce builds: <cut> mkdir investigate-glibc-832f50be6c9c010e46180d14126bbb81f35e808c cd investigate-glibc-832f50be6c9c010e46180d14126bbb81f35e808c
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-arm-build_cross/61/ar... --fail curl -o artifacts/manifests/build-parameters.sh https://ci.linaro.org/job/tcwg_cross-bisect-gnu-master-arm-build_cross/61/ar... --fail curl -o artifacts/test.sh https://ci.linaro.org/job/tcwg_cross-bisect-gnu-master-arm-build_cross/61/ar... --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 832f50be6c9c010e46180d14126bbb81f35e808c ../artifacts/test.sh
# Reproduce last_good build git checkout --detach c8935581de4ff931bc32fb03da5d87f0ee2378a1 ../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-arm-build_cross/61/ar... Build log: https://ci.linaro.org/job/tcwg_cross-bisect-gnu-master-arm-build_cross/61/co...
Full commit (up to 1000 lines): <cut> commit 832f50be6c9c010e46180d14126bbb81f35e808c Author: Florian Weimer fweimer@redhat.com Date: Tue Jul 6 13:22:01 2021 +0200
elf: Call free from base namespace on error in dl-libc.c [BZ #27646]
In dlerror_run, free corresponds to the local malloc in the namespace, but GLRO (dl_catch_error) uses the malloc from the base namespace. elf/tst-dlmopen-gethostbyname triggers this mismatch, but it does not crash, presumably because of a fastbin deallocation.
Fixes commit c2059edce20c124d1a99f1a94cc52e83b77a917a ("elf: Use _dl_catch_error from base namespace in dl-libc.c [BZ #27646]") and commit b2964eb1d9a6b8ab1250e8a881cf406182da5875 ("dlfcn: Failures after dlmopen should not terminate process [BZ #24772]"). --- elf/dl-libc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/elf/dl-libc.c b/elf/dl-libc.c index a49df22029..ba792e9589 100644 --- a/elf/dl-libc.c +++ b/elf/dl-libc.c @@ -48,7 +48,7 @@ dlerror_run (void (*operate) (void *), void *args) ?: last_errstring != NULL);
if (result && malloced) - free ((char *) last_errstring); + GLRO (dl_error_free) ((char *) last_errstring);
return result; } </cut>