Valgrind output --------------- ==8926== Thread 36: ==8926== Invalid read of size 8 ==8926== at 0x4150EF1: System_table_access::open_table(THD*, MYSQL_LEX_STRING, MYSQL_LEX_STRING, unsigned int, thr_lock_type, TABLE**, Open_tables_backup*) (rpl_table_access.cc:94) ==8926== by 0x41BC0F8: Rpl_info_table::do_flush_info(bool) (rpl_info_table.cc:193) ==8926== by 0x4189A55: Rpl_info_handler::flush_info(bool) (rpl_info_handler.h:97) ==8926== by 0x4190E0E: Relay_log_info::flush_info(bool) (rpl_rli.cc:1848) ==8926== by 0x41655E6: terminate_slave_threads(Master_info*, int, unsigned long, bool) (rpl_slave.cc:1571) ==8926== by 0x4166BB5: end_slave() (rpl_slave.cc:1960) ==8926== by 0x2E635E8: close_connections() (mysqld.cc:1813) ==8926== by 0x2E6695F: signal_hand (mysqld.cc:2936) ==8926== by 0x4C0E429: pfs_spawn_thread (pfs.cc:2836) ==8926== by 0x7BF86B9: start_thread (pthread_create.c:333) ==8926== by 0x989741C: clone (clone.S:109) ==8926== Address 0x44846580 is 32 bytes inside a block of size 2,576 free'd ==8926== at 0x79E5DBB: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==8926== by 0x4523871: my_raw_free(void*) (my_malloc.cc:281) ==8926== by 0x45236FE: my_free(void*) (my_malloc.cc:153) ==8926== by 0x2F3B71C: intern_close_table(TABLE*) (sql_base.cc:1096) ==8926== by 0x2F5506B: Table_cache::free_unused_tables_if_necessary(THD*) (table_cache.h:323) ==8926== by 0x2F558B8: Table_cache::release_table(THD*, TABLE*) (table_cache.h:518) ==8926== by 0x2F3CA9A: release_or_close_table(THD*, TABLE*) (sql_base.cc:1707) ==8926== by 0x2F3CCC3: close_thread_table(THD*, TABLE**) (sql_base.cc:1744) ==8926== by 0x2F3C184: close_open_tables(THD*) (sql_base.cc:1393) ==8926== by 0x2F3C990: close_thread_tables(THD*) (sql_base.cc:1686) ==8926== by 0x4150EB0: System_table_access::open_table(THD*, MYSQL_LEX_STRING, MYSQL_LEX_STRING, unsigned int, thr_lock_type, TABLE**, Open_tables_backup*) (rpl_table_access.cc:89) ==8926== by 0x41BC0F8: Rpl_info_table::do_flush_info(bool) (rpl_info_table.cc:193) ==8926== by 0x4189A55: Rpl_info_handler::flush_info(bool) (rpl_info_handler.h:97) ==8926== by 0x4190E0E: Relay_log_info::flush_info(bool) (rpl_rli.cc:1848) ==8926== by 0x41655E6: terminate_slave_threads(Master_info*, int, unsigned long, bool) (rpl_slave.cc:1571) ==8926== by 0x4166BB5: end_slave() (rpl_slave.cc:1960) ==8926== by 0x2E635E8: close_connections() (mysqld.cc:1813) ==8926== by 0x2E6695F: signal_hand (mysqld.cc:2936) ==8926== by 0x4C0E429: pfs_spawn_thread (pfs.cc:2836) ==8926== by 0x7BF86B9: start_thread (pthread_create.c:333) ==8926== by 0x989741C: clone (clone.S:109) ==8926== Block was alloc'd at ==8926== at 0x79E4B8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==8926== by 0x452374E: my_raw_malloc(unsigned long, int) (my_malloc.cc:199) ==8926== by 0x45233A6: my_malloc(unsigned int, unsigned long, int) (my_malloc.cc:81) ==8926== by 0x2F40E92: open_table(THD*, TABLE_LIST*, Open_table_context*) (sql_base.cc:3334) ==8926== by 0x2F44BB4: open_and_process_table(THD*, LEX*, TABLE_LIST*, unsigned int*, Prelocking_strategy*, bool, Open_table_context*) (sql_base.cc:5004) ==8926== by 0x2F4616E: open_tables(THD*, TABLE_LIST**, unsigned int*, unsigned int, Prelocking_strategy*) (sql_base.cc:5649) ==8926== by 0x2F476E4: open_and_lock_tables(THD*, TABLE_LIST*, unsigned int, Prelocking_strategy*) (sql_base.cc:6379) ==8926== by 0x2F4719E: open_n_lock_single_table(THD*, TABLE_LIST*, thr_lock_type, unsigned int, Prelocking_strategy*) (sql_base.cc:6234) ==8926== by 0x30F3F94: open_n_lock_single_table(THD*, TABLE_LIST*, thr_lock_type, unsigned int) (sql_base.h:456) ==8926== by 0x4150CD7: System_table_access::open_table(THD*, MYSQL_LEX_STRING, MYSQL_LEX_STRING, unsigned int, thr_lock_type, TABLE**, Open_tables_backup*) (rpl_table_access.cc:70) ==8926== by 0x41BC0F8: Rpl_info_table::do_flush_info(bool) (rpl_info_table.cc:193) ==8926== by 0x4189A55: Rpl_info_handler::flush_info(bool) (rpl_info_handler.h:97) ==8926== by 0x4190E0E: Relay_log_info::flush_info(bool) (rpl_rli.cc:1848) ==8926== by 0x41655E6: terminate_slave_threads(Master_info*, int, unsigned long, bool) (rpl_slave.cc:1571) ==8926== by 0x4166BB5: end_slave() (rpl_slave.cc:1960) ==8926== by 0x2E635E8: close_connections() (mysqld.cc:1813) ==8926== by 0x2E6695F: signal_hand (mysqld.cc:2936) ==8926== by 0x4C0E429: pfs_spawn_thread (pfs.cc:2836) ==8926== by 0x7BF86B9: start_thread (pthread_create.c:333) ==8926== by 0x989741C: clone (clone.S:109) ==8926== ==8926== Invalid read of size 8 ==8926== at 0x4150F01: System_table_access::open_table(THD*, MYSQL_LEX_STRING, MYSQL_LEX_STRING, unsigned int, thr_lock_type, TABLE**, Open_tables_backup*) (rpl_table_access.cc:93) ==8926== by 0x41BC0F8: Rpl_info_table::do_flush_info(bool) (rpl_info_table.cc:193) ==8926== by 0x4189A55: Rpl_info_handler::flush_info(bool) (rpl_info_handler.h:97) ==8926== by 0x4190E0E: Relay_log_info::flush_info(bool) (rpl_rli.cc:1848) ==8926== by 0x41655E6: terminate_slave_threads(Master_info*, int, unsigned long, bool) (rpl_slave.cc:1571) ==8926== by 0x4166BB5: end_slave() (rpl_slave.cc:1960) ==8926== by 0x2E635E8: close_connections() (mysqld.cc:1813) ==8926== by 0x2E6695F: signal_hand (mysqld.cc:2936) ==8926== by 0x4C0E429: pfs_spawn_thread (pfs.cc:2836) ==8926== by 0x7BF86B9: start_thread (pthread_create.c:333) ==8926== by 0x989741C: clone (clone.S:109) ==8926== Address 0x44846580 is 32 bytes inside a block of size 2,576 free'd ==8926== at 0x79E5DBB: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==8926== by 0x4523871: my_raw_free(void*) (my_malloc.cc:281) ==8926== by 0x45236FE: my_free(void*) (my_malloc.cc:153) ==8926== by 0x2F3B71C: intern_close_table(TABLE*) (sql_base.cc:1096) ==8926== by 0x2F5506B: Table_cache::free_unused_tables_if_necessary(THD*) (table_cache.h:323) ==8926== by 0x2F558B8: Table_cache::release_table(THD*, TABLE*) (table_cache.h:518) ==8926== by 0x2F3CA9A: release_or_close_table(THD*, TABLE*) (sql_base.cc:1707) ==8926== by 0x2F3CCC3: close_thread_table(THD*, TABLE**) (sql_base.cc:1744) ==8926== by 0x2F3C184: close_open_tables(THD*) (sql_base.cc:1393) ==8926== by 0x2F3C990: close_thread_tables(THD*) (sql_base.cc:1686) ==8926== by 0x4150EB0: System_table_access::open_table(THD*, MYSQL_LEX_STRING, MYSQL_LEX_STRING, unsigned int, thr_lock_type, TABLE**, Open_tables_backup*) (rpl_table_access.cc:89) ==8926== by 0x41BC0F8: Rpl_info_table::do_flush_info(bool) (rpl_info_table.cc:193) ==8926== by 0x4189A55: Rpl_info_handler::flush_info(bool) (rpl_info_handler.h:97) ==8926== by 0x4190E0E: Relay_log_info::flush_info(bool) (rpl_rli.cc:1848) ==8926== by 0x41655E6: terminate_slave_threads(Master_info*, int, unsigned long, bool) (rpl_slave.cc:1571) ==8926== by 0x4166BB5: end_slave() (rpl_slave.cc:1960) ==8926== by 0x2E635E8: close_connections() (mysqld.cc:1813) ==8926== by 0x2E6695F: signal_hand (mysqld.cc:2936) ==8926== by 0x4C0E429: pfs_spawn_thread (pfs.cc:2836) ==8926== by 0x7BF86B9: start_thread (pthread_create.c:333) ==8926== by 0x989741C: clone (clone.S:109) ==8926== Block was alloc'd at ==8926== at 0x79E4B8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==8926== by 0x452374E: my_raw_malloc(unsigned long, int) (my_malloc.cc:199) ==8926== by 0x45233A6: my_malloc(unsigned int, unsigned long, int) (my_malloc.cc:81) ==8926== by 0x2F40E92: open_table(THD*, TABLE_LIST*, Open_table_context*) (sql_base.cc:3334) ==8926== by 0x2F44BB4: open_and_process_table(THD*, LEX*, TABLE_LIST*, unsigned int*, Prelocking_strategy*, bool, Open_table_context*) (sql_base.cc:5004) ==8926== by 0x2F4616E: open_tables(THD*, TABLE_LIST**, unsigned int*, unsigned int, Prelocking_strategy*) (sql_base.cc:5649) ==8926== by 0x2F476E4: open_and_lock_tables(THD*, TABLE_LIST*, unsigned int, Prelocking_strategy*) (sql_base.cc:6379) ==8926== by 0x2F4719E: open_n_lock_single_table(THD*, TABLE_LIST*, thr_lock_type, unsigned int, Prelocking_strategy*) (sql_base.cc:6234) ==8926== by 0x30F3F94: open_n_lock_single_table(THD*, TABLE_LIST*, thr_lock_type, unsigned int) (sql_base.h:456) ==8926== by 0x4150CD7: System_table_access::open_table(THD*, MYSQL_LEX_STRING, MYSQL_LEX_STRING, unsigned int, thr_lock_type, TABLE**, Open_tables_backup*) (rpl_table_access.cc:70) ==8926== by 0x41BC0F8: Rpl_info_table::do_flush_info(bool) (rpl_info_table.cc:193) ==8926== by 0x4189A55: Rpl_info_handler::flush_info(bool) (rpl_info_handler.h:97) ==8926== by 0x4190E0E: Relay_log_info::flush_info(bool) (rpl_rli.cc:1848) ==8926== by 0x41655E6: terminate_slave_threads(Master_info*, int, unsigned long, bool) (rpl_slave.cc:1571) ==8926== by 0x4166BB5: end_slave() (rpl_slave.cc:1960) ==8926== by 0x2E635E8: close_connections() (mysqld.cc:1813) ==8926== by 0x2E6695F: signal_hand (mysqld.cc:2936) ==8926== by 0x4C0E429: pfs_spawn_thread (pfs.cc:2836) ==8926== by 0x7BF86B9: start_thread (pthread_create.c:333) ==8926== by 0x989741C: clone (clone.S:109) ==8926== ==8926== Invalid read of size 8 ==8926== at 0x4150F12: System_table_access::open_table(THD*, MYSQL_LEX_STRING, MYSQL_LEX_STRING, unsigned int, thr_lock_type, TABLE**, Open_tables_backup*) (rpl_table_access.cc:93) ==8926== by 0x41BC0F8: Rpl_info_table::do_flush_info(bool) (rpl_info_table.cc:193) ==8926== by 0x4189A55: Rpl_info_handler::flush_info(bool) (rpl_info_handler.h:97) ==8926== by 0x4190E0E: Relay_log_info::flush_info(bool) (rpl_rli.cc:1848) ==8926== by 0x41655E6: terminate_slave_threads(Master_info*, int, unsigned long, bool) (rpl_slave.cc:1571) ==8926== by 0x4166BB5: end_slave() (rpl_slave.cc:1960) ==8926== by 0x2E635E8: close_connections() (mysqld.cc:1813) ==8926== by 0x2E6695F: signal_hand (mysqld.cc:2936) ==8926== by 0x4C0E429: pfs_spawn_thread (pfs.cc:2836) ==8926== by 0x7BF86B9: start_thread (pthread_create.c:333) ==8926== by 0x989741C: clone (clone.S:109) ==8926== Address 0x44846580 is 32 bytes inside a block of size 2,576 free'd ==8926== at 0x79E5DBB: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==8926== by 0x4523871: my_raw_free(void*) (my_malloc.cc:281) ==8926== by 0x45236FE: my_free(void*) (my_malloc.cc:153) ==8926== by 0x2F3B71C: intern_close_table(TABLE*) (sql_base.cc:1096) ==8926== by 0x2F5506B: Table_cache::free_unused_tables_if_necessary(THD*) (table_cache.h:323) ==8926== by 0x2F558B8: Table_cache::release_table(THD*, TABLE*) (table_cache.h:518) ==8926== by 0x2F3CA9A: release_or_close_table(THD*, TABLE*) (sql_base.cc:1707) ==8926== by 0x2F3CCC3: close_thread_table(THD*, TABLE**) (sql_base.cc:1744) ==8926== by 0x2F3C184: close_open_tables(THD*) (sql_base.cc:1393) ==8926== by 0x2F3C990: close_thread_tables(THD*) (sql_base.cc:1686) ==8926== by 0x4150EB0: System_table_access::open_table(THD*, MYSQL_LEX_STRING, MYSQL_LEX_STRING, unsigned int, thr_lock_type, TABLE**, Open_tables_backup*) (rpl_table_access.cc:89) ==8926== by 0x41BC0F8: Rpl_info_table::do_flush_info(bool) (rpl_info_table.cc:193) ==8926== by 0x4189A55: Rpl_info_handler::flush_info(bool) (rpl_info_handler.h:97) ==8926== by 0x4190E0E: Relay_log_info::flush_info(bool) (rpl_rli.cc:1848) ==8926== by 0x41655E6: terminate_slave_threads(Master_info*, int, unsigned long, bool) (rpl_slave.cc:1571) ==8926== by 0x4166BB5: end_slave() (rpl_slave.cc:1960) ==8926== by 0x2E635E8: close_connections() (mysqld.cc:1813) ==8926== by 0x2E6695F: signal_hand (mysqld.cc:2936) ==8926== by 0x4C0E429: pfs_spawn_thread (pfs.cc:2836) ==8926== by 0x7BF86B9: start_thread (pthread_create.c:333) ==8926== by 0x989741C: clone (clone.S:109) ==8926== Block was alloc'd at ==8926== at 0x79E4B8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==8926== by 0x452374E: my_raw_malloc(unsigned long, int) (my_malloc.cc:199) ==8926== by 0x45233A6: my_malloc(unsigned int, unsigned long, int) (my_malloc.cc:81) ==8926== by 0x2F40E92: open_table(THD*, TABLE_LIST*, Open_table_context*) (sql_base.cc:3334) ==8926== by 0x2F44BB4: open_and_process_table(THD*, LEX*, TABLE_LIST*, unsigned int*, Prelocking_strategy*, bool, Open_table_context*) (sql_base.cc:5004) ==8926== by 0x2F4616E: open_tables(THD*, TABLE_LIST**, unsigned int*, unsigned int, Prelocking_strategy*) (sql_base.cc:5649) ==8926== by 0x2F476E4: open_and_lock_tables(THD*, TABLE_LIST*, unsigned int, Prelocking_strategy*) (sql_base.cc:6379) ==8926== by 0x2F4719E: open_n_lock_single_table(THD*, TABLE_LIST*, thr_lock_type, unsigned int, Prelocking_strategy*) (sql_base.cc:6234) ==8926== by 0x30F3F94: open_n_lock_single_table(THD*, TABLE_LIST*, thr_lock_type, unsigned int) (sql_base.h:456) ==8926== by 0x4150CD7: System_table_access::open_table(THD*, MYSQL_LEX_STRING, MYSQL_LEX_STRING, unsigned int, thr_lock_type, TABLE**, Open_tables_backup*) (rpl_table_access.cc:70) ==8926== by 0x41BC0F8: Rpl_info_table::do_flush_info(bool) (rpl_info_table.cc:193) ==8926== by 0x4189A55: Rpl_info_handler::flush_info(bool) (rpl_info_handler.h:97) ==8926== by 0x4190E0E: Relay_log_info::flush_info(bool) (rpl_rli.cc:1848) ==8926== by 0x41655E6: terminate_slave_threads(Master_info*, int, unsigned long, bool) (rpl_slave.cc:1571) ==8926== by 0x4166BB5: end_slave() (rpl_slave.cc:1960) ==8926== by 0x2E635E8: close_connections() (mysqld.cc:1813) ==8926== by 0x2E6695F: signal_hand (mysqld.cc:2936) ==8926== by 0x4C0E429: pfs_spawn_thread (pfs.cc:2836) ==8926== by 0x7BF86B9: start_thread (pthread_create.c:333) ==8926== by 0x989741C: clone (clone.S:109) ==8926== ramesh@qaserver-06:/qa/binaries$ ==8926== ==8926== HEAP SUMMARY: ==8926== in use at exit: 72,832 bytes in 3 blocks ==8926== total heap usage: 393,565 allocs, 393,562 frees, 532,235,602 bytes allocated ==8926== ==8926== LEAK SUMMARY: ==8926== definitely lost: 0 bytes in 0 blocks ==8926== indirectly lost: 0 bytes in 0 blocks ==8926== possibly lost: 0 bytes in 0 blocks ==8926== still reachable: 0 bytes in 0 blocks ==8926== suppressed: 72,832 bytes in 3 blocks ==8926== ==8926== For counts of detected and suppressed errors, rerun with: -v ==8926== ERROR SUMMARY: 3 errors from 3 contexts (suppressed: 0 from 0)