[MCOL-618] innodb query crash only happens on columnstore server Created: 2017-03-09  Updated: 2017-05-09  Resolved: 2017-05-04

Status: Closed
Project: MariaDB ColumnStore
Component/s: MariaDB Server
Affects Version/s: 1.0.7
Fix Version/s: 1.0.8, 1.1.0

Type: Bug Priority: Major
Reporter: David Thompson (Inactive) Assignee: Daniel Lee (Inactive)
Resolution: Fixed Votes: 0
Labels: None

Sprint: 2017-5, 2017-6, 2017-7, 2017-8, 2017-9

 Description   

Please be advised the queries that they are failing on are on table running on innodb engine. The Mariadb server runs fine when Columnstore is not there in the Mariadb server, but when Columnstore is added, it is failing on innodb engine "Outer join" queries.

170308 23:36:45 [ERROR] mysqld got signal 11 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.

To report this bug, see https://mariadb.com/kb/en/reporting-bugs

We will try our best to scrape up some info that will hopefully help
diagnose the problem, but since we have already crashed,
something is definitely wrong and this may fail.

Server version: 10.1.21-MariaDB
key_buffer_size=1098907648
read_buffer_size=2097152
max_used_connections=104
max_threads=602
thread_count=104
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 3551255 K bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

Thread pointer: 0x7f0ce1a1faa8
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 = 0x7f0c71212ed8 thread_stack 0x80000
/usr/local/mariadb/columnstore/mysql//bin/mysqld(my_print_stacktrace+0x29)[0x7f0cde5a7229]
/usr/local/mariadb/columnstore/mysql//bin/mysqld(handle_fatal_signal+0x2fd)[0x7f0cde1893ed]
/lib/x86_64-linux-gnu/libpthread.so.0(+0xf890)[0x7f0cdd7ec890]
/usr/local/mariadb/columnstore/mysql//bin/mysqld(_ZN18Prepared_statement7executeEP6Stringb+0x22d)[0x7f0cde048a7d]
/usr/local/mariadb/columnstore/mysql//bin/mysqld(ZN18Prepared_statement12execute_loopEP6StringbPhS2+0xa4)[0x7f0cde048f24]
/usr/local/mariadb/columnstore/mysql//bin/mysqld(_Z19mysqld_stmt_executeP3THDPcj+0xc9)[0x7f0cde049119]
mysys/stacktrace.c:268(my_print_stacktrace)[0x7f0cde039d3a]
sql/table.h:1375(TABLE::isInfiniDB())[0x7f0cde03b5f7]
sql/sql_connect.cc:1349(do_handle_one_connection(THD*))[0x7f0cde0f3b04]
sql/sql_connect.cc:1263(handle_one_connection)[0x7f0cde0f3b97]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x8064)[0x7f0cdd7e5064]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x6d)[0x7f0cdc04562d]

Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (0x7f0c40031c18): is an invalid pointer
Connection ID (thread ID): 6
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=on,exists_to_in=on,orderby_uses_equalities=off

The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
information that should help you find out what is causing the crash.



 Comments   
Comment by David Thompson (Inactive) [ 2017-03-09 ]

Reference system is a 10.1.21 mariadb server install so it would appear that this is something specific to the columnstore fork of server.

Comment by Andrew Hutchings (Inactive) [ 2017-03-09 ]

Cause appears to be accessing global_list->table->s when the table doesn't use an engine (derived, etc...). The global_list->table pointer exists but appears to point to unallocated data.

Comment by Andrew Hutchings (Inactive) [ 2017-03-09 ]

Reproduce by creating a table called 't1' in 'test' (can be anything) and run the following PHP:

<?php
$data = "t1";
$conn = new mysqli("127.0.0.1", "root", "", "test");
 
$stmt = $conn->prepare("SELECT table_name from information_schema.tables where table_name = ?");
$stmt->bind_param("s", $data);
 
$stmt->execute();
$stmt->bind_result($res);
$stmt->fetch();
printf("%s\n", $res);
$stmt->close();
$conn->close();

Comment by Andrew Hutchings (Inactive) [ 2017-03-10 ]

Crash happens with derived tables (likely in the original crash), views and I_S tables. Patch handles all these cases.

Pull request for develop and develop-1.0 pending. This may or may not collide with the 10.2 work in develop.

Comment by Daniel Lee (Inactive) [ 2017-05-04 ]

Build tested: 1.0.9-1 and 1.1.0-1 GitHub source
1.0.9-1
[root@localhost mariadb-columnstore-server]# git show
commit 675a7de1d5d793900b92549e1da3d82a49caa381
Merge: 6e3afaa 76bfb2b
Author: dhall-InfiniDB <david.hall@mariadb.com>
Date: Thu May 4 11:02:43 2017 -0500
Merge pull request #47 from mariadb-corporation/MCOL-693-1.0
MCOL-693 Fix non-string SP parameters
[root@localhost mariadb-columnstore-server]# cd mariadb-columnstore-engine/
[root@localhost mariadb-columnstore-engine]# git show
commit 85c7be75625b7b3f515b83956ee2b0acb6c550a3
Merge: b6efffb f5881ce
Author: dhall-InfiniDB <david.hall@mariadb.com>
Date: Wed Apr 26 09:42:51 2017 -0500
Merge pull request #159 from mariadb-corporation/MCOL-683-1.0
MCOL-683 Fix nested ADDDATE and DATE_FORMAT
1.1.0-1
[root@localhost mariadb-columnstore-server]# git show
commit bd13090ea83f35f125c1d103204c0070ae0f721b
Merge: abc4c52 f63ee30
Author: dhall-InfiniDB <david.hall@mariadb.com>
Date: Thu May 4 11:01:51 2017 -0500
Merge pull request #46 from mariadb-corporation/MCOL-693
MCOL-693 Fix non-string SP parameters
[root@localhost mariadb-columnstore-server]# cd mariadb-columnstore-engine/
[root@localhost mariadb-columnstore-engine]# git show
commit a6dfc3c366c861d5777a9931e18f594405e4aab6
Merge: 1c2a8fc 00cd7f4
Author: dhall-InfiniDB <david.hall@mariadb.com>
Date: Thu May 4 10:33:30 2017 -0500
Merge pull request #168 from mariadb-corporation/MCOL-698
MCOL-698 Fix joiner for LONGTEXT

Verified in both 1.0.9-1 and 1.1.0-1 using the php script in the ticket, for both columnstore and innodb tables.

It also have been fixed in 1.0.8-1

Comment by David Thompson (Inactive) [ 2017-05-09 ]

correcting fix version from 1.0.9 to 1.0.8

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