- Apply provided patch (in 5.7, it's testclients/mysql_client_test.c) mkdir bld && cd bld cmake .. \ -DCMAKE_INSTALL_PREFIX=. \ -DWITH_VALGRIND=1 \ -DWITH_DEBUG=1 \ -DWITH_BOOST=../boost make -j32 make install cd mysql-test/ [umshastr@hod03]/export/umesh/server/source/bugs/src_build/fb_builds/mysql-5.7.23/bld/mysql-test: ./mtr --valgrind main.mysql_client_test Logging: ./mtr --valgrind main.mysql_client_test MySQL Version 5.7.23 Too long tmpdir path '/export/umesh/server/source/bugs/src_build/fb_builds/mysql-5.7.23/bld/mysql-test/var/tmp' creating a shorter one... - using tmpdir: '/tmp/yjz5Uyc87_' Turning on valgrind for all executables Running valgrind with options " --tool=memcheck --num-callers=16 --show-reachable=yes --suppressions=/export/umesh/server/source/bugs/src_build/fb_builds/mysql-5.7.23/bld/mysql-test/valgrind.supp " Turning off --check-testcases to save time when valgrinding Checking supported features... - SSL connections supported - binaries are debug compiled Collecting tests... Removing old var directory... Creating var directory '/export/umesh/server/source/bugs/src_build/fb_builds/mysql-5.7.23/bld/mysql-test/var'... Installing system database... Using parallel: 1 ============================================================================== TEST RESULT TIME (ms) or COMMENT -------------------------------------------------------------------------- worker[1] Using MTR_BUILD_THREAD 300, with reserved ports 13000..13009 main.mysql_client_test [ skipped ] Need "--big-test" when running with Valgrind ^Cmysql-test-run: *** ERROR: Got ^C signal [umshastr@hod03]/export/umesh/server/source/bugs/src_build/fb_builds/mysql-5.7.23/bld/mysql-test: ./mtr --big-test --valgrind main.mysql_client_test Logging: ./mtr --big-test --valgrind main.mysql_client_test MySQL Version 5.7.23 Too long tmpdir path '/export/umesh/server/source/bugs/src_build/fb_builds/mysql-5.7.23/bld/mysql-test/var/tmp' creating a shorter one... - using tmpdir: '/tmp/DqMFjrlK0L' Turning on valgrind for all executables Running valgrind with options " --tool=memcheck --num-callers=16 --show-reachable=yes --suppressions=/export/umesh/server/source/bugs/src_build/fb_builds/mysql-5.7.23/bld/mysql-test/valgrind.supp " Turning off --check-testcases to save time when valgrinding Checking supported features... - SSL connections supported - binaries are debug compiled Collecting tests... Checking leftover processes... - found old pid 5996 in 'mysqld.1.pid', killing it... process did not exist! Removing old var directory... Creating var directory '/export/umesh/server/source/bugs/src_build/fb_builds/mysql-5.7.23/bld/mysql-test/var'... Installing system database... Using parallel: 1 ============================================================================== TEST RESULT TIME (ms) or COMMENT -------------------------------------------------------------------------- worker[1] Using MTR_BUILD_THREAD 300, with reserved ports 13000..13009 main.mysql_client_test [ fail ] Test ended at 2018-08-23 13:50:48 CURRENT_TEST: main.mysql_client_test ==6490== Memcheck, a memory error detector ==6490== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al. ==6490== Using Valgrind-3.10.0 and LibVEX; rerun with -h for copyright info ==6490== Command: /export/umesh/server/source/bugs/src_build/fb_builds/mysql-5.7.23/bld/client//mysqltest --defaults-file=/export/umesh/server/source/bugs/src_build/fb_builds/mysql-5.7.23/bld/mysql-test/var/my.cnf --silent --tmpdir=/tmp/DqMFjrlK0L --character-sets-dir=/export/umesh/server/source/bugs/src_build/fb_builds/mysql-5.7.23/bld/share/charsets --logdir=/export/umesh/server/source/bugs/src_build/fb_builds/mysql-5.7.23/bld/mysql-test/var/log --plugin_dir=/export/umesh/server/source/bugs/src_build/fb_builds/mysql-5.7.23/bld/plugin/auth --database=test --timer-file=/export/umesh/server/source/bugs/src_build/fb_builds/mysql-5.7.23/bld/mysql-test/var/log/timer --test-file=/export/umesh/server/source/bugs/src_build/fb_builds/mysql-5.7.23/bld/mysql-test/t/mysql_client_test.test --tail-lines=20 --result-file=/export/umesh/server/source/bugs/src_build/fb_builds/mysql-5.7.23/bld/mysql-test/r/mysql_client_test.result ==6490== mysqltest: At line 24: command "$MYSQL_CLIENT_TEST --getopt-ll-test=25600M $PLUGIN_AUTH_CLIENT_OPT >> $MYSQLTEST_VARDIR/log/mysql_client_test.out.log 2>&1" failed Output from before failure: exec of 'valgrind --leak-check=yes --tool=memcheck --num-callers=16 --show-reachable=yes --suppressions=/export/umesh/server/source/bugs/src_build/fb_builds/mysql-5.7.23/bld/mysql-test/valgrind.supp --error-exitcode=42 /export/umesh/server/source/bugs/src_build/fb_builds/mysql-5.7.23/bld/testclients/mysql_client_test --defaults-file=/export/umesh/server/source/bugs/src_build/fb_builds/mysql-5.7.23/bld/mysql-test/var/my.cnf --testcase --vardir=/export/umesh/server/source/bugs/src_build/fb_builds/mysql-5.7.23/bld/mysql-test/var --getopt-ll-test=25600M --plugin-dir=/export/umesh/server/source/bugs/src_build/fb_builds/mysql-5.7.23/bld/plugin/auth >> /export/umesh/server/source/bugs/src_build/fb_builds/mysql-5.7.23/bld/mysql-test/var/log/mysql_client_test.out.log 2>&1' failed, error: 10752, status: 42, errno: 2 The result from queries just before the failure was: SET @old_general_log= @@global.general_log; SET @old_slow_query_log= @@global.slow_query_log; ==6490== ==6490== HEAP SUMMARY: ==6490== in use at exit: 0 bytes in 0 blocks ==6490== total heap usage: 678 allocs, 678 frees, 733,585 bytes allocated ==6490== ==6490== All heap blocks were freed -- no leaks are possible ==6490== ==6490== For counts of detected and suppressed errors, rerun with: -v ==6490== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 2 from 2) safe_process[6489]: Child process: 6490, exit: 1 - the logfile can be found in '/export/umesh/server/source/bugs/src_build/fb_builds/mysql-5.7.23/bld/mysql-test/var/log/main.mysql_client_test/mysql_client_test.log' valgrind_report [ pass ] -------------------------------------------------------------------------- The servers were restarted 0 times Spent 0.000 of 492 seconds executing testcases Completed: Failed 1/2 tests, 50.00% were successful. Failing test(s): main.mysql_client_test The log files in var/log may give you some hint of what went wrong. If you want to report this error, please read first the documentation at http://dev.mysql.com/doc/mysql/en/mysql-test-suite.html mysql-test-run: *** ERROR: there were failing test cases ## /export/umesh/server/source/bugs/src_build/fb_builds/mysql-5.7.23/bld: tail -f mysql-test/var/log/mysql_client_test.out.log !!! SUCCESS !!! ==9473== ==9473== HEAP SUMMARY: ==9473== in use at exit: 272 bytes in 3 blocks ==9473== total heap usage: 987,103 allocs, 987,100 frees, 129,329,889 bytes allocated ==9473== ==9473== 104 bytes in 1 blocks are definitely lost in loss record 2 of 2 ==9473== at 0x4BA377: my_malloc (my_malloc.c:62) ==9473== by 0x47C9A9: mysql_extension_init (client.c:2545) ==9473== by 0x476684: mysql_next_result (libmysql.c:4996) ==9473== by 0x46BFA7: test_leak (mysql_client_test.c:21004) ==9473== by 0x407A07: main (mysql_client_fw.c:1458) ==9473== ==9473== LEAK SUMMARY: ==9473== definitely lost: 104 bytes in 1 blocks ==9473== indirectly lost: 0 bytes in 0 blocks ==9473== possibly lost: 0 bytes in 0 blocks ==9473== still reachable: 0 bytes in 0 blocks ==9473== suppressed: 32 bytes in 1 blocks ==9473== ==9473== For counts of detected and suppressed errors, rerun with: -v ==9473== ERROR SUMMARY: 17 errors from 13 contexts (suppressed: 1 from 1)