From d4b882fac2122dc7341ea73c78a34774cba39989 Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Wed, 1 Jun 2022 14:48:34 +0100 Subject: [PATCH] ci: Try reducing FD soft limit to fix valgrind tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit They are [currently failing](https://gitlab.gnome.org/GNOME/glib/-/jobs/2032874) with the error: ``` 1/273 glib:glib / array-test FAIL 0.19s killed by signal 11 SIGSEGV 05:04:16 G_DEBUG=gc-friendly G_TEST_BUILDDIR=/builds/GNOME/glib/_build/glib/tests MALLOC_CHECK_=2 MALLOC_PERTURB_=133 G_TEST_SRCDIR=/builds/GNOME/glib/glib/tests valgrind --tool=memcheck --error-exitcode=1 --track-origins=yes --leak-check=full --leak-resolution=high --num-callers=50 --show-leak-kinds=definite,possible --show-error-list=yes --suppressions=/builds/GNOME/glib/tools/glib.supp /builds/GNOME/glib/_build/glib/tests/array-test ----------------------------------- output ----------------------------------- stderr: valgrind: m_libcfile.c:66 (vgPlain_safe_fd): Assertion 'newfd >= VG_(fd_hard_limit)' failed. ------------------------------------------------------------------------------ ``` I’m not really sure what that means, but `show-execution-environment.sh` says the FD soft limit is set to 524288 on the CI machine. That seems high; on my machine it’s only 1024 (and the valgrind tests pass). So let’s try 1024. The valgrind CI has been failing since we most recently upgraded the CI image to a new version of Fedora. Signed-off-by: Philip Withnall --- .gitlab-ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 84c7c8445..7fb5a64a7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -221,6 +221,9 @@ valgrind: -Dinstalled_tests=true _build - ninja -C _build + # Valgrind doesn’t work when the soft FD limit is set too high + # See https://gitlab.gnome.org/GNOME/glib/-/merge_requests/2710 + - ulimit -Sn 1024 - bash -x ./.gitlab-ci/run-tests.sh --wrap "valgrind --tool=memcheck --error-exitcode=1 --track-origins=yes --leak-check=full --leak-resolution=high --num-callers=50 --show-leak-kinds=definite,possible --show-error-list=yes --suppressions=${CI_PROJECT_DIR}/tools/glib.supp" --no-suite no-valgrind