[MCOL-924] Creating table with CONNECT engine causes server crash Created: 2017-09-14  Updated: 2020-08-25  Resolved: 2017-10-23

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

Type: Bug Priority: Minor
Reporter: Geoff Montee (Inactive) Assignee: Andrew Hutchings (Inactive)
Resolution: Not a Bug Votes: 3
Labels: connect-engine, crash

Issue Links:
Relates
relates to MCOL-682 include connect engine in columnstore... Closed

 Description   

The CONNECT engine is not currently included in ColumnStore, as specified in MCOL-682. However, some users have tried using CONNECT with ColumnStore by pulling ha_connect.so from a binary tarball of regular MariaDB server. This does not seem to work with ColumnStore, and it leads to a server crash.

Here is how I tried on RHEL 7:

wget https://downloads.mariadb.org/f/mariadb-10.1.26/bintar-linux-glibc_214-x86_64/mariadb-10.1.26-linux-glibc_214-x86_64.tar.gz
tar -tvzf mariadb-10.1.26-linux-glibc_214-x86_64.tar.gz
cd mariadb-10.1.26-linux-glibc_214-x86_64/lib/plugin/
sudo install ha_connect.so /usr/local/mariadb/columnstore/mysql/lib/plugin/

The shared library included in this tarball seems to require a version of ODBC not present on RHEL 7, so I also had to do the following:

sudo yum install unixODBC
cd /usr/lib64
sudo ln -s libodbc.so libodbc.so.1

Then I installed CONNECT:

mcsmysql
INSTALL SONAME 'ha_connect.so';

And then I tried to create a table with it:

USE db1;
CREATE TABLE `tab` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `str` varchar(50) DEFAULT NULL
)
engine=CONNECT table_type=MYSQL
connection='mysql://user:password@hostname/db1/tab';

This caused a server crash:

170914 13:44:12 [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.26-MariaDB
key_buffer_size=536870912
read_buffer_size=4194304
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 = 1780789 K  bytes of memory
Hope that's ok; if not, decrease some variables in the equation.
 
Thread pointer: 0x7f770a406308
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 = 0x7f76cc568d98 thread_stack 0x80000
/usr/local/mariadb/columnstore/mysql//bin/mysqld(my_print_stacktrace+0x29)[0x7f77086127f9]
/usr/local/mariadb/columnstore/mysql//bin/mysqld(handle_fatal_signal+0x305)[0x7f77081d9925]
/lib64/libpthread.so.0(+0xf370)[0x7f7707823370]
/usr/local/mariadb/columnstore/mysql/lib/plugin/ha_connect.so(+0x8af5f)[0x7f76b5ec8f5f]
/usr/local/mariadb/columnstore/mysql//bin/mysqld(+0x587914)[0x7f77081da914]
/usr/local/mariadb/columnstore/mysql//bin/mysqld(_Z24plugin_foreach_with_maskP3THDPFcS0_P13st_plugin_intPvEijS3_+0x21e)[0x7f770808f24e]
/usr/local/mariadb/columnstore/mysql//bin/mysqld(_Z15ha_table_existsP3THDPKcS2_PP10handlerton+0x2a7)[0x7f77081e24e7]
/usr/local/mariadb/columnstore/mysql//bin/mysqld(+0x4aed42)[0x7f7708101d42]
/usr/local/mariadb/columnstore/mysql//bin/mysqld(_Z26mysql_create_table_no_lockP3THDPKcS2_P22Table_specification_stP10Alter_infoPbi+0xfa)[0x7f770810258a]
/usr/local/mariadb/columnstore/mysql//bin/mysqld(_Z18mysql_create_tableP3THDP10TABLE_LISTP22Table_specification_stP10Alter_info+0xef)[0x7f770810270f]
/usr/local/mariadb/columnstore/mysql//bin/mysqld(_Z21mysql_execute_commandP3THD+0x6f13)[0x7f7708084073]
/usr/local/mariadb/columnstore/mysql//bin/mysqld(_Z11mysql_parseP3THDPcjP12Parser_state+0x2eb)[0x7f770808496b]
/usr/local/mariadb/columnstore/mysql//bin/mysqld(_Z16dispatch_command19enum_server_commandP3THDPcj+0x2206)[0x7f770808ace6]
/usr/local/mariadb/columnstore/mysql//bin/mysqld(_Z10do_commandP3THD+0xc9)[0x7f770808b4e9]
/usr/local/mariadb/columnstore/mysql//bin/mysqld(_Z24do_handle_one_connectionP3THD+0x1c4)[0x7f77081458b4]
/usr/local/mariadb/columnstore/mysql//bin/mysqld(handle_one_connection+0x37)[0x7f7708145947]
/lib64/libpthread.so.0(+0x7dc5)[0x7f770781bdc5]
/lib64/libc.so.6(clone+0x6d)[0x7f77059d876d]
 
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (0x7f76ac034a00): is an invalid pointer
Connection ID (thread ID): 7
Status: NOT_KILLED
 
Optimizer switch: index_merge=off,index_merge_union=off,index_merge_sort_union=off,index_merge_intersection=off,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=off,derived_merge=off,derived_with_keys=off,firstmatch=off,loosescan=off,materialization=off,in_to_exists=on,semijoin=off,partial_match_rowid_merge=off,partial_match_table_scan=off,subquery_cache=off,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=off,join_cache_hashed=off,join_cache_bka=off,optimize_join_buffer_size=off,table_elimination=off,extended_keys=off,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.
 
We think the query pointer is invalid, but we will try to print it anyway.
Query: CREATE TABLE `tab` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `str` varchar(50) DEFAULT NULL
)
engine=CONNECT table_type=MYSQL
connection='mysql://maxscale:password@35.166.238.119/db1/tab'

I thought that this might be a problem with the ODBC library version mismatch, so I also tried ha_connect.so from the RHEL 7 RPM by doing the following:

wget http://ftp.utexas.edu/mariadb//mariadb-10.1.26/yum/rhel7-amd64/rpms/MariaDB-10.1.26-centos7-x86_64-connect-engine.rpm
mkdir rpm_contents
cd rpm_contents
rpm2cpio ../MariaDB-10.1.26-centos7-x86_64-connect-engine.rpm | cpio -idmv
cd ./usr/lib64/mysql/plugin/
sudo install ha_connect.so /usr/local/mariadb/columnstore/mysql/lib/plugin/

This lead to a similar crash:

170914 14:13:57 [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.26-MariaDB
key_buffer_size=536870912
read_buffer_size=4194304
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 = 1780789 K  bytes of memory
Hope that's ok; if not, decrease some variables in the equation.
 
Thread pointer: 0x7f92ac3c5528
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 = 0x7f926c36cd98 thread_stack 0x80000
/usr/local/mariadb/columnstore/mysql//bin/mysqld(my_print_stacktrace+0x29)[0x7f92a94517f9]
/usr/local/mariadb/columnstore/mysql//bin/mysqld(handle_fatal_signal+0x305)[0x7f92a9018925]
/lib64/libpthread.so.0(+0xf370)[0x7f92a8662370]
/usr/local/mariadb/columnstore/mysql/lib/plugin/ha_connect.so(+0x8b5ea)[0x7f92780f95ea]
/usr/local/mariadb/columnstore/mysql//bin/mysqld(+0x587914)[0x7f92a9019914]
/usr/local/mariadb/columnstore/mysql//bin/mysqld(_Z24plugin_foreach_with_maskP3THDPFcS0_P13st_plugin_intPvEijS3_+0x21e)[0x7f92a8ece24e]
/usr/local/mariadb/columnstore/mysql//bin/mysqld(_Z15ha_table_existsP3THDPKcS2_PP10handlerton+0x2a7)[0x7f92a90214e7]
mysys/stacktrace.c:268(my_print_stacktrace)[0x7f92a8f40d42]
sql/handler.cc:4958(discover_existence(THD*, st_plugin_int*, void*))[0x7f92a8f4158a]
sql/sql_table.cc:4781(create_table_impl(THD*, char const*, char const*, char const*, char const*, char const*, DDL_options_st, HA_CREATE_INFO*, Alter_info*, int, bool*, st_key**, unsigned int*, st_mysql_const_unsigned_lex_string*))[0x7f92a8f4170f]
sql/sql_parse.cc:3523(mysql_execute_command(THD*))[0x7f92a8ec3073]
sql/sql_parse.cc:7388(mysql_parse(THD*, char*, unsigned int, Parser_state*))[0x7f92a8ec396b]
sql/sql_parse.cc:1513(dispatch_command(enum_server_command, THD*, char*, unsigned int))[0x7f92a8ec9ce6]
sql/sql_parse.cc:1160(do_command(THD*))[0x7f92a8eca4e9]
sql/sql_connect.cc:1349(do_handle_one_connection(THD*))[0x7f92a8f848b4]
sql/sql_connect.cc:1263(handle_one_connection)[0x7f92a8f84947]
/lib64/libpthread.so.0(+0x7dc5)[0x7f92a865adc5]
/lib64/libc.so.6(clone+0x6d)[0x7f92a681776d]

Is CONNECT engine currently compatible with MariaDB ColumnStore?



 Comments   
Comment by Geoff Montee (Inactive) [ 2017-09-14 ]

Uninstalling the plugin causes a similar crash:

170914 14:23:26 [ERROR] mysqld got signal 6 ;
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.26-MariaDB
key_buffer_size=536870912
read_buffer_size=4194304
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 = 1780789 K  bytes of memory
Hope that's ok; if not, decrease some variables in the equation.
 
Thread pointer: 0x7f9200b9c048
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 = 0x7f91c41a2d98 thread_stack 0x80000
/usr/local/mariadb/columnstore/mysql//bin/mysqld(my_print_stacktrace+0x29)[0x7f91ff29d7f9]
/usr/local/mariadb/columnstore/mysql//bin/mysqld(handle_fatal_signal+0x305)[0x7f91fee64925]
/lib64/libpthread.so.0(+0xf370)[0x7f91fe4ae370]
/lib64/libc.so.6(gsignal+0x37)[0x7f91fc5a11d7]
/lib64/libc.so.6(abort+0x148)[0x7f91fc5a28c8]
mysys/stacktrace.c:268(my_print_stacktrace)[0x7f91fc5e0f07]
sql/signal_handler.cc:168(handle_fatal_signal)[0x7f91fc5e6da4]
sql/create_options.cc:458(free_sysvars(handlerton*, st_ha_create_table_option*) [clone .isra.17])[0x7f91fedf7130]
sql/handler.cc:469(ha_finalize_handlerton(st_plugin_int*))[0x7f91fee66cb4]
sql/sql_plugin.cc:1207(plugin_deinitialize(st_plugin_int*, bool))[0x7f91fed17879]
sql/sql_plugin.cc:1284(reap_plugins())[0x7f91fed1afde]
psi/mysql_thread.h:756(mysql_uninstall_plugin(THD*, st_mysql_lex_string const*, st_mysql_lex_string const*))[0x7f91fed1b4e2]
sql/sql_parse.cc:5658(mysql_execute_command(THD*))[0x7f91fed0c008]
sql/sql_parse.cc:7388(mysql_parse(THD*, char*, unsigned int, Parser_state*))[0x7f91fed0f96b]
sql/sql_parse.cc:1513(dispatch_command(enum_server_command, THD*, char*, unsigned int))[0x7f91fed15ce6]
sql/sql_parse.cc:1160(do_command(THD*))[0x7f91fed164e9]
sql/sql_connect.cc:1349(do_handle_one_connection(THD*))[0x7f91fedd08b4]
sql/sql_connect.cc:1263(handle_one_connection)[0x7f91fedd0947]
/lib64/libpthread.so.0(+0x7dc5)[0x7f91fe4a6dc5]
/lib64/libc.so.6(clone+0x6d)[0x7f91fc66376d]
 
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (0x7f919c004d30): is an invalid pointer
Connection ID (thread ID): 3
Status: NOT_KILLED
 
Optimizer switch: index_merge=off,index_merge_union=off,index_merge_sort_union=off,index_merge_intersection=off,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=off,derived_merge=off,derived_with_keys=off,firstmatch=off,loosescan=off,materialization=off,in_to_exists=on,semijoin=off,partial_match_rowid_merge=off,partial_match_table_scan=off,subquery_cache=off,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=off,join_cache_hashed=off,join_cache_bka=off,optimize_join_buffer_size=off,table_elimination=off,extended_keys=off,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.
 
We think the query pointer is invalid, but we will try to print it anyway.
Query: uninstall soname 'ha_connect.so'

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

Connect engine is not supported and we are not currently ABI compatible with the MariaDB Server releases so copying a .so for a plugin from one to the other is expected to crash. Therefore there is no bug here.

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