[MCOL-872] Crash when count distinct COLUMNSTORE_FILES Created: 2017-08-11  Updated: 2017-08-24  Resolved: 2017-08-24

Status: Closed
Project: MariaDB ColumnStore
Component/s: MariaDB Server
Affects Version/s: 1.0.10
Fix Version/s: Icebox

Type: Task Priority: Minor
Reporter: MG Assignee: Andrew Hutchings (Inactive)
Resolution: Duplicate Votes: 0
Labels: None

Issue Links:
Duplicate
duplicates MDEV-12136 SELECT COUNT(DISTINCT) returns the wr... Closed

 Description   

[root@mg-cstore ~]# /etc/init.d/columnstore start
Starting MariaDB Columnstore Database Platform
[root@mg-cstore ~]# mysqladmin create mgtest
[root@mg-cstore ~]# mysql -A mgtest
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 5
Server version: 10.1.25-MariaDB Columnstore 1.0.10-1

Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [mgtest]> create table t1 (id int, blah varchar(64)) engine=columnstore;
Query OK, 0 rows affected (0.90 sec)

MariaDB [mgtest]> insert into t1 select seq, null from seq_1_to_1000;
Query OK, 1000 rows affected (1.21 sec)
Records: 1000 Duplicates: 0 Warnings: 0

MariaDB [mgtest]> select count from information_schema.COLUMNSTORE_FILES;
----------

count

----------

3

----------
1 row in set (0.01 sec)

MariaDB [mgtest]> select count(FILENAME) from information_schema.COLUMNSTORE_FILES;
-----------------

count(FILENAME)

-----------------

3

-----------------
1 row in set (0.02 sec)

MariaDB [mgtest]> select distinct FILENAME from information_schema.COLUMNSTORE_FILES;
------------------------------------------------------------------------------------------

FILENAME

------------------------------------------------------------------------------------------

/usr/local/mariadb/columnstore/data2/000.dir/000.dir/011.dir/185.dir/000.dir/FILE000.cdf
/usr/local/mariadb/columnstore/data2/000.dir/000.dir/011.dir/186.dir/000.dir/FILE000.cdf
/usr/local/mariadb/columnstore/data2/000.dir/000.dir/011.dir/187.dir/000.dir/FILE000.cdf

------------------------------------------------------------------------------------------
3 rows in set (0.02 sec)

MariaDB [mgtest]> select count(distinct FILENAME) from information_schema.COLUMNSTORE_FILES;
ERROR 2013 (HY000): Lost connection to MySQL server during query

MariaDB [mgtest]> select count(distinct table_schema) from information_schema.tables;
ERROR 2006 (HY000): MySQL server has gone away
No connection. Trying to reconnect...
Connection id: 3
Current database: mgtest

------------------------------

count(distinct table_schema)

------------------------------

6

------------------------------
1 row in set (0.00 sec)

MariaDB [mgtest]> select count(distinct FILENAME) from information_schema.COLUMNSTORE_FILES;
ERROR 2013 (HY000): Lost connection to MySQL server during query

Crash log:

/usr/local/mariadb/columnstore/mysql//bin/mysqld(my_print_stacktrace+0x29)[0xb33e39]
/usr/local/mariadb/columnstore/mysql//bin/mysqld(handle_fatal_signal+0x46a)[0x72179a]
/lib64/libpthread.so.0(+0xf7e0)[0x7f17343f07e0]
/usr/local/mariadb/columnstore/mysql//bin/mysqld(_ZN15Field_varstring7cmp_maxEPKhS1_j+0x13)[0x708653]
/usr/local/mariadb/columnstore/mysql//bin/mysqld(_downheap+0x120)[0xb33940]
/usr/local/mariadb/columnstore/mysql//bin/mysqld(_Z13merge_buffersP10Sort_paramP11st_io_cacheS2_PhP10st_buffpekS5_S5_i+0x3e3)[0x71ec33]
/usr/local/mariadb/columnstore/mysql//bin/mysqld(Z11merge_indexP10Sort_paramPhP10st_buffpekjP11st_io_cacheS5+0x38)[0x71f0f8]
/usr/local/mariadb/columnstore/mysql//bin/mysqld(_ZN6Unique5mergeEP5TABLEPhb+0x27d)[0x662ccd]
/usr/local/mariadb/columnstore/mysql//bin/mysqld(ZN6Unique4walkEP5TABLEPFiPvjS2_ES2+0x221)[0x6631a1]
/usr/local/mariadb/columnstore/mysql//bin/mysqld(_ZN19Aggregator_distinct5endupEv+0x120)[0x7b8bc0]
/usr/local/mariadb/columnstore/mysql//bin/mysqld(_ZN14Item_sum_count7val_intEv+0x16)[0x7b5c66]
/usr/local/mariadb/columnstore/mysql//bin/mysqld(_ZN4Item4sendEP8ProtocolP6String+0x20c)[0x73a1ac]
/usr/local/mariadb/columnstore/mysql//bin/mysqld(_ZN8Protocol19send_result_set_rowEP4ListI4ItemE+0x10c)[0x54530c]
/usr/local/mariadb/columnstore/mysql//bin/mysqld(_ZN11select_send9send_dataER4ListI4ItemE+0x55)[0x58caa5]
/usr/local/mariadb/columnstore/mysql//bin/mysqld(_Z14end_send_groupP4JOINP13st_join_tableb+0x366)[0x5ea186]
/usr/local/mariadb/columnstore/mysql//bin/mysqld[0x5f4e2b]
/usr/local/mariadb/columnstore/mysql//bin/mysqld(_ZN4JOIN10exec_innerEv+0xf83)[0x609cc3]
/usr/local/mariadb/columnstore/mysql//bin/mysqld(_ZN4JOIN4execEv+0x4e)[0x60b38e]
/usr/local/mariadb/columnstore/mysql//bin/mysqld(_Z12mysql_selectP3THDPPP4ItemP10TABLE_LISTjR4ListIS1_ES2_jP8st_orderSB_S2_SB_yP13select_resultP18st_select_lex_unitP13st_select_lex+0x21e)[0x60b61e]
/usr/local/mariadb/columnstore/mysql//bin/mysqld(_Z13handle_selectP3THDP3LEXP13select_resultm+0x276)[0x60c516]
/usr/local/mariadb/columnstore/mysql//bin/mysqld[0x5b44ac]
/usr/local/mariadb/columnstore/mysql//bin/mysqld(_Z21mysql_execute_commandP3THD+0x548b)[0x5bd6eb]
/usr/local/mariadb/columnstore/mysql//bin/mysqld(_Z11mysql_parseP3THDPcjP12Parser_state+0x25e)[0x5bf2fe]
/usr/local/mariadb/columnstore/mysql//bin/mysqld(_Z16dispatch_command19enum_server_commandP3THDPcj+0x1e9c)[0x5c3f1c]
/usr/local/mariadb/columnstore/mysql//bin/mysqld(_Z10do_commandP3THD+0xed)[0x5c419d]
/usr/local/mariadb/columnstore/mysql//bin/mysqld(_Z24do_handle_one_connectionP3THD+0x1e4)[0x680a84]
/usr/local/mariadb/columnstore/mysql//bin/mysqld(handle_one_connection+0x40)[0x680b10]
/lib64/libpthread.so.0(+0x7aa1)[0x7f17343e8aa1]
/lib64/libc.so.6(clone+0x6d)[0x7f1732671bcd]



 Comments   
Comment by David Thompson (Inactive) [ 2017-08-11 ]

Can't reproduce this on my local centos 7 test instance. But maybe you can see something with the crash log?

Comment by Andrew Hutchings (Inactive) [ 2017-08-12 ]

Hi MG, can you please let us know what platform you are running on? There are subtle differences between the various platforms and it would help us analyse that stack.

Comment by MG [ 2017-08-12 ]

It turns out to happen with this setting in mysqld:

max_heap_table_size=16K

You can ignore the uploaded file (now deleted)

Comment by MG [ 2017-08-16 ]

This seems to be a duplicate of MDEV-12136

Comment by Andrew Hutchings (Inactive) [ 2017-08-16 ]

Whilst I haven't been able to reproduce this, I think you are correct. In which case the fix will be included in 1.0.11. If you could re-test once this is released that would be really helpful.

Comment by MG [ 2017-08-24 ]

This is no longer an issue after upgrading to the latest GA:

Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 6
Server version: 10.1.26-MariaDB Columnstore 1.0.11-1

Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> select count(distinct table_schema) from information_schema.tables;
------------------------------

count(distinct table_schema)

------------------------------

6

------------------------------
1 row in set (0.00 sec)

MariaDB [(none)]> select count(distinct FILENAME) from information_schema.COLUMNSTORE_FILES;
--------------------------

count(distinct FILENAME)

--------------------------

155

--------------------------
1 row in set (0.13 sec)

Comment by Andrew Hutchings (Inactive) [ 2017-08-24 ]

Thank you for confirming. I'll close this ticket then.

Comment by Andrew Hutchings (Inactive) [ 2017-08-24 ]

Closed as a duplication of an MDEV as discussed.

Generated at Thu Feb 08 02:24:26 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.