[MDEV-26173] Spider randomly crashes on SELECT with LIMIT/OFFSET Created: 2021-07-18  Updated: 2021-08-13  Resolved: 2021-08-13

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - Spider
Affects Version/s: 10.5.9
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Nayuta Yanagisawa (Inactive) Assignee: Nayuta Yanagisawa (Inactive)
Resolution: Not a Bug Votes: 0
Labels: None


 Description   

How to reproduce:

SET @@session.spider_same_server_link = ON; 
 
use test;
 
GRANT ALL PRIVILEGES ON *.* TO 'spinne'@'127.0.0.1'  IDENTIFIED BY 'password';
 
CREATE SERVER IF NOT EXISTS data1
FOREIGN DATA WRAPPER mysql
OPTIONS(
HOST '127.0.0.1',
DATABASE 'test',
USER 'spinne',
PORT 16000,
PASSWORD 'password'
);
 
CREATE TABLE IF NOT EXISTS `spider_tab` (
  `col1`int,
  `col2`int,
  PRIMARY KEY (`col1`)
) ENGINE=SPIDER DEFAULT CHARSET=utf8 COMMENT='table "spider_data_tab"'
PARTITION BY LIST COLUMNS(`col1`)
(PARTITION `pt1` DEFAULT COMMENT = 'srv "data1"' ENGINE = SPIDER);
 
CREATE TABLE IF NOT EXISTS `spider_data_tab` (
  `col1` int,
  `col2` int,
  PRIMARY KEY (`col1`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 
insert into `spider_data_tab` VALUES (1,999), (2,999);
 
# Repeat a few times
select * from spider_tab limit 1 offset 1;
 
select * from spider_tab offset 1;
 
# Repeat a few times
select * from spider_tab limit 1 offset 1;

Error log:

Version: '10.5.9-MariaDB-debug-log'  socket: '/home/vagrant/repo/mariadb-server/bld/mysql-test/var/tmp/mysqld.1.1.sock'  port: 16000  Source distribution
mariadbd: /home/vagrant/repo/mariadb-server/sql/sql_error.cc:445: void Diagnostics_area::set_error_status(uint, const char*, const char*, const Sql_user_condition_identity&, const Sql_condition*): Assertion `! is_set() || m_can_overwrite_status' failed.
210718 18:47:06 [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.5.9-MariaDB-debug-log
key_buffer_size=1048576
read_buffer_size=131072
max_used_connections=2
max_threads=153
thread_count=23
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 63744 K  bytes of memory
Hope that's ok; if not, decrease some variables in the equation.
 
Thread pointer: 0x7f4728002388
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 = 0x7f473e159d38 thread_stack 0x49000
mysys/stacktrace.c:212(my_print_stacktrace)[0x5564a17779ba]
sql/signal_handler.cc:211(handle_fatal_signal)[0x5564a0e56935]
??:0(__restore_rt)[0x7f473ecf03c0]
??:0(gsignal)[0x7f473e7db18b]
??:0(abort)[0x7f473e7ba859]
/lib/x86_64-linux-gnu/libc.so.6(+0x25729)[0x7f473e7ba729]
??:0(__assert_fail)[0x7f473e7cbf36]
sql/sql_error.cc:448(Diagnostics_area::set_error_status(unsigned int, char const*, char const*, Sql_user_condition_identity const&, Sql_condition const*))[0x5564a0a95910]
sql/sql_class.cc:1149(THD::raise_condition(unsigned int, char const*, Sql_state_errno_level::enum_warning_level, Sql_user_condition_identity const&, char const*))[0x5564a0a6e847]
sql/sql_class.h:4546(THD::raise_condition(unsigned int, char const*, Sql_state_errno_level::enum_warning_level, char const*))[0x5564a09aaf80]
sql/mysqld.cc:3087(my_message_sql)[0x5564a099dc0c]
mysys/my_error.c:154(my_printf_error)[0x5564a176844f]
spider/spd_db_mysql.cc:2012(spider_db_mbase::connect(char*, char*, char*, long, char*, char*, int, long long))[0x7f473e2c8d27]
spider/spd_db_conn.cc:178(spider_db_connect(st_spider_share const*, st_spider_conn*, int))[0x7f473e1df06f]
spider/spd_db_conn.cc:293(spider_db_conn_queue_action(st_spider_conn*))[0x7f473e1dfb9b]
spider/spd_db_conn.cc:629(spider_db_before_query(st_spider_conn*, int*))[0x7f473e1e1b19]
spider/spd_db_conn.cc:931(spider_db_set_names_internal(st_spider_transaction*, st_spider_share*, st_spider_conn*, int, int*))[0x7f473e1e387e]
spider/spd_db_conn.cc:977(spider_db_set_names(ha_spider*, st_spider_conn*, int))[0x7f473e1e3c80]
spider/spd_db_mysql.cc:14378(spider_mbase_handler::show_table_status(int, int, unsigned int))[0x7f473e2ff341]
spider/spd_db_conn.cc:6351(spider_db_show_table_status(ha_spider*, int, int, unsigned int))[0x7f473e1fa75a]
spider/spd_table.cc:8026(spider_get_sts(st_spider_share*, int, long, ha_spider*, double, int, int, int, unsigned int))[0x7f473e256485]
spider/spd_table.cc:10438(spider_table_bg_sts_action(void*))[0x7f473e25ded0]
??:0(start_thread)[0x7f473ece4609]
??:0(clone)[0x7f473e8b7293]
 
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (0x0): (null)
Connection ID (thread ID): 7
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=on,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=on,condition_pushdown_for_derived=on,split_materialized=on,condition_pushdown_for_subquery=on,rowid_filter=on,condition_pushdown_from_having=on,not_null_range_scan=off
 
The manual page at https://mariadb.com/kb/en/how-to-produce-a-full-stack-trace-for-mysqld/ 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:



 Comments   
Comment by Nayuta Yanagisawa (Inactive) [ 2021-07-24 ]

The crash might be due to my environment. Thus, I change the priority to 'major'.

Comment by Nayuta Yanagisawa (Inactive) [ 2021-08-13 ]

This seems to be due to my environment. So, I close the issue.

Generated at Thu Feb 08 09:43:17 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.