Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-2366

LP:482100 - Valgrind warning and garbled output from innodb_file_format_name_update()

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:

      Description

      Using this test case (simplified from innodb_xtradb_bug317074.test):

      -----------------------------------------------------------------------
      --source include/have_innodb.inc

      SET @old_innodb_file_format=@@innodb_file_format;
      SET @old_innodb_file_format_check=@@innodb_file_format_check;

      SET GLOBAL innodb_file_format=@old_innodb_file_format;
      SET GLOBAL innodb_file_format_check=@old_innodb_file_format_check;
      -----------------------------------------------------------------------

      perl mysql-test-run.pl --valgrind innodb-kn

      I get this warning and stack trace:

      ==27371== Conditional jump or move depends on uninitialised value(s)
      ==27371== at 0xA3D759: innobase_file_format_name_lookup(char const*) (ha_innodb.cc:9568)
      ==27371== by 0xA3D941: innodb_file_format_name_update(THD*, st_mysql_sys_var*, void*, void const*) (ha_innodb.cc:9710)
      ==27371== by 0x86B3D4: sys_var_pluginvar::update(THD*, set_var*) (sql_plugin.cc:2802)
      ==27371== by 0x6903DB: set_var::update(THD*) (set_var.cc:3674)
      ==27371== by 0x697535: sql_set_variables(THD*, List<set_var_base>*) (set_var.cc:3549)
      ==27371== by 0x687125: mysql_execute_command(THD*) (sql_parse.cc:3495)
      ==27371== by 0x68C1EC: mysql_parse(THD*, char const*, unsigned, char const**) (sql_parse.cc:5983)
      ==27371== by 0x68CFB1: dispatch_command(enum_server_command, THD*, char*, unsigned) (sql_parse.cc:1227)
      ==27371== by 0x68E398: do_command(THD*) (sql_parse.cc:866)
      ==27371== by 0x679FB2: handle_one_connection (sql_connect.cc:1130)
      ==27371== by 0x50463F6: start_thread (pthread_create.c:297)
      ==27371== by 0x6026B4C: clone (in /usr/lib/debug/libc-2.7.so)

      I also get a spurious warning due to reading garbage data in
      innobase_file_format_name_lookup().

      I found bug 461155, which may be related. But I checked the fix committed as
      rev. 112 of lp:~percona-dev/percona-xtradb/alignment-for-5.1.40. This fix
      seems to just rewrite the test cases, so I'm thinking that if it is related it
      just hides the problem rather than fix it.

      I will debug to investigate.

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            knielsen Kristian Nielsen added a comment -

            Sorry, previous patch is buggy, the memory need to be allocated on the THD memroot so it will be freed automatically, freeing in update does not work.

            Again, this patch is offered to Percona under the simplified BSD license.
            Revised patch to fix problem
            LPexportBug482100_xtradb.patch

            Show
            knielsen Kristian Nielsen added a comment - Sorry, previous patch is buggy, the memory need to be allocated on the THD memroot so it will be freed automatically, freeing in update does not work. Again, this patch is offered to Percona under the simplified BSD license. Revised patch to fix problem LPexportBug482100_xtradb.patch
            Hide
            knielsen Kristian Nielsen added a comment -

            Re: Valgrind warning and garbled output from innodb_file_format_name_update()
            Sorry, previous patch is buggy, the memory need to be allocated on the THD memroot so it will be freed automatically, freeing in update does not work.

            Again, this patch is offered to Percona under the simplified BSD license.

            Show
            knielsen Kristian Nielsen added a comment - Re: Valgrind warning and garbled output from innodb_file_format_name_update() Sorry, previous patch is buggy, the memory need to be allocated on the THD memroot so it will be freed automatically, freeing in update does not work. Again, this patch is offered to Percona under the simplified BSD license.
            Hide
            knielsen Kristian Nielsen added a comment -

            Re: Valgrind warning and garbled output from innodb_file_format_name_update()
            Fix is in MariaDB 5.1.39 release.

            Show
            knielsen Kristian Nielsen added a comment - Re: Valgrind warning and garbled output from innodb_file_format_name_update() Fix is in MariaDB 5.1.39 release.
            Hide
            stewart Stewart Smith added a comment -

            Re: Valgrind warning and garbled output from innodb_file_format_name_update()
            All development of XtraDB has moved under the Percona Server project - https://launchpad.net/percona-server - If this bug can be reproduced against current Percona Server, please file this bug against percona-server (you can simply do so by using the "Also affects project" link above).

            Thanks,
            Stewart Smith
            Director of Server Development
            Percona.

            Show
            stewart Stewart Smith added a comment - Re: Valgrind warning and garbled output from innodb_file_format_name_update() All development of XtraDB has moved under the Percona Server project - https://launchpad.net/percona-server - If this bug can be reproduced against current Percona Server, please file this bug against percona-server (you can simply do so by using the "Also affects project" link above). Thanks, Stewart Smith Director of Server Development Percona.
            Hide
            ratzpo Rasmus Johansson added a comment -

            Launchpad bug id: 482100

            Show
            ratzpo Rasmus Johansson added a comment - Launchpad bug id: 482100

              People

              • Assignee:
                knielsen Kristian Nielsen
                Reporter:
                knielsen Kristian Nielsen
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: