Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-34579

sp-no-valgrind fails when server is compiled with valgrind

Details

    Description

      When the server is compiled with valgrind support, the test fails with:

      worker[01] Using MTR_BUILD_THREAD 300, with reserved ports 19000..19029                                                        │
      main.sp-no-valgrind                      [ fail ]                                                                              │
              Test ended at 2024-07-12 17:23:33                                                                                      │
      CURRENT_TEST: main.sp-no-valgrind                                                                                              │
      --- /home/vicentiu/Workspace/MariaDB/10.5/mysql-test/main/sp-no-valgrind.result 2023-08-07 18:13:16.058293832 +0300            │
      +++ /home/vicentiu/Workspace/MariaDB/10.5/mysql-test/main/sp-no-valgrind.reject 2024-07-12 17:23:33.158131299 +0300            │
      @@ -18,7 +18,7 @@                                                                                                              │
       SELECT 1       latin1  latin1_swedish_ci       latin1_swedish_ci                                                              │
       SELECT VARIABLE_VALUE-@local_mem_used FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME='MEMORY_USED';               │
       VARIABLE_VALUE-@local_mem_used                                                                                                │
      -0                                                                                                                             │
      +640                                                                                                                           │
       DROP PROCEDURE sp1;                                                                                                           │
       #                                                                                                                             │
       # End of 10.3 tests
      

      This is a combination of two bugs:
      1. A typo in set_server_version HAVE_VALGRIND vs HAVE_valgrind,
      means that there never is a -valgrind suffix added to server version when compiled with -WITH_VALGRIND=ON
      2. The removal of have_valgrind_build.inc https://github.com/MariaDB/server/pull/3393 allows the test to be run in MTR without --valgrind flag, with a server compiled with valgrind support.

      The proper fix is to ensure that the server version string is properly appended with -valgrind and also that the test never gets run with a server compiled with valgrind support. Asan being compiled in does not seem to cause an issue.

      Attachments

        Activity

          The asan should be there too as the BUILD script compiles asan with all valgrind options (to make it find more bugs) and the valgrind options changes slightly how memory is allocated (which causes the test to fail).
          In other word, a full revert fixes things properly

          monty Michael Widenius added a comment - The asan should be there too as the BUILD script compiles asan with all valgrind options (to make it find more bugs) and the valgrind options changes slightly how memory is allocated (which causes the test to fail). In other word, a full revert fixes things properly

          Patch by Daniel reverted

          monty Michael Widenius added a comment - Patch by Daniel reverted
          danblack Daniel Black added a comment -

          The BUILD scripts are not used by buildbot due to lack of generalised acceptance in the developer community.

          -DWITH_VALGRIND=ON or -DWITH_ASAN=ON are the CMake options to enable valgrind/asan respectively.

          mtr with --valgrind runs test with valgrind.

          Buildbot only tests -DWITH_VALGRIND=ON and mtr --valgrind together. Never separately.

          It's the developer community responsibility to ensure these options correctly translate into a correct build/test.

          Having not_valgrind_build.inc there for one test is a bit of a waste.

          danblack Daniel Black added a comment - The BUILD scripts are not used by buildbot due to lack of generalised acceptance in the developer community. -DWITH_VALGRIND=ON or -DWITH_ASAN=ON are the CMake options to enable valgrind/asan respectively. mtr with --valgrind runs test with valgrind. Buildbot only tests -DWITH_VALGRIND=ON and mtr --valgrind together. Never separately. It's the developer community responsibility to ensure these options correctly translate into a correct build/test. Having not_valgrind_build.inc there for one test is a bit of a waste.

          People

            monty Michael Widenius
            cvicentiu Vicențiu Ciorbaru
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.