Description:
The patch for
Bug#21672747 ADD MTR OPTION TO RUN ALL CLIENT APPLICATIONS WITH VALGRIND
introduced a new --valgrind-clients option for mtr.
It shows huge memory leaks in mysqlpump.
==19877== 1,138,656 (4,368 direct, 1,134,288 indirect) bytes in 91 blocks are definitely lost in loss record 328 of 328
==19877== at 0x4C27965: operator new(unsigned long) (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==19877== by 0x44814B: Mysql::Tools::Dump::Abstract_chain_element::task_to_be_processed_in_child(Mysql::Tools::Dump::Item_processing_data*, Mysql::Tools::Dump::I_chain_element*, Mysql::Tools::Dump::I_dump_task*, Mysql::Instance_callback<void, Mysql::Tools::Dump::Item_processing_data*, Mysql::Tools::Dump::Abstract_chain_element>*) (abstract_chain_element.cc:164)
==19877== by 0x447D6C: Mysql::Tools::Dump::Abstract_chain_element::object_to_be_processed_in_child(Mysql::Tools::Dump::Item_processing_data*, Mysql::Tools::Dump::I_chain_element*) (abstract_chain_element.cc:58)
==19877== by 0x45AA34: Mysql::Tools::Dump::Abstract_data_formatter_wrapper::format_object(Mysql::Tools::Dump::Item_processing_data*) (abstract_data_formatter_wrapper.cc:29)
==19877== by 0x4575FA: Mysql::Tools::Dump::Mysql_object_reader::read_object(Mysql::Tools::Dump::Item_processing_data*) (mysql_object_reader.cc:110)
==19877== by 0x44EF25: Mysql::Tools::Dump::Abstract_object_reader_wrapper::format_object(Mysql::Tools::Dump::Item_processing_data*) (abstract_object_reader_wrapper.cc:29)
==19877== by 0x436025: Mysql::Tools::Dump::Object_queue::queue_thread() (object_queue.cc:70)
==19877== by 0x43BD74: boost::_mfi::mf0<void, Mysql::Tools::Dump::Object_queue>::operator()(Mysql::Tools::Dump::Object_queue*) const (mem_fn_template.hpp:49)
==19877== by 0x43B97D: void boost::_bi::list1<boost::_bi::value<Mysql::Tools::Dump::Object_queue*> >::operator()<boost::_mfi::mf0<void, Mysql::Tools::Dump::Object_queue>, boost::_bi::list0>(boost::_bi::type<void>, boost::_mfi::mf0<void, Mysql::Tools::Dump::Object_queue>&, boost::_bi::list0&, int) (bind.hpp:253)
==19877== by 0x43B306: boost::_bi::bind_t<void, boost::_mfi::mf0<void, Mysql::Tools::Dump::Object_queue>, boost::_bi::list1<boost::_bi::value<Mysql::Tools::Dump::Object_queue*> > >::operator()() (bind_template.hpp:20)
==19877== by 0x43A816: my_boost::thread::context<boost::_bi::bind_t<void, boost::_mfi::mf0<void, Mysql::Tools::Dump::Object_queue>, boost::_bi::list1<boost::_bi::value<Mysql::Tools::Dump::Object_queue*> > > >::entry_point(void*) (thread.h:55)
==19877== by 0x4E38F32: start_thread (in /usr/lib64/libpthread-2.18.so)
==19877== by 0x5D73DEC: clone (in /usr/lib64/libc-2.18.so)
==19877==
mysqltest: At line 13: command "$MYSQL_PUMP --default-parallelism=1 --parallel-schemas=3:db1,db2 --parallel-schemas=5:db3,bd1_1gb --databases db1 db2 db3 db1_1gb > $MYSQLTEST_VARDIR/tmp/full_bkp.sql" failed
How to repeat:
In current trunk:
./mtr --mem --valgrind-clients main.mysqlpump --big-test