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

Server crash in find_field_in_table or Assertion `typeid(*copy) == typeid(*this)' in Item_field::derived_field_transformer_for_where

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Duplicate
    • 10.6, 10.11, 11.4, 11.8, 12.2
    • N/A
    • Server
    • None
    • Not for Release Notes

    Description

      CREATE ALGORITHM=TEMPTABLE VIEW v AS SELECT VALUE(SUM_NUMBER_OF_BYTES_ALLOC) AS f FROM performance_schema.memory_summary_by_thread_by_event_name;
      SELECT * FROM v WHERE f;
      

      10.11 faf1a76516626fb3393cb6501f319bc146f44d97 non-debug

      #2  <signal handler called>
      #3  my_strcasecmp_utf8mb3 (cs=<optimized out>, s=0x0, t=0x55986448f212 "_rowid") at /data/bld/10.11-rel/strings/ctype-utf8.c:833
      #4  0x0000559863a3b8e4 in find_field_in_table (thd=thd@entry=0x7f26c0000c68, table=0x7f26c0112ef8, name=name@entry=0x0, length=length@entry=0, allow_rowid=<optimized out>, cached_field_index_ptr=cached_field_index_ptr@entry=0x7f26c0018178) at /data/bld/10.11-rel/sql/sql_base.cc:6540
      #5  0x0000559863a3c125 in find_field_in_table_ref (thd=thd@entry=0x7f26c0000c68, table_list=table_list@entry=0x7f26c00151c8, name=name@entry=0x0, length=length@entry=0, item_name=0x7f26c0015080 "f", db_name=<optimized out>, db_name@entry=0x0, table_name=<optimized out>, ignored_tables=<optimized out>, ref=<optimized out>, check_privileges=<optimized out>, allow_rowid=<optimized out>, cached_field_index_ptr=<optimized out>, register_tree_change=<optimized out>, actual_table=<optimized out>) at /data/bld/10.11-rel/sql/sql_base.cc:6675
      #6  0x0000559863a3c6dc in find_field_in_tables (thd=thd@entry=0x7f26c0000c68, item=item@entry=0x7f26c0018090, first_table=<optimized out>, last_table=<optimized out>, ignored_tables=<optimized out>, ref=ref@entry=0x7f26c0017ee8, report_error=<optimized out>, check_privileges=<optimized out>, register_tree_change=<optimized out>) at /data/bld/10.11-rel/sql/sql_base.cc:6992
      #7  0x0000559863d31f0a in Item_field::fix_fields (this=0x7f26c0018090, thd=0x7f26c0000c68, reference=0x7f26c0017ee8) at /data/bld/10.11-rel/sql/item.cc:6272
      #8  0x0000559863d7af3d in Item::fix_fields_if_needed (ref=0x7f26c0017ee8, thd=0x7f26c0000c68, this=0x7f26c0018090) at /data/bld/10.11-rel/sql/item.h:1182
      #9  Item::fix_fields_if_needed (ref=0x7f26c0017ee8, thd=0x7f26c0000c68, this=0x7f26c0018090) at /data/bld/10.11-rel/sql/item.h:1182
      #10 Item_func::fix_fields (this=0x7f26c0017e70, thd=0x7f26c0000c68, ref=<optimized out>) at /data/bld/10.11-rel/sql/item_func.cc:394
      #11 0x0000559863b2af6b in JOIN::optimize_inner (this=this@entry=0x7f26c0017140) at /data/bld/10.11-rel/sql/sql_select.cc:2363
      #12 0x0000559863b2c32b in JOIN::optimize (this=this@entry=0x7f26c0017140) at /data/bld/10.11-rel/sql/sql_select.cc:1967
      #13 0x0000559863a6559e in mysql_derived_optimize (thd=<optimized out>, lex=0x7f26c0004e90, derived=0x7f26c0011418) at /data/bld/10.11-rel/sql/sql_derived.cc:1048
      #14 0x0000559863a64dc3 in mysql_handle_single_derived (lex=0x7f26c0004e90, derived=derived@entry=0x7f26c0011418, phases=phases@entry=4) at /data/bld/10.11-rel/sql/sql_derived.cc:203
      #15 0x0000559863b2b394 in JOIN::optimize_inner (this=this@entry=0x7f26c00168b0) at /data/bld/10.11-rel/sql/sql_select.cc:2495
      #16 0x0000559863b2c32b in JOIN::optimize (this=this@entry=0x7f26c00168b0) at /data/bld/10.11-rel/sql/sql_select.cc:1967
      #17 0x0000559863b2c47a in mysql_select (thd=thd@entry=0x7f26c0000c68, tables=<optimized out>, fields=..., conds=<optimized out>, og_num=<optimized out>, order=<optimized out>, group=<optimized out>, having=<optimized out>, proc_param=<optimized out>, select_options=<optimized out>, result=<optimized out>, unit=<optimized out>, select_lex=<optimized out>) at /data/bld/10.11-rel/sql/sql_select.cc:5271
      #18 0x0000559863b2cc24 in handle_select (thd=thd@entry=0x7f26c0000c68, lex=lex@entry=0x7f26c0004e90, result=result@entry=0x7f26c0016888, setup_tables_done_option=setup_tables_done_option@entry=0) at /data/bld/10.11-rel/sql/sql_select.cc:601
      #19 0x0000559863aa0491 in execute_sqlcom_select (thd=thd@entry=0x7f26c0000c68, all_tables=0x7f26c0011418) at /data/bld/10.11-rel/sql/sql_parse.cc:6470
      #20 0x0000559863aaf6a7 in mysql_execute_command (thd=thd@entry=0x7f26c0000c68, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /data/bld/10.11-rel/sql/sql_parse.cc:4024
      #21 0x0000559863ab1126 in mysql_parse (thd=0x7f26c0000c68, rawbuf=<optimized out>, length=<optimized out>, parser_state=<optimized out>) at /data/bld/10.11-rel/sql/sql_parse.cc:8230
      #22 0x0000559863ab3835 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x7f26c0000c68, packet=packet@entry=0x7f26c00086f9 "SELECT * FROM v WHERE f", packet_length=packet_length@entry=23, blocking=blocking@entry=true) at /data/bld/10.11-rel/sql/sql_parse.cc:2023
      #23 0x0000559863ab51cf in do_command (thd=thd@entry=0x7f26c0000c68, blocking=blocking@entry=true) at /data/bld/10.11-rel/sql/sql_parse.cc:1434
      #24 0x0000559863bdb1b5 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x559875b34578, put_in_cache=put_in_cache@entry=true) at /data/bld/10.11-rel/sql/sql_connect.cc:1475
      #25 0x0000559863bdb505 in handle_one_connection (arg=arg@entry=0x559875b34578) at /data/bld/10.11-rel/sql/sql_connect.cc:1387
      #26 0x0000559863f69777 in pfs_spawn_thread (arg=0x559875ae7d78) at /data/bld/10.11-rel/storage/perfschema/pfs.cc:2201
      #27 0x00007f26d84881c4 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
      #28 0x00007f26d850885c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
      

      10.11 faf1a76516626fb3393cb6501f319bc146f44d97 debug

      mariadbd: /data/bld/10.11-asan-ubsan/sql/item.h:1939: Item* Item::get_copy(THD*) const: Assertion `typeid(*copy) == typeid(*this)' failed.
      260103 21:56:02 [ERROR] /share8t/bld/10.11-asan-ubsan/sql/mariadbd got signal 6 ;
       
      #10 0x00007f55c0453eb2 in __GI___assert_fail (assertion=0x55e3d76755c0 "typeid(*copy) == typeid(*this)", file=0x55e3d7672120 "/data/bld/10.11-asan-ubsan/sql/item.h", line=1939, function=0x55e3d7675600 "Item* Item::get_copy(THD*) const") at ./assert/assert.c:101
      #11 0x000055e3d36cb3cd in Item::get_copy (this=this@entry=0x62d00005e758, thd=thd@entry=0x62c0000b0218) at /data/bld/10.11-asan-ubsan/sql/item.h:1939
      #12 0x000055e3d39991c0 in Item_field::do_build_clone (this=0x62d00005e758, thd=0x62c0000b0218) at /data/bld/10.11-asan-ubsan/sql/item.h:3931
      #13 0x000055e3d3c14afe in Item::build_clone (this=this@entry=0x62d00005e758, thd=thd@entry=0x62c0000b0218) at /data/bld/10.11-asan-ubsan/sql/item.h:1953
      #14 0x000055e3d5216e2d in Item_field::derived_field_transformer_for_where (this=0x62d000061678, thd=0x62c0000b0218, arg=0x62d00005dfd0 "") at /data/bld/10.11-asan-ubsan/sql/item.cc:8081
      #15 0x000055e3d51944a0 in Item::transform (this=<optimized out>, thd=0x62c0000b0218, transformer=<optimized out>, arg=<optimized out>) at /data/bld/10.11-asan-ubsan/sql/item.cc:619
      #16 0x000055e3d5485c2d in Item_args::transform_args (this=this@entry=0x62d000061888, thd=thd@entry=0x62c0000b0218, transformer=<optimized out>, arg=arg@entry=0x62d00005dfd0 "") at /data/bld/10.11-asan-ubsan/sql/item_func.cc:526
      #17 0x000055e3d5485f50 in Item_func::transform (this=0x62d000061818, thd=0x62c0000b0218, transformer=<optimized out>, argument=<optimized out>) at /data/bld/10.11-asan-ubsan/sql/item_func.cc:562
      #18 0x000055e3d3c0b8de in transform_condition_or_part (thd=thd@entry=0x62c0000b0218, cond=cond@entry=0x62d000061818, transformer=<optimized out>, arg=arg@entry=0x62d00005dfd0 "") at /data/bld/10.11-asan-ubsan/sql/sql_derived.cc:1446
      #19 0x000055e3d3d53c35 in st_select_lex::pushdown_cond_into_where_clause (this=this@entry=0x62d00005dfd0, thd=thd@entry=0x62c0000b0218, cond=cond@entry=0x62d000061818, remaining_cond=remaining_cond@entry=0x7f55b6422010, transformer=<optimized out>, arg=0x62d00005dfd0 "") at /data/bld/10.11-asan-ubsan/sql/sql_lex.cc:10987
      #20 0x000055e3d3c0d8a6 in pushdown_cond_for_derived (thd=<optimized out>, cond=<optimized out>, derived=derived@entry=0x62d00005ab40) at /data/bld/10.11-asan-ubsan/sql/sql_derived.cc:1640
      #21 0x000055e3d4148a2f in JOIN::optimize_inner (this=this@entry=0x62d000060178) at /data/bld/10.11-asan-ubsan/sql/sql_select.cc:2492
      #22 0x000055e3d414bf3e in JOIN::optimize (this=this@entry=0x62d000060178) at /data/bld/10.11-asan-ubsan/sql/sql_select.cc:1967
      #23 0x000055e3d414d2e9 in mysql_select (thd=thd@entry=0x62c0000b0218, tables=<optimized out>, fields=..., conds=conds@entry=0x62d00005b3b0, og_num=og_num@entry=0, order=order@entry=0x0, group=<optimized out>, having=<optimized out>, proc_param=<optimized out>, select_options=<optimized out>, result=<optimized out>, unit=<optimized out>, select_lex=<optimized out>) at /data/bld/10.11-asan-ubsan/sql/sql_select.cc:5271
      #24 0x000055e3d414e562 in handle_select (thd=thd@entry=0x62c0000b0218, lex=lex@entry=0x62c0000b4610, result=result@entry=0x62d000060148, setup_tables_done_option=setup_tables_done_option@entry=0) at /data/bld/10.11-asan-ubsan/sql/sql_select.cc:601
      #25 0x000055e3d3ddddce in execute_sqlcom_select (thd=thd@entry=0x62c0000b0218, all_tables=<optimized out>) at /data/bld/10.11-asan-ubsan/sql/sql_parse.cc:6470
      #26 0x000055e3d3e2144b in mysql_execute_command (thd=thd@entry=0x62c0000b0218, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /data/bld/10.11-asan-ubsan/sql/sql_parse.cc:4024
      #27 0x000055e3d3e442c3 in mysql_parse (thd=thd@entry=0x62c0000b0218, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x7f55b6423ab0) at /data/bld/10.11-asan-ubsan/sql/sql_parse.cc:8230
      #28 0x000055e3d3e4d670 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x62c0000b0218, packet=packet@entry=0x62900024e219 "SELECT * FROM v WHERE f", packet_length=packet_length@entry=23, blocking=blocking@entry=true) at /data/bld/10.11-asan-ubsan/sql/sql_parse.cc:1924
      #29 0x000055e3d3e5a375 in do_command (thd=thd@entry=0x62c0000b0218, blocking=blocking@entry=true) at /data/bld/10.11-asan-ubsan/sql/sql_parse.cc:1434
      #30 0x000055e3d465431e in do_handle_one_connection (connect=<optimized out>, connect@entry=0x6080000039b8, put_in_cache=put_in_cache@entry=true) at /data/bld/10.11-asan-ubsan/sql/sql_connect.cc:1475
      #31 0x000055e3d465547b in handle_one_connection (arg=0x6080000039b8) at /data/bld/10.11-asan-ubsan/sql/sql_connect.cc:1387
      #32 0x000055e3d5fd61d3 in pfs_spawn_thread (arg=0x617000005b98) at /data/bld/10.11-asan-ubsan/storage/perfschema/pfs.cc:2201
      #33 0x00007f55c04a81c4 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
      #34 0x00007f55c052885c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
      

      Attachments

        Issue Links

          Activity

            People

              sanja Oleksandr Byelkin
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              2 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.