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

MariaRocks produces numerous (spurious?) valgrind failures

Details

    Description

      Any test with MariaRocks produces a lot of valgrind failures.

      • A lot are probably harmless ("still reachable" failures for objects that are allocated once and then never freed)
      • However we should have suppressions for them
      • There are also "blocks are indirectly lost" and "blocks are definitely lost" failures. These are do not look harmless, and they come from upstream: https://github.com/facebook/mysql-5.6/issues/586 .

      Attachments

        Issue Links

          Activity

            psergei Sergei Petrunia created issue -
            psergei Sergei Petrunia made changes -
            Field Original Value New Value
            elenst Elena Stepanova made changes -
            Affects Version/s 10.2 [ 14601 ]
            elenst Elena Stepanova made changes -
            Fix Version/s 10.2 [ 14601 ]
            elenst Elena Stepanova made changes -
            Assignee Sergei Petrunia [ psergey ]

            Running the testsuite under ASAN does not produce any errors.

            Running it under valrgrind still does. There are many kinds of "still reachable" errors, with still-reachable data being in

            • background threads/global info. This can be suppressed as it is allocated in myrocks::rocksdb_init_func.
            • Block caches. These are hard to suppress meaningfully as the cache is filled during e.g. Get() operation.
            psergei Sergei Petrunia added a comment - Running the testsuite under ASAN does not produce any errors. Running it under valrgrind still does. There are many kinds of "still reachable" errors, with still-reachable data being in background threads/global info. This can be suppressed as it is allocated in myrocks::rocksdb_init_func . Block caches. These are hard to suppress meaningfully as the cache is filled during e.g. Get() operation.

            Running valgrind on current upstream fails like so: https://gist.github.com/spetrunia/f5b314b6c039c04ff963838f78a447aa. This is valgrind-3.11 in Ubuntu LTS.

            psergei Sergei Petrunia added a comment - Running valgrind on current upstream fails like so: https://gist.github.com/spetrunia/f5b314b6c039c04ff963838f78a447aa . This is valgrind-3.11 in Ubuntu LTS.

            Upgraded to latest valgrind (3.13) and the error becomes a warning:

            ==14138== Warning: unimplemented fcntl command: 1036
            ==14138== Warning: unimplemented fcntl command: 1036
            .... repeated 91 times: ==14138== Warning: unimplemented fcntl command: 1036
            ^ Found warnings in /home/ubuntu/mysql-5.6/mysql-test/var/log/mysqld.1.err
            

            .. but I still get plenty of failures similar to what I observe in MariaDB:
            https://gist.github.com/spetrunia/0e0351e0404d7c854e6549004c19ff7b

            psergei Sergei Petrunia added a comment - Upgraded to latest valgrind (3.13) and the error becomes a warning: ==14138== Warning: unimplemented fcntl command: 1036 ==14138== Warning: unimplemented fcntl command: 1036 .... repeated 91 times: ==14138== Warning: unimplemented fcntl command: 1036 ^ Found warnings in /home/ubuntu/mysql-5.6/mysql-test/var/log/mysqld.1.err .. but I still get plenty of failures similar to what I observe in MariaDB: https://gist.github.com/spetrunia/0e0351e0404d7c854e6549004c19ff7b
            psergei Sergei Petrunia made changes -
            Summary MariaRocks produces numerous valgrind failures MariaRocks produces numerous (spurious?) valgrind failures
            psergei Sergei Petrunia made changes -
            Fix Version/s 10.4 [ 22408 ]
            Fix Version/s 10.2 [ 14601 ]

            Discussed with the upstream. Upstream MyRocks is expected to work under valgrind. Will need to see why it fails in so many places for MariaDB.

            psergei Sergei Petrunia added a comment - Discussed with the upstream. Upstream MyRocks is expected to work under valgrind. Will need to see why it fails in so many places for MariaDB.

            Ran upstream test under valgrind (3.13). Some tests hang/timeout but I dont get any valgrind errors.

            psergei Sergei Petrunia added a comment - Ran upstream test under valgrind (3.13). Some tests hang/timeout but I dont get any valgrind errors.
            psergei Sergei Petrunia added a comment - Examples: https://gist.github.com/spetrunia/bf52c59e8fa6dc45d6aae2302db5d006 https://gist.github.com/spetrunia/3981596638ce90169fe0162f2fae5e30

            > Ran upstream test under valgrind (3.13). Some tests hang/timeout but I dont get any valgrind errors.

            However if I run valgrind tests on the revision of the upstream that we have merged from, I do see errors:
            https://gist.github.com/spetrunia/d6125021b35850d5ab7da111d77e6352

            So the [first part of the] solution is to wait for the merge from the upstream.

            psergei Sergei Petrunia added a comment - > Ran upstream test under valgrind (3.13). Some tests hang/timeout but I dont get any valgrind errors. However if I run valgrind tests on the revision of the upstream that we have merged from, I do see errors: https://gist.github.com/spetrunia/d6125021b35850d5ab7da111d77e6352 So the [first part of the] solution is to wait for the merge from the upstream.

            After fixing MDEV-20315 (rocksdb_sys_vars testsuite and relevant tests in mariabackup test suite), enabled Valgrind for for rocksdb test suite and ran tests:

            ...
            valgrind_report                          w0 [ pass ]       
            --------------------------------------------------------------------------
            The servers were restarted 117 times
            Spent 44520.265 of 15806 seconds executing testcases
            

            I got no failures.

            psergei Sergei Petrunia added a comment - After fixing MDEV-20315 ( rocksdb_sys_vars testsuite and relevant tests in mariabackup test suite), enabled Valgrind for for rocksdb test suite and ran tests: ... valgrind_report w0 [ pass ] -------------------------------------------------------------------------- The servers were restarted 117 times Spent 44520.265 of 15806 seconds executing testcases I got no failures.

            Enabled the valgrind back for rocksdb testsuite

            psergei Sergei Petrunia added a comment - Enabled the valgrind back for rocksdb testsuite
            psergei Sergei Petrunia made changes -
            Fix Version/s 10.2.27 [ 23717 ]
            Fix Version/s 10.3.18 [ 23719 ]
            Fix Version/s 10.4.8 [ 23721 ]
            Fix Version/s 10.4 [ 22408 ]
            Resolution Fixed [ 1 ]
            Status Open [ 1 ] Closed [ 6 ]
            psergei Sergei Petrunia made changes -
            serg Sergei Golubchik made changes -
            Workflow MariaDB v3 [ 80234 ] MariaDB v4 [ 151915 ]

            People

              psergei Sergei Petrunia
              psergei Sergei Petrunia
              Votes:
              0 Vote for this issue
              Watchers:
              1 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.