[glib/wip/pwithnall/try-fixing-valgrind-ci] WIP: ci: Try reducing FD soft limit to fix valgrind tests




commit e26e4856c6fe2f83ef1c829fb9c01ad428934dba
Author: Philip Withnall <pwithnall endlessos org>
Date:   Wed Jun 1 14:48:34 2022 +0100

    WIP: ci: Try reducing FD soft limit to fix valgrind tests
    
    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.
    
    Signed-off-by: Philip Withnall <pwithnall endlessos org>

 .gitlab-ci.yml | 1 +
 1 file changed, 1 insertion(+)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 84c7c8445e..4b9cbed7f6 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -221,6 +221,7 @@ valgrind:
             -Dinstalled_tests=true
             _build
     - ninja -C _build
+    - 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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]