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

spider/bugfix.mdev_28683 failing the valgrind build

Details

    Description

      Attachments

        Issue Links

          Activity

            danblack Daniel Black added a comment -

            spider/bugfix.mdev_28683                 w6 [ fail ]  Found warnings/errors in server log file!
                    Test ended at 2024-06-30 10:06:03
            line
            ==371295== Thread 21:
            ==371295== Conditional jump or move depends on uninitialised value(s)
            ==371295==    at 0xE9E9D6F: ha_spider::end_bulk_insert() (ha_spider.cc:9137)
            ==371295==    by 0x85272C: select_insert::abort_result_set() (sql_insert.cc:4387)
            ==371295==    by 0x8FCD49: handle_select(THD*, LEX*, select_result*, unsigned long) (sql_select.cc:467)
            ==371295==    by 0x8945C5: mysql_execute_command(THD*) (sql_parse.cc:4826)
            ==371295==    by 0x894EE9: mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool) (sql_parse.cc:8221)
            ==371295==    by 0x897072: dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool) (sql_parse.cc:1993)
            ==371295==    by 0x898C3B: do_command(THD*) (sql_parse.cc:1376)
            ==371295==    by 0x999021: do_handle_one_connection(CONNECT*, bool) (sql_connect.cc:1417)
            ==371295==    by 0x99928C: handle_one_connection (sql_connect.cc:1319)
            ==371295==    by 0xCF588E: pfs_spawn_thread (pfs.cc:2201)
            ==371295== ---- Print suppression ? --- [Return/N/n/Y/y/C/c] ---- 
            ^ Found warnings in /home/dan/repos/build-mariadb-server-rebase-debug/mysql-test/var/6/log/mysqld.1.1.err
            

            danblack Daniel Black added a comment - spider/bugfix.mdev_28683 w6 [ fail ] Found warnings/errors in server log file! Test ended at 2024-06-30 10:06:03 line ==371295== Thread 21: ==371295== Conditional jump or move depends on uninitialised value(s) ==371295== at 0xE9E9D6F: ha_spider::end_bulk_insert() (ha_spider.cc:9137) ==371295== by 0x85272C: select_insert::abort_result_set() (sql_insert.cc:4387) ==371295== by 0x8FCD49: handle_select(THD*, LEX*, select_result*, unsigned long) (sql_select.cc:467) ==371295== by 0x8945C5: mysql_execute_command(THD*) (sql_parse.cc:4826) ==371295== by 0x894EE9: mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool) (sql_parse.cc:8221) ==371295== by 0x897072: dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool) (sql_parse.cc:1993) ==371295== by 0x898C3B: do_command(THD*) (sql_parse.cc:1376) ==371295== by 0x999021: do_handle_one_connection(CONNECT*, bool) (sql_connect.cc:1417) ==371295== by 0x99928C: handle_one_connection (sql_connect.cc:1319) ==371295== by 0xCF588E: pfs_spawn_thread (pfs.cc:2201) ==371295== ---- Print suppression ? --- [Return/N/n/Y/y/C/c] ---- ^ Found warnings in /home/dan/repos/build-mariadb-server-rebase-debug/mysql-test/var/6/log/mysqld.1.1.err
            ycp Yuchen Pei added a comment -

            danblack Did you get this locally?

            ycp Yuchen Pei added a comment - danblack Did you get this locally?
            ycp Yuchen Pei added a comment - - edited

            Thanks danblack. I could indeed reprod it locally with the following:

            # cmake
            WITH_ASAN:BOOL=OFF
            WITH_VALGRIND:BOOL=ON
            # mtr invocation
            mtr --valgrind="--leak-check=summary --gen-suppressions=yes --num-callers=10" mdev_28683
            

            Hi holyfoot, ptal thanks:

            upstream/bb-10.5-mdev-34449 d0689948d9b0ee3673435412ba33f25456bc1239
            MDEV-34449 Default ha_spider::bulk_size to 0.
             
            This fixes a valgrind failure where the bulk_size is used before
            initialised in ha_spider::end_bulk_insert().
            

            ycp Yuchen Pei added a comment - - edited Thanks danblack . I could indeed reprod it locally with the following: # cmake WITH_ASAN:BOOL=OFF WITH_VALGRIND:BOOL=ON # mtr invocation mtr --valgrind="--leak-check=summary --gen-suppressions=yes --num-callers=10" mdev_28683 Hi holyfoot , ptal thanks: upstream/bb-10.5-mdev-34449 d0689948d9b0ee3673435412ba33f25456bc1239 MDEV-34449 Default ha_spider::bulk_size to 0.   This fixes a valgrind failure where the bulk_size is used before initialised in ha_spider::end_bulk_insert().
            danblack Daniel Black added a comment -

            Looks good to me:

            bb-10.5-mdev-34449

            $ mysql-test/mtr --valgrind="--leak-check=summary --gen-suppressions=yes --num-callers=10" mdev_28683
            Logging: /home/dan/repos/mariadb-server-10.5/mysql-test/mysql-test-run.pl  --valgrind=--leak-check=summary --gen-suppressions=yes --num-callers=10 mdev_28683
            VS config: 
            vardir: /home/dan/repos/build-mariadb-server-10.5/mysql-test/var
            Checking leftover processes...
            Removing old var directory...
            Creating var directory '/home/dan/repos/build-mariadb-server-10.5/mysql-test/var'...
            Checking supported features...
            MariaDB Version 10.5.26-MariaDB
             - SSL connections supported
             - binaries built with wsrep patch
            Collecting tests...
            Installing system database...
             
            ==============================================================================
             
            TEST                                      RESULT   TIME (ms) or COMMENT
            --------------------------------------------------------------------------
             
            worker[01] Using MTR_BUILD_THREAD 300, with reserved ports 19000..19029
            spider/bugfix.mdev_28683                 [ pass ]   7055
            --------------------------------------------------------------------------
            The servers were restarted 0 times
            Spent 7.055 of 85 seconds executing testcases
             
            Completed: All 1 tests were successful.
            

            I'm happy to see this merged.

            danblack Daniel Black added a comment - Looks good to me: bb-10.5-mdev-34449 $ mysql-test/mtr --valgrind="--leak-check=summary --gen-suppressions=yes --num-callers=10" mdev_28683 Logging: /home/dan/repos/mariadb-server-10.5/mysql-test/mysql-test-run.pl --valgrind=--leak-check=summary --gen-suppressions=yes --num-callers=10 mdev_28683 VS config: vardir: /home/dan/repos/build-mariadb-server-10.5/mysql-test/var Checking leftover processes... Removing old var directory... Creating var directory '/home/dan/repos/build-mariadb-server-10.5/mysql-test/var'... Checking supported features... MariaDB Version 10.5.26-MariaDB - SSL connections supported - binaries built with wsrep patch Collecting tests... Installing system database...   ==============================================================================   TEST RESULT TIME (ms) or COMMENT --------------------------------------------------------------------------   worker[01] Using MTR_BUILD_THREAD 300, with reserved ports 19000..19029 spider/bugfix.mdev_28683 [ pass ] 7055 -------------------------------------------------------------------------- The servers were restarted 0 times Spent 7.055 of 85 seconds executing testcases   Completed: All 1 tests were successful. I'm happy to see this merged.
            ycp Yuchen Pei added a comment -

            Thanks for the review danblack - pushed 3b956f832996f2a133e07afba93d7ae324028b8c to 10.5

            ycp Yuchen Pei added a comment - Thanks for the review danblack - pushed 3b956f832996f2a133e07afba93d7ae324028b8c to 10.5

            People

              ycp Yuchen Pei
              ycp Yuchen Pei
              Votes:
              0 Vote for this issue
              Watchers:
              2 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.