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

Valgrind error in mroonga/storage.index_multiple_column_unique_datetime_index_read

Details

    Description

      mroonga/storage.index_multiple_column_unique_datetime_index_read w1 [ fail ]  Found warnings/errors in server log file!
              Test ended at 2015-07-27 05:51:03
      line
      ==30422== Thread 5:
      ==30422== Conditional jump or move depends on uninitialised value(s)
      ==30422==    at 0x7F76AB: my_datetime_packed_to_binary(long long, unsigned char*, unsigned int) (compat56.cc:341)
      ==30422==    by 0xB275FDD: mrn::MultipleColumnKeyCodec::decode(unsigned char const*, unsigned int, unsigned char*, unsigned int*) (mrn_multiple_column_key_codec.cpp:297)
      ==30422==    by 0xB256640: ha_mroonga::storage_store_fields_by_index(unsigned char*) (ha_mroonga.cpp:11097)
      ==30422==    by 0xB260E60: ha_mroonga::storage_get_next_record(unsigned char*) (ha_mroonga.cpp:9485)
      ==30422==    by 0xB263B2A: ha_mroonga::storage_index_first(unsigned char*) (ha_mroonga.cpp:7382)
      ==30422==    by 0xB263D16: ha_mroonga::index_first(unsigned char*) (ha_mroonga.cpp:7394)
      ==30422==    by 0x821466: handler::ha_index_first(unsigned char*) (handler.cc:2673)
      ==30422==    by 0x695189: join_read_first(st_join_table*) (sql_select.cc:19021)
      ==30422==    by 0x677E92: sub_select(JOIN*, st_join_table*, bool) (sql_select.cc:18077)
      ==30422==    by 0x6A18DC: do_select(JOIN*, List<Item>*, TABLE*, Procedure*) (sql_select.cc:17737)
      ==30422==    by 0x6A6030: JOIN::exec_inner() (sql_select.cc:3114)
      ==30422==    by 0x6A8011: JOIN::exec() (sql_select.cc:2405)
      ==30422==    by 0x6A83EC: 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:3342)
      ==30422==    by 0x6A9274: handle_select(THD*, LEX*, select_result*, unsigned long) (sql_select.cc:371)
      ==30422==    by 0x6278AC: execute_sqlcom_select(THD*, TABLE_LIST*) (sql_parse.cc:5829)
      ==30422==    by 0x632044: mysql_execute_command(THD*) (sql_parse.cc:2947)
      ==30422== Conditional jump or move depends on uninitialised value(s)
      ==30422==    at 0x808507: Field_datetimef::get_TIME(st_mysql_time*, unsigned char const*, unsigned long long) const (field.h:1722)
      ==30422==    by 0x8017CB: Field_datetime_with_dec::val_str(String*, String*) (field.cc:6236)
      ==30422==    by 0x57E21E: Protocol_text::store(Field*) (field.h:427)
      ==30422==    by 0x57EEF8: Protocol::send_result_set_row(List<Item>*) (protocol.cc:906)
      ==30422==    by 0x5EAF1D: select_send::send_data(List<Item>&) (sql_class.cc:2745)
      ==30422==    by 0x680AB4: end_send(JOIN*, st_join_table*, bool) (sql_select.cc:19201)
      ==30422==    by 0x677BC4: evaluate_join_record(JOIN*, st_join_table*, int) (sql_select.cc:18305)
      ==30422==    by 0x677EA9: sub_select(JOIN*, st_join_table*, bool) (sql_select.cc:18080)
      ==30422==    by 0x6A18DC: do_select(JOIN*, List<Item>*, TABLE*, Procedure*) (sql_select.cc:17737)
      ==30422==    by 0x6A6030: JOIN::exec_inner() (sql_select.cc:3114)
      ==30422==    by 0x6A8011: JOIN::exec() (sql_select.cc:2405)
      ==30422==    by 0x6A83EC: 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:3342)
      ==30422==    by 0x6A9274: handle_select(THD*, LEX*, select_result*, unsigned long) (sql_select.cc:371)
      ==30422==    by 0x6278AC: execute_sqlcom_select(THD*, TABLE_LIST*) (sql_parse.cc:5829)
      ==30422==    by 0x632044: mysql_execute_command(THD*) (sql_parse.cc:2947)
      ==30422==    by 0x6367D2: mysql_parse(THD*, char*, unsigned int, Parser_state*) (sql_parse.cc:7205)
      ==30422== Conditional jump or move depends on uninitialised value(s)
      ==30422==    at 0x80850B: Field_datetimef::get_TIME(st_mysql_time*, unsigned char const*, unsigned long long) const (field.h:1724)
      ==30422==    by 0x8017CB: Field_datetime_with_dec::val_str(String*, String*) (field.cc:6236)
      ==30422==    by 0x57E21E: Protocol_text::store(Field*) (field.h:427)
      ==30422==    by 0x57EEF8: Protocol::send_result_set_row(List<Item>*) (protocol.cc:906)
      ==30422==    by 0x5EAF1D: select_send::send_data(List<Item>&) (sql_class.cc:2745)
      ==30422==    by 0x680AB4: end_send(JOIN*, st_join_table*, bool) (sql_select.cc:19201)
      ==30422==    by 0x677BC4: evaluate_join_record(JOIN*, st_join_table*, int) (sql_select.cc:18305)
      ==30422==    by 0x677EA9: sub_select(JOIN*, st_join_table*, bool) (sql_select.cc:18080)
      ==30422==    by 0x6A18DC: do_select(JOIN*, List<Item>*, TABLE*, Procedure*) (sql_select.cc:17737)
      ==30422==    by 0x6A6030: JOIN::exec_inner() (sql_select.cc:3114)
      ==30422==    by 0x6A8011: JOIN::exec() (sql_select.cc:2405)
      ==30422==    by 0x6A83EC: 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:3342)
      ==30422==    by 0x6A9274: handle_select(THD*, LEX*, select_result*, unsigned long) (sql_select.cc:371)
      ==30422==    by 0x6278AC: execute_sqlcom_select(THD*, TABLE_LIST*) (sql_parse.cc:5829)
      ==30422==    by 0x632044: mysql_execute_command(THD*) (sql_parse.cc:2947)
      ==30422==    by 0x6367D2: mysql_parse(THD*, char*, unsigned int, Parser_state*) (sql_parse.cc:7205)
      ==30422== Conditional jump or move depends on uninitialised value(s)
      ==30422==    at 0x80852C: Field_datetimef::get_TIME(st_mysql_time*, unsigned char const*, unsigned long long) const (field.h:1724)
      ==30422==    by 0x8017CB: Field_datetime_with_dec::val_str(String*, String*) (field.cc:6236)
      ==30422==    by 0x57E21E: Protocol_text::store(Field*) (field.h:427)
      ==30422==    by 0x57EEF8: Protocol::send_result_set_row(List<Item>*) (protocol.cc:906)
      ==30422==    by 0x5EAF1D: select_send::send_data(List<Item>&) (sql_class.cc:2745)
      ==30422==    by 0x680AB4: end_send(JOIN*, st_join_table*, bool) (sql_select.cc:19201)
      ==30422==    by 0x677BC4: evaluate_join_record(JOIN*, st_join_table*, int) (sql_select.cc:18305)
      ==30422==    by 0x677EA9: sub_select(JOIN*, st_join_table*, bool) (sql_select.cc:18080)
      ==30422==    by 0x6A18DC: do_select(JOIN*, List<Item>*, TABLE*, Procedure*) (sql_select.cc:17737)
      ==30422==    by 0x6A6030: JOIN::exec_inner() (sql_select.cc:3114)
      ==30422==    by 0x6A8011: JOIN::exec() (sql_select.cc:2405)
      ==30422==    by 0x6A83EC: 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:3342)
      ==30422==    by 0x6A9274: handle_select(THD*, LEX*, select_result*, unsigned long) (sql_select.cc:371)
      ==30422==    by 0x6278AC: execute_sqlcom_select(THD*, TABLE_LIST*) (sql_parse.cc:5829)
      ==30422==    by 0x632044: mysql_execute_command(THD*) (sql_parse.cc:2947)
      ==30422==    by 0x6367D2: mysql_parse(THD*, char*, unsigned int, Parser_state*) (sql_parse.cc:7205)
      ==30422== Syscall param socketcall.sendto(msg) points to uninitialised byte(s)
      ==30422==    at 0x4E3BE71: send (in /lib64/libpthread-2.9.so)
      ==30422==    by 0xF039FA: vio_write (mysql_socket.h:744)
      ==30422==    by 0x5512D1: net_real_write (net_serv.cc:659)
      ==30422==    by 0x551870: net_flush (net_serv.cc:362)
      ==30422==    by 0x57F21C: net_send_eof(THD*, unsigned int, unsigned int) (protocol.cc:301)
      ==30422==    by 0x57F42C: Protocol::send_eof(unsigned int, unsigned int) (protocol.cc:563)
      ==30422==    by 0x57F9E4: Protocol::end_statement() (protocol.cc:511)
      ==30422==    by 0x6373ED: dispatch_command(enum_server_command, THD*, char*, unsigned int) (sql_parse.cc:1928)
      ==30422==    by 0x639962: do_command(THD*) (sql_parse.cc:1097)
      ==30422==    by 0x74026B: do_handle_one_connection(THD*) (sql_connect.cc:1350)
      ==30422==    by 0x740414: handle_one_connection (sql_connect.cc:1262)
      ==30422==    by 0x9D9CB6: pfs_spawn_thread (pfs.cc:1860)
      ==30422==    by 0x4E3506F: start_thread (in /lib64/libpthread-2.9.so)
      ==30422==    by 0x62F913C: clone (in /lib64/libc-2.9.so)
      ==30422==  Address 0xe0fff6f is 127 bytes inside a block of size 16,400 alloc'd
      ==30422==    at 0x4C25DD6: malloc (vg_replace_malloc.c:270)
      ==30422==    by 0xE6B3CA: my_malloc (my_malloc.c:100)
      ==30422==    by 0x5524A6: my_net_init (net_serv.cc:132)
      ==30422==    by 0x543AB7: handle_connections_sockets() (mysqld.cc:6633)
      ==30422==    by 0x54D2C2: mysqld_main(int, char**) (mysqld.cc:5887)
      ==30422==    by 0x6244585: (below main) (in /lib64/libc-2.9.so)
      ^ Found warnings in /var/lib/buildbot/maria-slave/work-opensuse-amd64/build/mysql-test/var/1/log/mysqld.1.err
      

      See here for more details:
      http://buildbot.askmonty.org/buildbot/builders/work-amd64-valgrind/builds/7429/steps/test/logs/stdio

      Attachments

        Activity

          kou Kouhei Sutou added a comment - - edited

          It seems that it has been fixed at Mroonga 5.05.
          See also: https://github.com/mroonga/mroonga/commit/60324a004be477c17ee76469269396e9bb4f35c1

          kou Kouhei Sutou added a comment - - edited It seems that it has been fixed at Mroonga 5.05. See also: https://github.com/mroonga/mroonga/commit/60324a004be477c17ee76469269396e9bb4f35c1
          bar Alexander Barkov added a comment - It's still repeatable in the build-bot: http://buildbot.askmonty.org/buildbot/builders/work-amd64-valgrind/builds/7542/steps/test/logs/stdio Should we merge the latest mroonga from https://github.com/mroonga ?
          kou Kouhei Sutou added a comment -

          I don't know the version of Mroonga bundled in MariaDB but 10.1 branch doesn't have the change: https://github.com/MariaDB/server/blob/10.1/storage/mroonga/lib/mrn_multiple_column_key_codec.cpp#L290-L291

          > Should we merge the latest mroonga from https://github.com/mroonga ?

          I think so.

          kou Kouhei Sutou added a comment - I don't know the version of Mroonga bundled in MariaDB but 10.1 branch doesn't have the change: https://github.com/MariaDB/server/blob/10.1/storage/mroonga/lib/mrn_multiple_column_key_codec.cpp#L290-L291 > Should we merge the latest mroonga from https://github.com/mroonga ? I think so.

          Also fails on recent 10.2, with a somewhat different stack trace:
          http://buildbot.askmonty.org/buildbot/builders/work-amd64-valgrind/builds/10030/steps/test/logs/stdio

          ==21780== Thread 6:
          ==21780== Conditional jump or move depends on uninitialised value(s)
          ==21780==    at 0x94A709: TIME_to_longlong_datetime_packed(st_mysql_time const*) (compat56.cc:242)
          ==21780==    by 0xBF60E55: mrn::MultipleColumnKeyCodec::decode(unsigned char const*, unsigned int, unsigned char*, unsigned int*) (mrn_multiple_column_key_codec.cpp:294)
          ==21780==    by 0xBF304C6: ha_mroonga::storage_store_fields_by_index(unsigned char*) (ha_mroonga.cpp:11100)
          ==21780==    by 0xBF2577A: ha_mroonga::storage_get_next_record(unsigned char*) (ha_mroonga.cpp:9488)
          ==21780==    by 0xBF17E80: ha_mroonga::storage_index_first(unsigned char*) (ha_mroonga.cpp:7385)
          ==21780==    by 0xBF1805A: ha_mroonga::index_first(unsigned char*) (ha_mroonga.cpp:7397)
          ==21780==    by 0x98771E: handler::ha_index_first(unsigned char*) (handler.cc:2725)
          ==21780==    by 0x76FD69: join_read_first(st_join_table*) (sql_select.cc:19438)
          ==21780==    by 0x76D882: sub_select(JOIN*, st_join_table*, bool) (sql_select.cc:18455)
          ==21780==    by 0x76CE72: do_select(JOIN*, Procedure*) (sql_select.cc:18002)
          ==21780==    by 0x7476E0: JOIN::exec_inner() (sql_select.cc:3464)
          ==21780==    by 0x746BDD: JOIN::exec() (sql_select.cc:3267)
          

          elenst Elena Stepanova added a comment - Also fails on recent 10.2, with a somewhat different stack trace: http://buildbot.askmonty.org/buildbot/builders/work-amd64-valgrind/builds/10030/steps/test/logs/stdio ==21780== Thread 6: ==21780== Conditional jump or move depends on uninitialised value(s) ==21780== at 0x94A709: TIME_to_longlong_datetime_packed(st_mysql_time const*) (compat56.cc:242) ==21780== by 0xBF60E55: mrn::MultipleColumnKeyCodec::decode(unsigned char const*, unsigned int, unsigned char*, unsigned int*) (mrn_multiple_column_key_codec.cpp:294) ==21780== by 0xBF304C6: ha_mroonga::storage_store_fields_by_index(unsigned char*) (ha_mroonga.cpp:11100) ==21780== by 0xBF2577A: ha_mroonga::storage_get_next_record(unsigned char*) (ha_mroonga.cpp:9488) ==21780== by 0xBF17E80: ha_mroonga::storage_index_first(unsigned char*) (ha_mroonga.cpp:7385) ==21780== by 0xBF1805A: ha_mroonga::index_first(unsigned char*) (ha_mroonga.cpp:7397) ==21780== by 0x98771E: handler::ha_index_first(unsigned char*) (handler.cc:2725) ==21780== by 0x76FD69: join_read_first(st_join_table*) (sql_select.cc:19438) ==21780== by 0x76D882: sub_select(JOIN*, st_join_table*, bool) (sql_select.cc:18455) ==21780== by 0x76CE72: do_select(JOIN*, Procedure*) (sql_select.cc:18002) ==21780== by 0x7476E0: JOIN::exec_inner() (sql_select.cc:3464) ==21780== by 0x746BDD: JOIN::exec() (sql_select.cc:3267)
          kou Kouhei Sutou added a comment -

          It's also fixed in the latest Mroonga.

          I want to upgrade bundled Mroonga to the latest version. How should I do?

          kou Kouhei Sutou added a comment - It's also fixed in the latest Mroonga. I want to upgrade bundled Mroonga to the latest version. How should I do?

          People

            kou Kouhei Sutou
            bar Alexander Barkov
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.