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

Server crashes when querying from multiple file CONNECT engine table

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.0.2
    • 10.0.4
    • None
    • Centos 6.4

    Description

      Steps to reproduce:
      1. create a csv-file /tmp/test1.csv, with the following content:
      test;bla
      2. create a csv-file /tmp/test2.csv with the following content:
      test2;blub
      3. create a table:

      CREATE TABLE `test_all` (
        `a` char(10) DEFAULT NULL,
        `b` char(10) DEFAULT NULL
      ) ENGINE=CONNECT DEFAULT CHARSET=latin1 `table_type`=CSV `file_name`='/tmp/test*.csv' `sep_char`=';' `compress`=0 `multiple`=1
      4. Query the table:
      SELECT a FROM test_all;
      -> ERROR 2013 (HY000): Lost connection to MySQL server during query

      If you only use one file as source for your table, everything works as expected:

      CREATE TABLE `test1` (
        `a` char(10) DEFAULT NULL,
        `b` char(10) DEFAULT NULL
      ) ENGINE=CONNECT DEFAULT CHARSET=latin1 `table_type`=CSV `file_name`='/tmp/test1.csv' `sep_char`=';' `compress`=0 `multiple`=0
      SELECT a FROM test1;
      +------+
      | a    |
      +------+
      | test |
      +------+

      Excerpt from error log:

      Server version: 10.0.2-MariaDB
      key_buffer_size=134217728
      read_buffer_size=131072
      max_used_connections=1
      max_threads=153
      thread_count=1
      It is possible that mysqld could use up to 
      key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 466436 K  bytes of memory
      Hope that's ok; if not, decrease some variables in the equation.
       
      Thread pointer: 0x0x288d158
      Attempting backtrace. You can use the following information to find out
      where mysqld died. If you see no messages after this, something went
      terribly wrong...
      stack_bottom = 0x7fbb52d84d78 thread_stack 0x48000
      ??:0(my_print_stacktrace)[0xad121e]
      ??:0(handle_fatal_signal)[0x6db20b]
      ??:0(??)[0x7fbb529b3500]
       
      Trying to get some variables.
      Some pointers may be invalid and cause the dump to abort.
      Query (0x7fbb14004c40): is an invalid pointer
      Connection ID (thread ID): 1
      Status: NOT_KILLED
       
      Optimizer switch: index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off,exists_to_in=off

      Attachments

        Activity

          jedix Jens Dietze created issue -
          elenst Elena Stepanova made changes -
          Field Original Value New Value
          Fix Version/s 10.0.3 [ 12900 ]
          Assignee Alexander Barkov [ bar ]
          Description Steps to reproduce:
          1. create a csv-file /tmp/test1.csv, with the following content:
          test;bla
          2. create a csv-file /tmp/test2.csv with the following content:
          test2;blub
          3. create a table:
          CREATE TABLE `test_all` (
            `a` char(10) DEFAULT NULL,
            `b` char(10) DEFAULT NULL
          ) ENGINE=CONNECT DEFAULT CHARSET=latin1 `table_type`=CSV `file_name`='/tmp/test*.csv' `sep_char`=';' `compress`=0 `multiple`=1
          4. Query the table:
          SELECT a FROM test_all;
          -> ERROR 2013 (HY000): Lost connection to MySQL server during query

          If you only use one file as source for your table, everything works as expected:
          CREATE TABLE `test1` (
            `a` char(10) DEFAULT NULL,
            `b` char(10) DEFAULT NULL
          ) ENGINE=CONNECT DEFAULT CHARSET=latin1 `table_type`=CSV `file_name`='/tmp/test1.csv' `sep_char`=';' `compress`=0 `multiple`=0
          SELECT a FROM test1;
          +------+
          | a |
          +------+
          | test |
          +------+

          Excerpt from error log:
          Server version: 10.0.2-MariaDB
          key_buffer_size=134217728
          read_buffer_size=131072
          max_used_connections=1
          max_threads=153
          thread_count=1
          It is possible that mysqld could use up to
          key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 466436 K bytes of memory
          Hope that's ok; if not, decrease some variables in the equation.

          Thread pointer: 0x0x288d158
          Attempting backtrace. You can use the following information to find out
          where mysqld died. If you see no messages after this, something went
          terribly wrong...
          stack_bottom = 0x7fbb52d84d78 thread_stack 0x48000
          ??:0(my_print_stacktrace)[0xad121e]
          ??:0(handle_fatal_signal)[0x6db20b]
          ??:0(??)[0x7fbb529b3500]

          Trying to get some variables.
          Some pointers may be invalid and cause the dump to abort.
          Query (0x7fbb14004c40): is an invalid pointer
          Connection ID (thread ID): 1
          Status: NOT_KILLED

          Optimizer switch: index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off,exists_to_in=off
          Steps to reproduce:
          1. create a csv-file /tmp/test1.csv, with the following content:
          test;bla
          2. create a csv-file /tmp/test2.csv with the following content:
          test2;blub
          3. create a table:
          {code:sql}
          CREATE TABLE `test_all` (
            `a` char(10) DEFAULT NULL,
            `b` char(10) DEFAULT NULL
          ) ENGINE=CONNECT DEFAULT CHARSET=latin1 `table_type`=CSV `file_name`='/tmp/test*.csv' `sep_char`=';' `compress`=0 `multiple`=1
          4. Query the table:
          SELECT a FROM test_all;
          -> ERROR 2013 (HY000): Lost connection to MySQL server during query
          {code}

          If you only use one file as source for your table, everything works as expected:
          {code:sql}
          CREATE TABLE `test1` (
            `a` char(10) DEFAULT NULL,
            `b` char(10) DEFAULT NULL
          ) ENGINE=CONNECT DEFAULT CHARSET=latin1 `table_type`=CSV `file_name`='/tmp/test1.csv' `sep_char`=';' `compress`=0 `multiple`=0
          SELECT a FROM test1;
          +------+
          | a |
          +------+
          | test |
          +------+
          {code}

          Excerpt from error log:
          {noformat}
          Server version: 10.0.2-MariaDB
          key_buffer_size=134217728
          read_buffer_size=131072
          max_used_connections=1
          max_threads=153
          thread_count=1
          It is possible that mysqld could use up to
          key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 466436 K bytes of memory
          Hope that's ok; if not, decrease some variables in the equation.

          Thread pointer: 0x0x288d158
          Attempting backtrace. You can use the following information to find out
          where mysqld died. If you see no messages after this, something went
          terribly wrong...
          stack_bottom = 0x7fbb52d84d78 thread_stack 0x48000
          ??:0(my_print_stacktrace)[0xad121e]
          ??:0(handle_fatal_signal)[0x6db20b]
          ??:0(??)[0x7fbb529b3500]

          Trying to get some variables.
          Some pointers may be invalid and cause the dump to abort.
          Query (0x7fbb14004c40): is an invalid pointer
          Connection ID (thread ID): 1
          Status: NOT_KILLED

          Optimizer switch: index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off,exists_to_in=off
          {noformat}

          Labels connect-engine
          serg Sergei Golubchik made changes -
          Fix Version/s 10.0.4 [ 13101 ]
          Fix Version/s 10.0.3 [ 12900 ]
          serg Sergei Golubchik made changes -
          Assignee Alexander Barkov [ bar ] Olivier Bertrand [ bertrandop ]

          Was a gcc problem of stack smashing on Linux

          bertrandop Olivier Bertrand added a comment - Was a gcc problem of stack smashing on Linux
          bertrandop Olivier Bertrand made changes -
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] Closed [ 6 ]
          serg Sergei Golubchik made changes -
          Workflow defaullt [ 27409 ] MariaDB v2 [ 46615 ]
          ratzpo Rasmus Johansson (Inactive) made changes -
          Workflow MariaDB v2 [ 46615 ] MariaDB v3 [ 67332 ]
          serg Sergei Golubchik made changes -
          Workflow MariaDB v3 [ 67332 ] MariaDB v4 [ 146698 ]

          People

            bertrandop Olivier Bertrand
            jedix Jens Dietze
            Votes:
            0 Vote for this issue
            Watchers:
            3 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.