Comment 2 for bug 438434

Revision history for this message
Brian Aker (brianaker) wrote : Re: [Bug 438434] Re: Valgrind errors - tree_or

Hi!

Just run this:
./test-run --valgrind innodb

Then look at the master.err file.

I suspect the problem is a missed conversion to vector that should
have never happened.

Cheers,
    -Brian

On Nov 5, 2009, at 8:35 AM, Jay Pipes wrote:

> What branch is this on? The line numbers in the backtrace certainly
> don't match the code in trunk, so this is very difficult to follow...
>
> --
> Valgrind errors - tree_or
> https://bugs.launchpad.net/bugs/438434
> You received this bug notification because you are a member of
> Drizzle-
> developers, which is subscribed to Drizzle.
>
> Status in A Lightweight SQL Database for Cloud and Web: Confirmed
>
> Bug description:
> innodb.test
> ==11906== 128 bytes in 16 blocks are definitely lost in loss record
> 6 of 13
> ==11906== at 0x4A06FFC: operator new(unsigned long)
> (vg_replace_malloc.c:230)
> ==11906== by 0x4D0FE4: void std::vector<SEL_IMERGE*,
> std::allocator<SEL_IMERGE*> >::_M_insert_aux<SEL_IMERGE* const&>
> (__gnu_cxx::__normal_iterator<SEL_IMERGE**, std::vector<SEL_IMERGE*,
> std::allocator<SEL_IMERGE*> > >, SEL_IMERGE* const&&&)
> (new_allocator.h:89)
> ==11906== by 0x4CB9CF: tree_or(RANGE_OPT_PARAM*, SEL_TREE*,
> SEL_TREE*) (stl_vector.h:741)
> ==11906== by 0x4CF6D5: get_mm_tree(RANGE_OPT_PARAM*, Item*)
> (opt_range.cc:4172)
> ==11906== by 0x4D005F: SQL_SELECT::test_quick_select(Session*,
> std::bitset<72ul>, unsigned long, unsigned long, bool, bool)
> (opt_range.cc:2304)
> ==11906== by 0x51DFD7: get_quick_record_count(Session*,
> SQL_SELECT*, Table*, std::bitset<72ul> const*, unsigned long)
> (sql_select.cc:483)
> ==11906== by 0x4AD335: make_join_statistics(JOIN*, TableList*,
> Item*, st_dynamic_array*) (join.cc:5869)
> ==11906== by 0x4AE8DE: JOIN::optimize() (join.cc:536)
> ==11906== by 0x51E0B9: mysql_select(Session*, Item***,
> TableList*, unsigned int, List<Item>&, Item*, unsigned int,
> order_st*, order_st*, Item*, unsigned long, select_result*,
> Select_Lex_Unit*, Select_Lex*) (sql_select.cc:420)
> ==11906== by 0x51EA6E: mysql_explain_union(Session*,
> Select_Lex_Unit*, select_result*) (sql_select.cc:7043)
> ==11906== by 0x516216: execute_sqlcom_select(Session*,
> TableList*) (sql_parse.cc:538)
> ==11906== by 0x513845: mysql_execute_command(Session*)
> (sql_parse.cc:495)
> ==11906== by 0x51456D: mysql_parse(Session*, char const*,
> unsigned int, char const**) (sql_parse.cc:783)
> ==11906== by 0x514EB0: dispatch_command(enum_server_command,
> Session*, char*, unsigned int) (sql_parse.cc:217)
> ==11906== by 0x4DD68E: Session::executeStatement() (session.cc:728)
> ==11906== by 0x4DE626: Session::run() (session.cc:600)
>
> innodb_notembedded
> ==19571== 32 bytes in 4 blocks are definitely lost in loss record 3
> of 10
> ==19571== at 0x4A06FFC: operator new(unsigned long)
> (vg_replace_malloc.c:230)
> ==19571== by 0x4D0FE4: void std::vector<SEL_IMERGE*,
> std::allocator<SEL_IMERGE*> >::_M_insert_aux<SEL_IMERGE* const&>
> (__gnu_cxx::__normal_iterator<SEL_IMERGE**, std::vector<SEL_IMERGE*,
> std::allocator<SEL_IMERGE*> > >, SEL_IMERGE* const&&&)
> (new_allocator.h:89)
> ==19571== by 0x4CB9CF: tree_or(RANGE_OPT_PARAM*, SEL_TREE*,
> SEL_TREE*) (stl_vector.h:741)
> ==19571== by 0x4CF6D5: get_mm_tree(RANGE_OPT_PARAM*, Item*)
> (opt_range.cc:4172)
> ==19571== by 0x4D005F: SQL_SELECT::test_quick_select(Session*,
> std::bitset<72ul>, unsigned long, unsigned long, bool, bool)
> (opt_range.cc:2304)
> ==19571== by 0x51DFD7: get_quick_record_count(Session*,
> SQL_SELECT*, Table*, std::bitset<72ul> const*, unsigned long)
> (sql_select.cc:483)
> ==19571== by 0x4AD335: make_join_statistics(JOIN*, TableList*,
> Item*, st_dynamic_array*) (join.cc:5869)
> ==19571== by 0x4AE8DE: JOIN::optimize() (join.cc:536)
> ==19571== by 0x51E0B9: mysql_select(Session*, Item***,
> TableList*, unsigned int, List<Item>&, Item*, unsigned int,
> order_st*, order_st*, Item*, unsigned long, select_result*,
> Select_Lex_Unit*, Select_Lex*) (sql_select.cc:420)
> ==19571== by 0x51EA6E: mysql_explain_union(Session*,
> Select_Lex_Unit*, select_result*) (sql_select.cc:7043)
> ==19571== by 0x516216: execute_sqlcom_select(Session*,
> TableList*) (sql_parse.cc:538)
> ==19571== by 0x513845: mysql_execute_command(Session*)
> (sql_parse.cc:495)
> ==19571== by 0x51456D: mysql_parse(Session*, char const*,
> unsigned int, char const**) (sql_parse.cc:783)
> ==19571== by 0x514EB0: dispatch_command(enum_server_command,
> Session*, char*, unsigned int) (sql_parse.cc:217)
> ==19571== by 0x4DD68E: Session::executeStatement() (session.cc:728)
> ==19571== by 0x4DE626: Session::run() (session.cc:600)
>
> sum_distinct
> ==24130== 96 (88 direct, 8 indirect) bytes in 11 blocks are
> definitely lost in loss record 8 of 15
> ==24130== at 0x4A06FFC: operator new(unsigned long)
> (vg_replace_malloc.c:230)
> ==24130== by 0x4D0FE4: void std::vector<SEL_IMERGE*,
> std::allocator<SEL_IMERGE*> >::_M_insert_aux<SEL_IMERGE* const&>
> (__gnu_cxx::__normal_iterator<SEL_IMERGE**, std::vector<SEL_IMERGE*,
> std::allocator<SEL_IMERGE*> > >, SEL_IMERGE* const&&&)
> (new_allocator.h:89)
> ==24130== by 0x4CB9CF: tree_or(RANGE_OPT_PARAM*, SEL_TREE*,
> SEL_TREE*) (stl_vector.h:741)
> ==24130== by 0x4CF6D5: get_mm_tree(RANGE_OPT_PARAM*, Item*)
> (opt_range.cc:4172)
> ==24130== by 0x4D005F: SQL_SELECT::test_quick_select(Session*,
> std::bitset<72ul>, unsigned long, unsigned long, bool, bool)
> (opt_range.cc:2304)
> ==24130== by 0x51DFD7: get_quick_record_count(Session*,
> SQL_SELECT*, Table*, std::bitset<72ul> const*, unsigned long)
> (sql_select.cc:483)
> ==24130== by 0x4AD335: make_join_statistics(JOIN*, TableList*,
> Item*, st_dynamic_array*) (join.cc:5869)
> ==24130== by 0x4AE8DE: JOIN::optimize() (join.cc:536)
> ==24130== by 0x51E0B9: mysql_select(Session*, Item***,
> TableList*, unsigned int, List<Item>&, Item*, unsigned int,
> order_st*, order_st*, Item*, unsigned long, select_result*,
> Select_Lex_Unit*, Select_Lex*) (sql_select.cc:420)
> ==24130== by 0x51EA6E: mysql_explain_union(Session*,
> Select_Lex_Unit*, select_result*) (sql_select.cc:7043)
> ==24130== by 0x516216: execute_sqlcom_select(Session*,
> TableList*) (sql_parse.cc:538)
> ==24130== by 0x513845: mysql_execute_command(Session*)
> (sql_parse.cc:495)
> ==24130== by 0x51456D: mysql_parse(Session*, char const*,
> unsigned int, char const**) (sql_parse.cc:783)
> ==24130== by 0x514EB0: dispatch_command(enum_server_command,
> Session*, char*, unsigned int) (sql_parse.cc:217)
> ==24130== by 0x4DD68E: Session::executeStatement() (session.cc:728)
> ==24130== by 0x4DE626: Session::run() (session.cc:600)