[MDEV-12664] Crash when using NOT IN (SUBQUERY with distinct) in where clause Created: 2017-05-02  Updated: 2020-08-25  Resolved: 2017-05-16

Status: Closed
Project: MariaDB Server
Component/s: Server
Affects Version/s: 10.1.22
Fix Version/s: 10.1.23

Type: Bug Priority: Major
Reporter: Ben Stillman Assignee: Oleksandr Byelkin
Resolution: Cannot Reproduce Votes: 0
Labels: None


 Description   

The mysql error log is...

170428 13:25:15 mysqld_safe mysqld from pid file /var/lib/mysql/redacted.pid ended
170428 13:25:16 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
2017-04-28 13:25:16 139688169711648 [Note] /usr/sbin/mysqld (mysqld 10.1.22-MariaDB) starting as process 30301 ...
2017-04-28 13:25:17 139688169711648 [Note] InnoDB: Using mutexes to ref count buffer pool pages
2017-04-28 13:25:17 139688169711648 [Note] InnoDB: The InnoDB memory heap is disabled
2017-04-28 13:25:17 139688169711648 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2017-04-28 13:25:17 139688169711648 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2017-04-28 13:25:17 139688169711648 [Note] InnoDB: Compressed tables use zlib 1.2.3
2017-04-28 13:25:17 139688169711648 [Note] InnoDB: Using Linux native AIO
2017-04-28 13:25:17 139688169711648 [Note] InnoDB: Using SSE crc32 instructions
2017-04-28 13:25:17 139688169711648 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2017-04-28 13:25:17 139688169711648 [Note] InnoDB: Completed initialization of buffer pool
2017-04-28 13:25:17 139688169711648 [Note] InnoDB: Highest supported file format is Barracuda.
2017-04-28 13:25:17 139688169711648 [Note] InnoDB: 128 rollback segment(s) are active.
2017-04-28 13:25:17 139688169711648 [Note] InnoDB: Waiting for purge to start
2017-04-28 13:25:17 139688169711648 [Note] InnoDB: Percona XtraDB (http://www.percona.com) 5.6.35-80.0 started; log sequence number 111038009
2017-04-28 13:25:17 139687408662272 [Note] InnoDB: Dumping buffer pool(s) not yet started
2017-04-28 13:25:17 139688169711648 [Note] Plugin 'FEEDBACK' is disabled.
2017-04-28 13:25:17 139688169711648 [Note] Server socket created on IP: '127.0.0.1'.
2017-04-28 13:25:17 139688169711648 [Note] /usr/sbin/mysqld: ready for connections.
Version: '10.1.22-MariaDB' socket: '/var/lib/mysql/mysql.sock' port: 3306 MariaDB Server
170428 14:03: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.22-MariaDB
key_buffer_size=134217728
read_buffer_size=131072
max_used_connections=9
max_threads=153
thread_count=8
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 467121 K bytes of memory
Hope that's ok; if not, decrease some variables in the equation.
 
Thread pointer: 0x7f0b86eb3008
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 = 0x7f0b7c7b4140 thread_stack 0x48400
/usr/sbin/mysqld(my_print_stacktrace+0x2b)[0x7f0bb064ffbb]
/usr/sbin/mysqld(handle_fatal_signal+0x4d5)[0x7f0bb01aabe5]
/lib64/libpthread.so.0(+0x374e60f710)[0x7f0baf7ac710]
/usr/sbin/mysqld(_ZN4JOIN4execEv+0x1a)[0x7f0bb008ddda]
/usr/sbin/mysqld(_ZN24subselect_hash_sj_engine4execEv+0x4a)[0x7f0bb023899a]
/usr/sbin/mysqld(_ZN14Item_subselect4execEv+0x5a)[0x7f0bb022de2a]
mysys/stacktrace.c:268(my_print_stacktrace)[0x7f0bb022d90c]
/usr/sbin/mysqld(_ZN17Item_in_optimizer7val_intEv+0x16d)[0x7f0bb01dbb5d]
/usr/sbin/mysqld(_ZN14Item_cache_int11cache_valueEv+0x2a)[0x7f0bb01b8d1a]
sql/sql_analyze_stmt.h:97(Time_and_counter_tracker::incr_loops())[0x7f0bb01caeb7]
sql/item_subselect.cc:5378(subselect_hash_sj_engine::exec())[0x7f0bb01d2b8f]
/usr/sbin/mysqld(+0x484d9e)[0x7f0bb0060d9e]
sql/item_cmpfunc.cc:1635(Item_in_optimizer::val_int())[0x7f0bb006b14e]
/usr/sbin/mysqld(+0x49ce4d)[0x7f0bb0078e4d]
sql/item.cc:8898(Item_cache_int::cache_value())[0x7f0bb008bea0]
sql/sql_select.cc:2512(JOIN::exec())[0x7f0bb008de1d]
sql/sql_select.cc:3447(mysql_select(THD*, Item***, TABLE_LIST*, unsigned int, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, unsigned long long, select_result*, st_select_lex_unit*, st_select_lex*))[0x7f0bb008a7da]
sql/sql_select.cc:384(handle_select(THD*, LEX*, select_result*, unsigned long))[0x7f0bb008e0fd]
/usr/sbin/mysqld(+0x452352)[0x7f0bb002e352]
sql/sql_parse.cc:5921(execute_sqlcom_select)[0x7f0bb003a64a]
sql/sp_head.cc:3213(sp_instr_stmt::exec_core(THD*, unsigned int*))[0x7f0bb02a6a5e]
sql/sp_head.cc:2977(sp_lex_keeper::reset_lex_and_exec_core(THD*, unsigned int*, bool, sp_instr*))[0x7f0bb02ac36e]
sql/sp_head.cc:3128(sp_instr_stmt::execute(THD*, unsigned int*))[0x7f0bb02ac865]
sql/sp_head.cc:1317(sp_head::execute(THD*, bool))[0x7f0bb02a98bc]
sql/sp_head.cc:2102(sp_head::execute_procedure(THD*, List<Item>*))[0x7f0bb02aac26]
sql/sql_parse.cc:2415(do_execute_sp)[0x7f0bb003acca]
sql/sql_parse.cc:7343(mysql_parse(THD*, char*, unsigned int, Parser_state*))[0x7f0bb003d934]
sql/sql_parse.cc:1490(dispatch_command(enum_server_command, THD*, char*, unsigned int))[0x7f0bb00403b3]
sql/sql_parse.cc:1111(do_command(THD*))[0x7f0bb0040931]
sql/sql_connect.cc:1349(do_handle_one_connection(THD*))[0x7f0bb00ff8bf]
sql/sql_connect.cc:1263(handle_one_connection)[0x7f0bb00ff9f7]
/lib64/libpthread.so.0(+0x374e6079d1)[0x7f0baf7a49d1]
/lib64/libc.so.6(clone+0x6d)[0x7f0badc8fb6d]
 
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (0x7f0baa52e020): is an invalid pointer
Connection ID (thread ID): 20
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.
 
We think the query pointer is invalid, but we will try to print it anyway.
Query: select * from risk_sod
where cport_legal_entity_id not in(select distinct(rca.cport_legal_entity_id) from risk_client_accounts rca)
 
170428 14:03:45 mysqld_safe Number of processes running now: 0
170428 14:03:45 mysqld_safe mysqld restarted
2017-04-28 14:03:45 140335627704352 [Note] /usr/sbin/mysqld (mysqld 10.1.22-MariaDB) starting as process 31220 ...
2017-04-28 14:03:46 140335627704352 [Note] InnoDB: Using mutexes to ref count buffer pool pages
2017-04-28 14:03:46 140335627704352 [Note] InnoDB: The InnoDB memory heap is disabled
2017-04-28 14:03:46 140335627704352 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2017-04-28 14:03:46 140335627704352 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2017-04-28 14:03:46 140335627704352 [Note] InnoDB: Compressed tables use zlib 1.2.3
2017-04-28 14:03:46 140335627704352 [Note] InnoDB: Using Linux native AIO
2017-04-28 14:03:46 140335627704352 [Note] InnoDB: Using SSE crc32 instructions
2017-04-28 14:03:46 140335627704352 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2017-04-28 14:03:46 140335627704352 [Note] InnoDB: Completed initialization of buffer pool
2017-04-28 14:03:46 140335627704352 [Note] InnoDB: Highest supported file format is Barracuda.
2017-04-28 14:03:46 140335627704352 [Note] InnoDB: Starting crash recovery from checkpoint LSN=111038019
2017-04-28 14:03:46 140335627704352 [Note] InnoDB: Restoring possible half-written data pages from the doublewrite buffer...
2017-04-28 14:03:46 140335627704352 [Note] InnoDB: Starting final batch to recover 2 pages from redo log
2017-04-28 14:03:46 140335627704352 [Note] InnoDB: 128 rollback segment(s) are active.
2017-04-28 14:03:46 140335627704352 [Note] InnoDB: Waiting for purge to start
2017-04-28 14:03:46 140335627704352 [Note] InnoDB: Percona XtraDB (http://www.percona.com) 5.6.35-80.0 started; log sequence number 111038538
2017-04-28 14:03:47 140334854022912 [Note] InnoDB: Dumping buffer pool(s) not yet started
2017-04-28 14:03:47 140335627704352 [Note] Plugin 'FEEDBACK' is disabled.
2017-04-28 14:03:47 140335627704352 [Note] Recovering after a crash using tc.log
2017-04-28 14:03:47 140335627704352 [Note] Starting crash recovery...
2017-04-28 14:03:47 140335627704352 [Note] Crash recovery finished.
2017-04-28 14:03:47 140335627704352 [Note] Server socket created on IP: '127.0.0.1'.
2017-04-28 14:03:47 140335627704352 [Note] /usr/sbin/mysqld: ready for connections.
Version: '10.1.22-MariaDB' socket: '/var/lib/mysql/mysql.sock' port: 3306 MariaDB Server{quote}

The configs are completely default with the exception of:
bind-address=127.0.0.1
thread_pool_size=32



 Comments   
Comment by Oleksandr Byelkin [ 2017-05-10 ]

Sorry but there is nothing to analyse really. We need at least schema, but also good to have SP where query was, even better to have data and be able to repeat the crash.

Comment by Oleksandr Byelkin [ 2017-05-16 ]

I was not able to repeat

Comment by Oleksandr Byelkin [ 2017-05-16 ]

Fill free reopen it when the way to repeat will be found.

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