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

Cassandra: DynCols: Server crashes in ha_cassandra::read_cassandra_columns on reading from a dynamic column

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • None
    • 10.0.0
    • None
    • None

    Description

      Important: please check that the column family structure is a valid one, I made some guesses on top of what was discussed before, could have gone wrong. See the structure below in the test case.

      Test case:

      # Make sure your cassandra is running,
      # and thrift is on LD_LIBRARY_PATH,
      # and cqlsh and cassandra-cli are on the system PATH
       
      --source include/have_cassandra.inc
       
      --remove_files_wildcard $MYSQLTEST_VARDIR test.cql
      --write_file $MYSQLTEST_VARDIR/test.cql
      DROP KEYSPACE bug_ks;
      EOF
      --error 0,1,2
      --system cqlsh -3 -f $MYSQLTEST_VARDIR/test.cql
       
      --remove_file $MYSQLTEST_VARDIR/test.cql
      --write_file $MYSQLTEST_VARDIR/test.cql
      CREATE KEYSPACE bug_ks
        WITH strategy_class = 'org.apache.cassandra.locator.SimpleStrategy'
         AND strategy_options:replication_factor='1';
      EOF
       
      --error 0,1,2
      --system cqlsh -3 -f $MYSQLTEST_VARDIR/test.cql
       
      --remove_file $MYSQLTEST_VARDIR/test.cql
      --write_file $MYSQLTEST_VARDIR/test.cql
      USE bug_ks;
      CREATE COLUMN FAMILY cf1 
        WITH comparator = UTF8Type
          AND key_validation_class=Int32Type
          AND default_validation_class = UTF8Type;
      EOF
       
      --system cassandra-cli -f $MYSQLTEST_VARDIR/test.cql
       
      DROP TABLE IF EXISTS t2;
      CREATE TABLE t2 (rowkey int PRIMARY KEY, dyn blob DYNAMIC_COLUMN_STORAGE=yes) 
      ENGINE=CASSANDRA thrift_host='localhost' keyspace='bug_ks' column_family = 'cf1';
      DELETE FROM t2;
      insert into t2 values (1, column_create("dyn", 1));
      select rowkey, column_list(dyn) from t2;
       
      # Cleanup
      DROP TABLE t2;

      #4  <signal handler called>
      #5  0x085670e8 in ha_cassandra::read_cassandra_columns (this=0xa26e0e0, unpack_pk=true) at 5.5-cassandra-dyncol-read/storage/cassandra/ha_cassandra.cc:1698
      #6  0x085681d1 in ha_cassandra::rnd_next (this=0xa26e0e0, buf=0xa26e540 "\376") at 5.5-cassandra-dyncol-read/storage/cassandra/ha_cassandra.cc:1990
      #7  0x081ec893 in handler::ha_rnd_next (this=0xa26e0e0, buf=0xa26e540 "\376") at 5.5-cassandra-dyncol-read/sql/sql_class.h:4263
      #8  0x084ee078 in rr_sequential (info=0xa21ec80) at 5.5-cassandra-dyncol-read/sql/records.cc:452
      #9  0x0829efe2 in join_init_read_record (tab=0xa21ec28) at 5.5-cassandra-dyncol-read/sql/sql_select.cc:16949
      #10 0x0829d201 in sub_select (join=0xa21e238, join_tab=0xa21ec28, end_of_records=false) at 5.5-cassandra-dyncol-read/sql/sql_select.cc:16095
      #11 0x0829cb29 in do_select (join=0xa21e238, fields=0xa16f988, table=0x0, procedure=0x0) at 5.5-cassandra-dyncol-read/sql/sql_select.cc:15768
      #12 0x0827f320 in JOIN::exec (this=0xa21e238) at 5.5-cassandra-dyncol-read/sql/sql_select.cc:2824
      #13 0x0827faf4 in mysql_select (thd=0xa16de60, rref_pointer_array=0xa16fa30, tables=0xa21dd98, wild_num=0, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0xa21e228, unit=0xa16f440, select_lex=0xa16f8f0) at 5.5-cassandra-dyncol-read/sql/sql_select.cc:3044
      #14 0x08277622 in handle_select (thd=0xa16de60, lex=0xa16f3dc, result=0xa21e228, setup_tables_done_option=0) at 5.5-cassandra-dyncol-read/sql/sql_select.cc:313
      #15 0x082531b6 in execute_sqlcom_select (thd=0xa16de60, all_tables=0xa21dd98) at 5.5-cassandra-dyncol-read/sql/sql_parse.cc:4621
      #16 0x0824c201 in mysql_execute_command (thd=0xa16de60) at 5.5-cassandra-dyncol-read/sql/sql_parse.cc:2189
      #17 0x0825578c in mysql_parse (thd=0xa16de60, rawbuf=0xa21dab0 "select rowkey, column_list(dyn) from t2", length=39, parser_state=0xacd72d44) at 5.5-cassandra-dyncol-read/sql/sql_parse.cc:5736
      #18 0x08249ccb in dispatch_command (command=COM_QUERY, thd=0xa16de60, packet=0xa217e19 "", packet_length=39) at 5.5-cassandra-dyncol-read/sql/sql_parse.cc:1055
      #19 0x08249197 in do_command (thd=0xa16de60) at 5.5-cassandra-dyncol-read/sql/sql_parse.cc:794
      #20 0x08334eba in do_handle_one_connection (thd_arg=0xa16de60) at 5.5-cassandra-dyncol-read/sql/sql_connect.cc:1253
      #21 0x08334a05 in handle_one_connection (arg=0xa16de60) at 5.5-cassandra-dyncol-read/sql/sql_connect.cc:1168
      #22 0x0856063a in pfs_spawn_thread (arg=0xa2588e8) at 5.5-cassandra-dyncol-read/storage/perfschema/pfs.cc:1015
      #23 0xb76d4e32 in start_thread () from /lib/libpthread.so.0
      #24 0xb73e38ee in clone () from /lib/libc.so.6

      Query (0xa21dab0): select rowkey, column_list(dyn) from t2
      Connection ID (thread ID): 2
      Status: NOT_KILLED

      bzr version-info

      revision-id: sanja@montyprogram.com-20120926190923-oxdeydkyu12bmx1m
      date: 2012-09-26 22:09:23 +0300
      build-date: 2012-09-28 01:16:25 +0400
      revno: 3522

      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.