[MDEV-6924] Server crashed on CREATE TABLE AS SELECT Created: 2014-10-24  Updated: 2017-03-28  Resolved: 2014-11-17

Status: Closed
Project: MariaDB Server
Component/s: Data Definition - Temporary
Affects Version/s: 10.0.14-galera
Fix Version/s: 5.5.41-galera, 10.0.15-galera

Type: Bug Priority: Major
Reporter: Matyashov Andrey Assignee: Nirbhay Choubey (Inactive)
Resolution: Fixed Votes: 0
Labels: galera
Environment:

CentOS release 6.5 (Final)

Linux db-03.sdn 2.6.32-431.29.2.el6.x86_64 #1 SMP Tue Sep 9 21:36:05 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

mysqld Ver 10.0.14-MariaDB-wsrep for Linux on x86_64 (MariaDB Server, wsrep_25.10.r4144)


Issue Links:
PartOf
includes MDEV-12382 Query crashes CREATE TABLE XX AS SELE... Closed
Relates
relates to MDEV-7322 Option to allow setting the binlog_fo... Closed

 Description   

my.cnf:

[mariadb]
wsrep_cluster_address=gcomm://10.100.22.21?pc.wait_prim=no&pc.bootstrap=yes
wsrep_provider=/usr/lib64/galera/libgalera_smm.so
wsrep_sst_auth=root:*mysecret*
log-error=/var/log/mysql-err.log
key_buffer=16M
max_allowed_packet=64M
thread_stack=192K
thread_cache_size=8
query_cache_limit=1M
query_cache_size=16M
expire_logs_days=10
max_binlog_size=100M
default-storage-engine = innodb
innodb_file_per_table
collation-server = utf8_general_ci
init-connect = 'SET NAMES utf8'
character-set-server = utf8
skip-name-resolve
!includedir /etc/my.cnf.d

MariaDB [sdn]> CREATE TEMPORARY TABLE `temp_table` AS SELECT * FROM `section_18` WHERE id = 3;
ERROR 2013 (HY000): Lost connection to MySQL server during query

mysql-err.log:

141024 13:26:26 [Note] /usr/sbin/mysqld: ready for connections.
Version: '10.0.14-MariaDB-wsrep-log'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MariaDB Server, wsrep_25.10.r4144
141024 13:26:26 [Note] WSREP: wsrep_notify_cmd is not defined, skipping notification.
141024 13:26:26 [Note] WSREP: REPL Protocols: 5 (3, 1)
141024 13:26:26 [Note] WSREP: Service thread queue flushed.
141024 13:26:26 [Note] WSREP: Assign initial position for certification: 100952042, protocol version: 3
141024 13:26:26 [Note] WSREP: Service thread queue flushed.
141024 13:26:26 [Note] WSREP: Synchronized with group, ready for connections
141024 13:26:26 [Note] WSREP: wsrep_notify_cmd is not defined, skipping notification.
141024 13:26:26 [Note] WSREP: Nobody is waiting for SST.
141024 13:27:04 [ERROR] mysqld: Table './sdn/users' is marked as crashed and should be repaired
141024 13:27:04 [Warning] Checking table:   './sdn/users'
141024 13:27:20 [Note] WSREP: skipping tmp table DML: THD: 5 tmp: 2 SQL: CREATE TEMPORARY TABLE `temp_table` AS SELECT * FROM `section_18` WHERE id = 3
141024 13:27:20 [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 http://kb.askmonty.org/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.0.14-MariaDB-wsrep-log
key_buffer_size=16777216
read_buffer_size=131072
max_used_connections=2
max_threads=153
thread_count=3
It is possible that mysqld could use up to 
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 352528 K  bytes of memory
Hope that's ok; if not, decrease some variables in the equation.
 
Thread pointer: 0x0x7f6f44b7e008
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 = 0x7f6f618f8d00 thread_stack 0x30000
/usr/sbin/mysqld(my_print_stacktrace+0x2b)[0xb9158b]
/usr/sbin/mysqld(handle_fatal_signal+0x398)[0x742168]
/lib64/libpthread.so.0(+0xf710)[0x7f6f61594710]
/usr/sbin/mysqld(_ZN13MYSQL_BIN_LOG5writeEP9Log_eventPc+0x161)[0x7ef781]
/usr/sbin/mysqld(_ZN3THD12binlog_queryENS_22enum_binlog_query_typeEPKcmbbbi+0xe2)[0x5b4752]
/usr/sbin/mysqld(_ZN13select_insert8send_eofEv+0x139)[0x5c2389]
/usr/sbin/mysqld(_ZN13select_create8send_eofEv+0x16)[0x5c2636]
/usr/sbin/mysqld[0x61a51e]
/usr/sbin/mysqld(_ZN4JOIN10exec_innerEv+0xa3d)[0x62d66d]
/usr/sbin/mysqld(_ZN4JOIN4execEv+0x11)[0x62f4e1]
/usr/sbin/mysqld(_Z12mysql_selectP3THDPPP4ItemP10TABLE_LISTjR4ListIS1_ES2_jP8st_orderSB_S2_SB_yP13select_resultP18st_select_lex_unitP13st_select_lex+0x1dd)[0x62c0ad]
/usr/sbin/mysqld(_Z13handle_selectP3THDP3LEXP13select_resultm+0x28d)[0x62f83d]
/usr/sbin/mysqld(_Z21mysql_execute_commandP3THD+0x79fe)[0x5e1d0e]
/usr/sbin/mysqld[0x5e2632]
/usr/sbin/mysqld[0x5e2f2b]
/usr/sbin/mysqld(_Z16dispatch_command19enum_server_commandP3THDPcj+0x1770)[0x5e4be0]
/usr/sbin/mysqld(_Z10do_commandP3THD+0x1ca)[0x5e547a]
/usr/sbin/mysqld(_Z24do_handle_one_connectionP3THD+0x55b)[0x6a1a2b]
/usr/sbin/mysqld(handle_one_connection+0x42)[0x6a1b22]
/lib64/libpthread.so.0(+0x79d1)[0x7f6f6158c9d1]
/lib64/libc.so.6(clone+0x6d)[0x7f6f5fca686d]
 
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (0x7f6f2ac74020): is an invalid pointer
Connection ID (thread ID): 5
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
 
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.
141024 13:27:20 mysqld_safe Number of processes running now: 0
141024 13:27:20 mysqld_safe WSREP: not restarting wsrep node automatically
141024 13:27:20 mysqld_safe mysqld from pid file /var/lib/mysql/db-01.sdn.pid ended



 Comments   
Comment by Nirbhay Choubey (Inactive) [ 2014-10-25 ]

This seem to happening when STATEMENT binlog format is used, however the
recommended binlog format for Galera replication is ROW.

Comment by Nirbhay Choubey (Inactive) [ 2014-10-26 ]

http://lists.askmonty.org/pipermail/commits/2014-October/006857.html

Comment by Jan Lindström (Inactive) [ 2014-10-27 ]

Your fix is correct but would it be better to give an error if unsupported binlog format is used and refuse to change the binlog format. Similarly, server should not start/use unsupported binlog format if it is given on my.cnf.

Comment by Nirbhay Choubey (Inactive) [ 2014-10-30 ]

http://lists.askmonty.org/pipermail/commits/2014-October/006890.html

Comment by Jan Lindström (Inactive) [ 2014-10-30 ]

Ok to push both changes, we might need also the first one later if (when) Galera starts to support other binlog formats.

Comment by Nirbhay Choubey (Inactive) [ 2014-11-17 ]

http://bazaar.launchpad.net/~maria-captains/maria/maria-5.5-galera/revision/3544
http://bazaar.launchpad.net/~maria-captains/maria/maria-10.0-galera/revision/3900

Generated at Thu Feb 08 07:15:38 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.