<?xml version="1.0" encoding="utf-8"?>
<launchpad-bug id="635691">
  <date_last_updated>2010-10-22 11:57:42.051929+00:00</date_last_updated>
  <api_links>
    <bug_api_link>https://api.launchpad.net/1.0/bugs/635691</bug_api_link>
    <bug_owner_link>https://api.launchpad.net/1.0/~pstoev-askmonty</bug_owner_link>
    <milestone_link>https://api.launchpad.net/1.0/maria/+milestone/5.2</milestone_link>
    <linked_branches_collection_link>https://api.launchpad.net/1.0/bugs/635691/linked_branches</linked_branches_collection_link>
    <activity_link>https://api.launchpad.net/1.0/bugs/635691/activity</activity_link>
  </api_links>
  <bug_web_link>https://bugs.launchpad.net/bugs/635691</bug_web_link>
  <owner>Philip Stoev</owner>
  <assignee>Antony T Curtis</assignee>
  <milestone_title>Maria 5.2</milestone_title>
  <duplicate_link></duplicate_link>
  <duplicate_bug_id></duplicate_bug_id>
  <title>Misc valgrind warnings when running a Random Query Generator test</title>
  <status>Opinion</status>
  <importance>Critical</importance>
  <created>2010-10-22 11:57:13.337937+00:00</created>
  <description>
<![CDATA[When running a RQG test under valgrind against Maria 5.2, the following valgrind warnings were reported:

==6713== Conditional jump or move depends on uninitialised value(s)
==6713==    at 0x4E3427E: open_query::oqgraph::modify_edge(open_query::oqgraph::current_row_st, unsigned long long*, unsigned long long*, double*, bool) (graphcore.cc:648)
==6713==    by 0x4E2C47D: ha_oqgraph::update_row(unsigned char const*, unsigned char*) (ha_oqgraph.cc:545)
==6713==    by 0x83AA698: handler::ha_update_row(unsigned char const*, unsigned char*) (handler.cc:4869)
==6713==    by 0x832D9B5: mysql_update(THD*, TABLE_LIST*, List<Item>&, List<Item>&, Item*, unsigned int, st_order*, unsigned long long, enum_duplicates, bool) (sql_update.cc:652)
==6713==    by 0x8282B3C: mysql_execute_command(THD*) (sql_parse.cc:3120)
==6713==    by 0x828BB46: mysql_parse(THD*, char const*, unsigned int, char const**) (sql_parse.cc:6055)
==6713==    by 0x827DCA6: dispatch_command(enum_server_command, THD*, char*, unsigned int) (sql_parse.cc:1204)
==6713==    by 0x827D102: do_command(THD*) (sql_parse.cc:898)
==6713==    by 0x827A1EB: handle_one_connection (sql_connect.cc:1154)
==6713==    by 0xBEA918: start_thread (in /lib/libpthread-2.12.so)
==6713==    by 0xB2CCBD: clone (in /lib/libc-2.12.so)
==6713==
==6713== Conditional jump or move depends on uninitialised value(s)
==6713==    at 0x4E34732: open_query::oqgraph::insert_edge(unsigned long long, unsigned long long, double, bool) (graphcore.cc:558)
==6713==    by 0x4E2BE63: ha_oqgraph::write_row(unsigned char*) (ha_oqgraph.cc:463)
==6713==    by 0x83AA526: handler::ha_write_row(unsigned char*) (handler.cc:4846)
==6713==    by 0x8318C31: write_record(THD*, st_table*, st_copy_info*) (sql_insert.cc:1638)
==6713==    by 0x831CE56: select_insert::send_data(List<Item>&) (sql_insert.cc:3223)
==6713==    by 0x8305EC2: end_send(JOIN*, st_join_table*, bool) (sql_select.cc:12612)
==6713==    by 0x83040C7: evaluate_join_record(JOIN*, st_join_table*, int) (sql_select.cc:11788)
==6713==    by 0x8303D4A: sub_select(JOIN*, st_join_table*, bool) (sql_select.cc:11660)
==6713==    by 0x83038AA: do_select(JOIN*, List<Item>*, st_table*, Procedure*) (sql_select.cc:11416)
==6713==    by 0x82ECB8F: JOIN::exec() (sql_select.cc:2328)
==6713==    by 0x82ED2AC: mysql_select(THD*, Item***, TABLE_LIST*, unsigned int, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, unsigned long long, select_result*, st_select_lex_unit*, st_select_lex*) (sql_select.cc:2528)
==6713==    by 0x82E5B40: handle_select(THD*, st_lex*, select_result*, unsigned long) (sql_select.cc:280)
==6713==    by 0x82833D6: mysql_execute_command(THD*) (sql_parse.cc:3290)
==6713==    by 0x828BB46: mysql_parse(THD*, char const*, unsigned int, char const**) (sql_parse.cc:6055)
==6713==    by 0x827DCA6: dispatch_command(enum_server_command, THD*, char*, unsigned int) (sql_parse.cc:1204)
==6713==    by 0x827D102: do_command(THD*) (sql_parse.cc:898)
==6713==
==6713== Conditional jump or move depends on uninitialised value(s)
==6713==    at 0x4E2BEC3: ha_oqgraph::write_row(unsigned char*) (ha_oqgraph.cc:468)
==6713==    by 0x83AA526: handler::ha_write_row(unsigned char*) (handler.cc:4846)
==6713==    by 0x8318C31: write_record(THD*, st_table*, st_copy_info*) (sql_insert.cc:1638)
==6713==    by 0x831CE56: select_insert::send_data(List<Item>&) (sql_insert.cc:3223)
==6713==    by 0x8305EC2: end_send(JOIN*, st_join_table*, bool) (sql_select.cc:12612)
==6713==    by 0x83040C7: evaluate_join_record(JOIN*, st_join_table*, int) (sql_select.cc:11788)
==6713==    by 0x8303D4A: sub_select(JOIN*, st_join_table*, bool) (sql_select.cc:11660)
==6713==    by 0x83038AA: do_select(JOIN*, List<Item>*, st_table*, Procedure*) (sql_select.cc:11416)
==6713==    by 0x82ECB8F: JOIN::exec() (sql_select.cc:2328)
==6713==    by 0x82ED2AC: mysql_select(THD*, Item***, TABLE_LIST*, unsigned int, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, unsigned long long, select_result*, st_select_lex_unit*, st_select_lex*) (sql_select.cc:2528)
==6713==    by 0x82E5B40: handle_select(THD*, st_lex*, select_result*, unsigned long) (sql_select.cc:280)
==6713==    by 0x82833D6: mysql_execute_command(THD*) (sql_parse.cc:3290)
==6713==    by 0x828BB46: mysql_parse(THD*, char const*, unsigned int, char const**) (sql_parse.cc:6055)
==6713==    by 0x827DCA6: dispatch_command(enum_server_command, THD*, char*, unsigned int) (sql_parse.cc:1204)
==6713==    by 0x827D102: do_command(THD*) (sql_parse.cc:898)
==6713==    by 0x827A1EB: handle_one_connection (sql_connect.cc:1154)

bzr version-info:
revision-id: <email address hidden>
date: 2010-08-26 16:20:27 +0300
build-date: 2010-09-11 14:52:18 +0300
revno: 2849
branch-nick: maria-5.2


The test case will be uploaded shortly]]>  </description>
  <activities>
    <activity datechanged="2010-09-11T11:52:37.178988+00:00">
      <oldvalue>
<![CDATA[]]>      </oldvalue>
      <newvalue>
<![CDATA[]]>      </newvalue>
      <whatchanged>bug</whatchanged>
      <person>Philip Stoev</person>
      <message>added bug</message>
    </activity>
    <activity datechanged="2010-09-11T11:56:29.104113+00:00">
      <oldvalue>
<![CDATA[]]>      </oldvalue>
      <newvalue>
<![CDATA[valgrind log https://bugs.launchpad.net/oqgraph/+bug/635691/+attachment/1570378/+files/bug635691-log.zip]]>      </newvalue>
      <whatchanged>attachment added</whatchanged>
      <person>Philip Stoev</person>
      <message></message>
    </activity>
    <activity datechanged="2010-09-11T11:58:51.264450+00:00">
      <oldvalue>
<![CDATA[]]>      </oldvalue>
      <newvalue>
<![CDATA[Init file for oqgraph https://bugs.launchpad.net/oqgraph/+bug/635691/+attachment/1570380/+files/bug635691.init]]>      </newvalue>
      <whatchanged>attachment added</whatchanged>
      <person>Philip Stoev</person>
      <message></message>
    </activity>
    <activity datechanged="2010-09-11T12:02:07.447634+00:00">
      <oldvalue>
<![CDATA[]]>      </oldvalue>
      <newvalue>
<![CDATA[RQG grammar file https://bugs.launchpad.net/oqgraph/+bug/635691/+attachment/1570406/+files/bug635691.yy]]>      </newvalue>
      <whatchanged>attachment added</whatchanged>
      <person>Philip Stoev</person>
      <message></message>
    </activity>
    <activity datechanged="2010-10-22T11:56:36.879404+00:00">
      <oldvalue>
<![CDATA[Undecided]]>      </oldvalue>
      <newvalue>
<![CDATA[Critical]]>      </newvalue>
      <whatchanged>oqgraph: importance</whatchanged>
      <person>Arjen Lentz</person>
      <message></message>
    </activity>
    <activity datechanged="2010-10-22T11:56:42.161268+00:00">
      <oldvalue>
<![CDATA[New]]>      </oldvalue>
      <newvalue>
<![CDATA[Opinion]]>      </newvalue>
      <whatchanged>oqgraph: status</whatchanged>
      <person>Arjen Lentz</person>
      <message></message>
    </activity>
    <activity datechanged="2010-10-22T11:56:53.552233+00:00">
      <oldvalue>
<![CDATA[]]>      </oldvalue>
      <newvalue>
<![CDATA[Antony T Curtis (atcurtis)]]>      </newvalue>
      <whatchanged>oqgraph: assignee</whatchanged>
      <person>Arjen Lentz</person>
      <message></message>
    </activity>
    <activity datechanged="2010-10-22T11:56:56.741803+00:00">
      <oldvalue>
<![CDATA[]]>      </oldvalue>
      <newvalue>
<![CDATA[]]>      </newvalue>
      <whatchanged>bug</whatchanged>
      <person>Arjen Lentz</person>
      <message>added subscriber Arjen Lentz</message>
    </activity>
    <activity datechanged="2010-10-22T11:57:13.337937+00:00">
      <oldvalue>
<![CDATA[]]>      </oldvalue>
      <newvalue>
<![CDATA[maria]]>      </newvalue>
      <whatchanged>bug task added</whatchanged>
      <person>Arjen Lentz</person>
      <message></message>
    </activity>
    <activity datechanged="2010-10-22T11:57:23.306136+00:00">
      <oldvalue>
<![CDATA[New]]>      </oldvalue>
      <newvalue>
<![CDATA[Opinion]]>      </newvalue>
      <whatchanged>maria: status</whatchanged>
      <person>Arjen Lentz</person>
      <message></message>
    </activity>
    <activity datechanged="2010-10-22T11:57:30.866637+00:00">
      <oldvalue>
<![CDATA[Undecided]]>      </oldvalue>
      <newvalue>
<![CDATA[Critical]]>      </newvalue>
      <whatchanged>maria: importance</whatchanged>
      <person>Arjen Lentz</person>
      <message></message>
    </activity>
    <activity datechanged="2010-10-22T11:57:38.976846+00:00">
      <oldvalue>
<![CDATA[]]>      </oldvalue>
      <newvalue>
<![CDATA[Antony T Curtis (atcurtis)]]>      </newvalue>
      <whatchanged>maria: assignee</whatchanged>
      <person>Arjen Lentz</person>
      <message></message>
    </activity>
    <activity datechanged="2010-10-22T11:57:41.105270+00:00">
      <oldvalue>
<![CDATA[]]>      </oldvalue>
      <newvalue>
<![CDATA[5.2]]>      </newvalue>
      <whatchanged>maria: milestone</whatchanged>
      <person>Arjen Lentz</person>
      <message></message>
    </activity>
  </activities>
  <comments>
    <comment commentlink="https://api.launchpad.net/1.0/oqgraph/+bug/635691/comments/0" datecreated="2010-09-11T11:52:37.178988+00:00">
      <person>Philip Stoev</person>
      <subject>
<![CDATA[Misc valgrind warnings when running a Random Query Generator test]]>      </subject>
      <content>
<![CDATA[When running a RQG test under valgrind against Maria 5.2, the following valgrind warnings were reported:

==6713== Conditional jump or move depends on uninitialised value(s)
==6713==    at 0x4E3427E: open_query::oqgraph::modify_edge(open_query::oqgraph::current_row_st, unsigned long long*, unsigned long long*, double*, bool) (graphcore.cc:648)
==6713==    by 0x4E2C47D: ha_oqgraph::update_row(unsigned char const*, unsigned char*) (ha_oqgraph.cc:545)
==6713==    by 0x83AA698: handler::ha_update_row(unsigned char const*, unsigned char*) (handler.cc:4869)
==6713==    by 0x832D9B5: mysql_update(THD*, TABLE_LIST*, List<Item>&, List<Item>&, Item*, unsigned int, st_order*, unsigned long long, enum_duplicates, bool) (sql_update.cc:652)
==6713==    by 0x8282B3C: mysql_execute_command(THD*) (sql_parse.cc:3120)
==6713==    by 0x828BB46: mysql_parse(THD*, char const*, unsigned int, char const**) (sql_parse.cc:6055)
==6713==    by 0x827DCA6: dispatch_command(enum_server_command, THD*, char*, unsigned int) (sql_parse.cc:1204)
==6713==    by 0x827D102: do_command(THD*) (sql_parse.cc:898)
==6713==    by 0x827A1EB: handle_one_connection (sql_connect.cc:1154)
==6713==    by 0xBEA918: start_thread (in /lib/libpthread-2.12.so)
==6713==    by 0xB2CCBD: clone (in /lib/libc-2.12.so)
==6713==
==6713== Conditional jump or move depends on uninitialised value(s)
==6713==    at 0x4E34732: open_query::oqgraph::insert_edge(unsigned long long, unsigned long long, double, bool) (graphcore.cc:558)
==6713==    by 0x4E2BE63: ha_oqgraph::write_row(unsigned char*) (ha_oqgraph.cc:463)
==6713==    by 0x83AA526: handler::ha_write_row(unsigned char*) (handler.cc:4846)
==6713==    by 0x8318C31: write_record(THD*, st_table*, st_copy_info*) (sql_insert.cc:1638)
==6713==    by 0x831CE56: select_insert::send_data(List<Item>&) (sql_insert.cc:3223)
==6713==    by 0x8305EC2: end_send(JOIN*, st_join_table*, bool) (sql_select.cc:12612)
==6713==    by 0x83040C7: evaluate_join_record(JOIN*, st_join_table*, int) (sql_select.cc:11788)
==6713==    by 0x8303D4A: sub_select(JOIN*, st_join_table*, bool) (sql_select.cc:11660)
==6713==    by 0x83038AA: do_select(JOIN*, List<Item>*, st_table*, Procedure*) (sql_select.cc:11416)
==6713==    by 0x82ECB8F: JOIN::exec() (sql_select.cc:2328)
==6713==    by 0x82ED2AC: mysql_select(THD*, Item***, TABLE_LIST*, unsigned int, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, unsigned long long, select_result*, st_select_lex_unit*, st_select_lex*) (sql_select.cc:2528)
==6713==    by 0x82E5B40: handle_select(THD*, st_lex*, select_result*, unsigned long) (sql_select.cc:280)
==6713==    by 0x82833D6: mysql_execute_command(THD*) (sql_parse.cc:3290)
==6713==    by 0x828BB46: mysql_parse(THD*, char const*, unsigned int, char const**) (sql_parse.cc:6055)
==6713==    by 0x827DCA6: dispatch_command(enum_server_command, THD*, char*, unsigned int) (sql_parse.cc:1204)
==6713==    by 0x827D102: do_command(THD*) (sql_parse.cc:898)
==6713==
==6713== Conditional jump or move depends on uninitialised value(s)
==6713==    at 0x4E2BEC3: ha_oqgraph::write_row(unsigned char*) (ha_oqgraph.cc:468)
==6713==    by 0x83AA526: handler::ha_write_row(unsigned char*) (handler.cc:4846)
==6713==    by 0x8318C31: write_record(THD*, st_table*, st_copy_info*) (sql_insert.cc:1638)
==6713==    by 0x831CE56: select_insert::send_data(List<Item>&) (sql_insert.cc:3223)
==6713==    by 0x8305EC2: end_send(JOIN*, st_join_table*, bool) (sql_select.cc:12612)
==6713==    by 0x83040C7: evaluate_join_record(JOIN*, st_join_table*, int) (sql_select.cc:11788)
==6713==    by 0x8303D4A: sub_select(JOIN*, st_join_table*, bool) (sql_select.cc:11660)
==6713==    by 0x83038AA: do_select(JOIN*, List<Item>*, st_table*, Procedure*) (sql_select.cc:11416)
==6713==    by 0x82ECB8F: JOIN::exec() (sql_select.cc:2328)
==6713==    by 0x82ED2AC: mysql_select(THD*, Item***, TABLE_LIST*, unsigned int, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, unsigned long long, select_result*, st_select_lex_unit*, st_select_lex*) (sql_select.cc:2528)
==6713==    by 0x82E5B40: handle_select(THD*, st_lex*, select_result*, unsigned long) (sql_select.cc:280)
==6713==    by 0x82833D6: mysql_execute_command(THD*) (sql_parse.cc:3290)
==6713==    by 0x828BB46: mysql_parse(THD*, char const*, unsigned int, char const**) (sql_parse.cc:6055)
==6713==    by 0x827DCA6: dispatch_command(enum_server_command, THD*, char*, unsigned int) (sql_parse.cc:1204)
==6713==    by 0x827D102: do_command(THD*) (sql_parse.cc:898)
==6713==    by 0x827A1EB: handle_one_connection (sql_connect.cc:1154)

bzr version-info:
revision-id: monty@askmonty.org-20100826132027-p1m3gvi5f6yfcgdv
date: 2010-08-26 16:20:27 +0300
build-date: 2010-09-11 14:52:18 +0300
revno: 2849
branch-nick: maria-5.2


The test case will be uploaded shortly]]>      </content>
    </comment>
    <comment commentlink="https://api.launchpad.net/1.0/oqgraph/+bug/635691/comments/1" datecreated="2010-09-11T11:56:29.104113+00:00">
      <person>Philip Stoev</person>
      <subject>
<![CDATA[Re: Misc valgrind warnings when running a Random Query Generator test]]>      </subject>
      <content>
<![CDATA[Valgrind also reports various memory leaks.]]>      </content>
    </comment>
    <comment commentlink="https://api.launchpad.net/1.0/oqgraph/+bug/635691/comments/2" datecreated="2010-09-11T11:58:51.264450+00:00">
      <person>Philip Stoev</person>
      <subject>
<![CDATA[Re: Misc valgrind warnings when running a Random Query Generator test]]>      </subject>
      <content>
<![CDATA[]]>      </content>
    </comment>
    <comment commentlink="https://api.launchpad.net/1.0/oqgraph/+bug/635691/comments/3" datecreated="2010-09-11T12:02:07.447634+00:00">
      <person>Philip Stoev</person>
      <subject>
<![CDATA[Re: Misc valgrind warnings when running a Random Query Generator test]]>      </subject>
      <content>
<![CDATA[To reproduce, please obtain the Random Query Generator

bzr branch lp:randgen

and then run the following command line, tailored to your environment:

perl runall.pl \
--grammar=bug635691yy
--mysqld=--init-file=/home/philips/bzr/randgen-oqgraph/conf/oqgraph/bug635691.init
--basedir=/home/philips/bzr/maria-5.2/
--mysqld=--plugin-load=oqgraph_engine.so
--mysqld=--plugin-dir=/home/philips/bzr/maria-5.2/storage/oqgraph/.libs
--queries=10K
--valgrind
--threads=2

You can disregard any output from the test framework and instead directly monitor the server error log for valgrind warnings. You can interrupt the test with Ctrl+C and initiate a mysqld shutdown using the mysqladmin tool in order to observe the valgrind warnings that are printed when the server exists.

More information about the tool is available from http://forge.mysql.com/RandomQueryGenerator]]>      </content>
    </comment>
  </comments>
  <messages>
    <message created="2010-09-11 11:56:29.104113+00:00" owner="Philip Stoev">
<![CDATA[Valgrind also reports various memory leaks.]]>      <attachment link="https://bugs.launchpad.net/bugs/635691/+attachment/1570378" type="Unspecified">
        <title>valgrind log</title>
        <file>LPexportBug635691_bug635691-log.zip</file>
      </attachment>
    </message>
    <message created="2010-09-11 11:58:51.264450+00:00" owner="Philip Stoev">
<![CDATA[]]>      <attachment link="https://bugs.launchpad.net/bugs/635691/+attachment/1570380" type="Unspecified">
        <title>Init file for oqgraph</title>
        <file>LPexportBug635691_bug635691.init</file>
      </attachment>
    </message>
    <message created="2010-09-11 12:02:07.447634+00:00" owner="Philip Stoev">
<![CDATA[To reproduce, please obtain the Random Query Generator

bzr branch lp:randgen

and then run the following command line, tailored to your environment:

perl runall.pl \
--grammar=bug635691yy
--mysqld=--init-file=/home/philips/bzr/randgen-oqgraph/conf/oqgraph/bug635691.init
--basedir=/home/philips/bzr/maria-5.2/
--mysqld=--plugin-load=oqgraph_engine.so
--mysqld=--plugin-dir=/home/philips/bzr/maria-5.2/storage/oqgraph/.libs
--queries=10K
--valgrind
--threads=2

You can disregard any output from the test framework and instead directly monitor the server error log for valgrind warnings. You can interrupt the test with Ctrl+C and initiate a mysqld shutdown using the mysqladmin tool in order to observe the valgrind warnings that are printed when the server exists.

More information about the tool is available from http://forge.mysql.com/RandomQueryGenerator]]>      <attachment link="https://bugs.launchpad.net/bugs/635691/+attachment/1570406" type="Unspecified">
        <title>RQG grammar file</title>
        <file>LPexportBug635691_bug635691.yy</file>
      </attachment>
    </message>
  </messages>
</launchpad-bug>
