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

Valgrind failure in main.subselect test

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 10.2
    • Fix Version/s: 10.2
    • Component/s: Optimizer, Tests
    • Labels:
      None

      Description

      I run

      ./mysql-test-run --valgrind subselect
      

      And I get this failure:

      main.subselect                           [ fail ]  Found warnings/errors in server log file!
              Test ended at 2019-09-10 23:17:40
      line
      ==25255== Thread 6:
      ==25255== Conditional jump or move depends on uninitialised value(s)
      ==25255==    at 0x99CCDF: Item_in_optimizer::eval_not_null_tables(void*) (item_cmpfunc.cc:1254)
      ==25255==    by 0x66B7FF: Item_func_or_sum::walk(bool (Item::*)(void*), bool, void*) (item.h:4345)
      ==25255==    by 0x9A828A: Item_cond::walk(bool (Item::*)(void*), bool, void*) (item_cmpfunc.cc:4768)
      ==25255==    by 0x6BF491: st_select_lex::update_used_tables() (sql_lex.cc:4244)
      ==25255==    by 0x6BE841: st_select_lex::optimize_unflattened_subqueries(bool) (sql_lex.cc:3861)
      ==25255==    by 0x884363: JOIN::optimize_unflattened_subqueries() (opt_subselect.cc:5318)
      ==25255==    by 0x713A44: JOIN::optimize_inner() (sql_select.cc:2069)
      ==25255==    by 0x710214: JOIN::optimize() (sql_select.cc:1117)
      ==25255==    by 0x71981F: mysql_select(THD*, 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:3808)
      ==25255==    by 0x70D9A0: handle_select(THD*, LEX*, select_result*, unsigned long) (sql_select.cc:365)
      ==25255==    by 0x6D7F99: execute_sqlcom_select(THD*, TABLE_LIST*) (sql_parse.cc:6226)
      ==25255==    by 0x6CE96D: mysql_execute_command(THD*) (sql_parse.cc:3533)
      ==25255==    by 0x6DBE5F: mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool) (sql_parse.cc:7760)
      ==25255==    by 0x6CA148: dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool) (sql_parse.cc:1831)
      ==25255==    by 0x6C8A9E: do_command(THD*) (sql_parse.cc:1385)
      ==25255==    by 0x82351B: do_handle_one_connection(CONNECT*) (sql_connect.cc:1336)
      ==25255== Invalid read of size 1
      ==25255==    at 0x8862CC: Item_exists_subselect::is_top_level_item() (item_subselect.h:410)
      ==25255==    by 0x99CC31: Item_in_optimizer::is_top_level_item() (item_cmpfunc.cc:1235)
      ==25255==    by 0x99CCDC: Item_in_optimizer::eval_not_null_tables(void*) (item_cmpfunc.cc:1254)
      ==25255==    by 0x66B7FF: Item_func_or_sum::walk(bool (Item::*)(void*), bool, void*) (item.h:4345)
      ==25255==    by 0x9A828A: Item_cond::walk(bool (Item::*)(void*), bool, void*) (item_cmpfunc.cc:4768)
      ==25255==    by 0x6BF491: st_select_lex::update_used_tables() (sql_lex.cc:4244)
      ==25255==    by 0x6BE841: st_select_lex::optimize_unflattened_subqueries(bool) (sql_lex.cc:3861)
      ==25255==    by 0x884363: JOIN::optimize_unflattened_subqueries() (opt_subselect.cc:5318)
      ==25255==    by 0x713A44: JOIN::optimize_inner() (sql_select.cc:2069)
      ==25255==    by 0x710214: JOIN::optimize() (sql_select.cc:1117)
      ==25255==    by 0x71981F: mysql_select(THD*, 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:3808)
      ==25255==    by 0x70D9A0: handle_select(THD*, LEX*, select_result*, unsigned long) (sql_select.cc:365)
      ==25255==    by 0x6D7F99: execute_sqlcom_select(THD*, TABLE_LIST*) (sql_parse.cc:6226)
      ==25255==    by 0x6CE96D: mysql_execute_command(THD*) (sql_parse.cc:3533)
      ==25255==    by 0x6DBE5F: mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool) (sql_parse.cc:7760)
      ==25255==    by 0x6CA148: dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool) (sql_parse.cc:1831)
      ==25255==  Address 0xebf4081 is 33 bytes inside a block of size 296 free'd
      ==25255==    at 0x4C30D3B: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
      ==25255==    by 0x110A78D: my_free (my_malloc.c:218)
      ==25255==    by 0x10FB496: free_root (my_alloc.c:394)
      ==25255==    by 0x6CBE47: dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool) (sql_parse.cc:2430)
      ==25255==    by 0x6C8A9E: do_command(THD*) (sql_parse.cc:1385)
      ==25255==    by 0x82351B: do_handle_one_connection(CONNECT*) (sql_connect.cc:1336)
      ==25255==    by 0x823286: handle_one_connection (sql_connect.cc:1241)
      ==25255==    by 0x10AB6B4: pfs_spawn_thread (pfs.cc:1862)
      ==25255==    by 0x68A76DA: start_thread (pthread_create.c:463)
      ==25255==    by 0x751F88E: clone (clone.S:95)
      ==25255==  Block was alloc'd at
      ==25255==    at 0x4C2FB0F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
      ==25255==    by 0x110A190: my_malloc (my_malloc.c:101)
      ==25255==    by 0x10FAD53: alloc_root (my_alloc.c:188)
      ==25255==    by 0x606D51: Item::operator new(unsigned long, st_mem_root*) (item.h:669)
      ==25255==    by 0x8FF92E: MYSQLparse(THD*) (sql_yacc.yy:14310)
      ==25255==    by 0x6E0E21: parse_sql(THD*, Parser_state*, Object_creation_ctx*, bool) (sql_parse.cc:10049)
      ==25255==    by 0x6DBCCF: mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool) (sql_parse.cc:7713)
      ==25255==    by 0x6CA148: dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool) (sql_parse.cc:1831)
      ==25255==    by 0x6C8A9E: do_command(THD*) (sql_parse.cc:1385)
      ==25255==    by 0x82351B: do_handle_one_connection(CONNECT*) (sql_connect.cc:1336)
      ==25255==    by 0x823286: handle_one_connection (sql_connect.cc:1241)
      ==25255==    by 0x10AB6B4: pfs_spawn_thread (pfs.cc:1862)
      ==25255==    by 0x68A76DA: start_thread (pthread_create.c:463)
      ==25255==    by 0x751F88E: clone (clone.S:95)
      ^ Found warnings in /optane/dev-git2/10.2/mysql-test/var/log/mysqld.1.err
      

        Attachments

          Activity

            People

            • Assignee:
              sanja Oleksandr Byelkin
              Reporter:
              psergey Sergei Petrunia
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: