[MDEV-29527] Server crash in ha_s3::discover_check_version upon SELECT with partition pruning Created: 2022-09-13  Updated: 2024-01-23

Status: Open
Project: MariaDB Server
Component/s: Partitioning, Storage Engine - S3
Affects Version/s: 10.5, 10.6, 10.7, 10.8, 10.9, 10.10, 10.11, 11.0, 11.1, 11.2, 11.3, 11.4
Fix Version/s: 10.5, 10.6, 10.11, 11.0, 11.1, 11.2, 11.3

Type: Bug Priority: Major
Reporter: Elena Stepanova Assignee: Michael Widenius
Resolution: Unresolved Votes: 0
Labels: bp-fix


 Description   

--source include/have_partition.inc
 
DROP TABLE IF EXISTS t;
CREATE TABLE t (a INT) ENGINE=Aria PARTITION BY RANGE(a) (PARTITION p0 VALUES LESS THAN (10), PARTITION p1 VALUES LESS THAN (1000));
INSERT INTO t VALUES (1),(100); # Optional, fails either way
ALTER TABLE t ENGINE=S3;
SELECT * FROM t PARTITION (p1);
SELECT * FROM t PARTITION (p1);
 
DROP TABLE t;

10.5 fb70bb44

#3  <signal handler called>
#4  ha_s3::discover_check_version (this=0x7ff3fc059250) at /data/src/10.5/storage/maria/ha_s3.cc:874
#5  0x00005630196b5933 in ha_partition::discover_check_version (this=0x7ff3fc058950) at /data/src/10.5/sql/ha_partition.cc:3922
#6  0x0000563018f6bf92 in open_table (thd=0x7ff3fc000db8, table_list=0x7ff3fc015a08, ot_ctx=0x7ff4184b86b0) at /data/src/10.5/sql/sql_base.cc:1994
#7  0x0000563018f6fd8d in open_and_process_table (thd=0x7ff3fc000db8, tables=0x7ff3fc015a08, counter=0x7ff4184b8744, flags=0, prelocking_strategy=0x7ff4184b87c8, has_prelocking_list=false, ot_ctx=0x7ff4184b86b0) at /data/src/10.5/sql/sql_base.cc:3805
#8  0x0000563018f7106f in open_tables (thd=0x7ff3fc000db8, options=..., start=0x7ff4184b8728, counter=0x7ff4184b8744, flags=0, prelocking_strategy=0x7ff4184b87c8) at /data/src/10.5/sql/sql_base.cc:4288
#9  0x0000563018f72fc3 in open_and_lock_tables (thd=0x7ff3fc000db8, options=..., tables=0x7ff3fc015a08, derived=true, flags=0, prelocking_strategy=0x7ff4184b87c8) at /data/src/10.5/sql/sql_base.cc:5235
#10 0x0000563018f29863 in open_and_lock_tables (thd=0x7ff3fc000db8, tables=0x7ff3fc015a08, derived=true, flags=0) at /data/src/10.5/sql/sql_base.h:507
#11 0x00005630190214dc in execute_sqlcom_select (thd=0x7ff3fc000db8, all_tables=0x7ff3fc015a08) at /data/src/10.5/sql/sql_parse.cc:6236
#12 0x0000563019018cd9 in mysql_execute_command (thd=0x7ff3fc000db8) at /data/src/10.5/sql/sql_parse.cc:4006
#13 0x00005630190267ee in mysql_parse (thd=0x7ff3fc000db8, rawbuf=0x7ff3fc015310 "SELECT * FROM t PARTITION (p1)", length=30, parser_state=0x7ff4184b93d0, is_com_multi=false, is_next_command=false) at /data/src/10.5/sql/sql_parse.cc:8101
#14 0x000056301901288f in dispatch_command (command=COM_QUERY, thd=0x7ff3fc000db8, packet=0x7ff3fc00b5c9 "SELECT * FROM t PARTITION (p1)", packet_length=30, is_com_multi=false, is_next_command=false) at /data/src/10.5/sql/sql_parse.cc:1891
#15 0x00005630190110c7 in do_command (thd=0x7ff3fc000db8) at /data/src/10.5/sql/sql_parse.cc:1375
#16 0x00005630191bebb7 in do_handle_one_connection (connect=0x56301c983bd8, put_in_cache=true) at /data/src/10.5/sql/sql_connect.cc:1416
#17 0x00005630191be929 in handle_one_connection (arg=0x56301c9636e8) at /data/src/10.5/sql/sql_connect.cc:1318
#18 0x00005630196d0cc6 in pfs_spawn_thread (arg=0x56301c983958) at /data/src/10.5/storage/perfschema/pfs.cc:2201
#19 0x00007ff41ead4ea7 in start_thread (arg=<optimized out>) at pthread_create.c:477
#20 0x00007ff41e6d1def in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Reproducible on debug- and non-debug, with MinIO and AWS alike.


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