[MDEV-16659] Assertion `anc_page->org_size == anc_page->size' failed in d_search upon query with EXCEPT and SYSTEM_TIME ALL Created: 2018-07-02  Updated: 2023-04-27

Status: Stalled
Project: MariaDB Server
Component/s: Optimizer, Storage Engine - Aria, Versioned Tables
Affects Version/s: 10.3, 10.4, 10.5, 10.6, 10.7
Fix Version/s: 10.4, 10.5, 10.6

Type: Bug Priority: Major
Reporter: Elena Stepanova Assignee: Nikita Malyavin
Resolution: Unresolved Votes: 0
Labels: None

Attachments: File mdev16659.test     HTML File threads     HTML File threads_full    
Issue Links:
Relates
relates to MDEV-26973 Assertion `anc_page->org_size == anc_... Confirmed
relates to MDEV-29391 Index and data corruption Open

 Description   

Notes:
The attached test case is for reproducing and debugging only, don't put it into the regression suite as is, make a better one!
The test case inserts a lot of data into the table. Possibly the same effect can be achieved by using smaller values of max_heap_table_size and less data.

10.3 df51dc28

mysqld: /data/src/10.3/storage/maria/ma_delete.c:496: d_search: Assertion `anc_page->org_size == anc_page->size' failed.
190220  7:06:44 [ERROR] mysqld got signal 6 ;
 
#7  0x00007fe73eaf9ee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
#8  0x0000555860a0a0fd in d_search (info=0x7fe72811c640, key=0x7fe738c9ea00, comp_flag=4, anc_page=0x7fe738c9b430) at /data/src/10.3/storage/maria/ma_delete.c:496
#9  0x0000555860a09c73 in d_search (info=0x7fe72811c640, key=0x7fe738c9ea00, comp_flag=4, anc_page=0x7fe738c9e3a0) at /data/src/10.3/storage/maria/ma_delete.c:414
#10 0x0000555860a092ac in _ma_ck_real_delete (info=0x7fe72811c640, key=0x7fe738c9ea00, root=0x7fe738c9e428) at /data/src/10.3/storage/maria/ma_delete.c:228
#11 0x0000555860a08fa6 in _ma_ck_delete (info=0x7fe72811c640, key=0x7fe738c9ea00) at /data/src/10.3/storage/maria/ma_delete.c:178
#12 0x0000555860a089b4 in maria_delete (info=0x7fe72811c640, record=0x7fe728049a08 "\377") at /data/src/10.3/storage/maria/ma_delete.c:88
#13 0x0000555860988d89 in ha_maria::delete_row (this=0x7fe72811a9e8, buf=0x7fe728049a08 "\377") at /data/src/10.3/storage/maria/ha_maria.cc:2353
#14 0x000055586057455a in handler::ha_delete_tmp_row (this=0x7fe72811a9e8, buf=0x7fe728049a08 "\377") at /data/src/10.3/sql/sql_class.h:6427
#15 0x000055586056d881 in select_unit::send_data (this=0x7fe7280166c0, values=...) at /data/src/10.3/sql/sql_union.cc:192
#16 0x00005558604f468c in end_send (join=0x7fe7280172f0, join_tab=0x7fe72804be30, end_of_records=false) at /data/src/10.3/sql/sql_select.cc:20580
#17 0x00005558604f1e9c in evaluate_join_record (join=0x7fe7280172f0, join_tab=0x7fe72804ba80, error=0) at /data/src/10.3/sql/sql_select.cc:19616
#18 0x00005558604f1938 in sub_select (join=0x7fe7280172f0, join_tab=0x7fe72804ba80, end_of_records=false) at /data/src/10.3/sql/sql_select.cc:19435
#19 0x00005558604f0cb6 in do_select (join=0x7fe7280172f0, procedure=0x0) at /data/src/10.3/sql/sql_select.cc:18936
#20 0x00005558604c98ad in JOIN::exec_inner (this=0x7fe7280172f0) at /data/src/10.3/sql/sql_select.cc:4040
#21 0x00005558604c8cee in JOIN::exec (this=0x7fe7280172f0) at /data/src/10.3/sql/sql_select.cc:3834
#22 0x000055586057223f in st_select_lex_unit::exec (this=0x7fe7280049b8) at /data/src/10.3/sql/sql_union.cc:1470
#23 0x000055586056d1e7 in mysql_union (thd=0x7fe728000b00, lex=0x7fe7280048f0, result=0x7fe728016698, unit=0x7fe7280049b8, setup_tables_done_option=0) at /data/src/10.3/sql/sql_union.cc:41
#24 0x00005558604bbdce in handle_select (thd=0x7fe728000b00, lex=0x7fe7280048f0, result=0x7fe728016698, setup_tables_done_option=0) at /data/src/10.3/sql/sql_select.cc:363
#25 0x00005558604868ec in execute_sqlcom_select (thd=0x7fe728000b00, all_tables=0x7fe728014f60) at /data/src/10.3/sql/sql_parse.cc:6551
#26 0x000055586047cf5d in mysql_execute_command (thd=0x7fe728000b00) at /data/src/10.3/sql/sql_parse.cc:3772
#27 0x000055586048a8a5 in mysql_parse (thd=0x7fe728000b00, rawbuf=0x7fe728014ce8 "SELECT * from oltp1 FOR system_time ALL EXCEPT SELECT * from oltp1 FOR system_time ALL", length=86, parser_state=0x7fe738ca05f0, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:8095
#28 0x0000555860477a59 in dispatch_command (command=COM_QUERY, thd=0x7fe728000b00, packet=0x7fe728126141 "SELECT * from oltp1 FOR system_time ALL EXCEPT SELECT * from oltp1 FOR system_time ALL", packet_length=86, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:1854
#29 0x0000555860476431 in do_command (thd=0x7fe728000b00) at /data/src/10.3/sql/sql_parse.cc:1396
#30 0x00005558605de74f in do_handle_one_connection (connect=0x5558628f58a0) at /data/src/10.3/sql/sql_connect.cc:1403
#31 0x00005558605de4d3 in handle_one_connection (arg=0x5558628f58a0) at /data/src/10.3/sql/sql_connect.cc:1309
#32 0x0000555860a7a2e1 in pfs_spawn_thread (arg=0x5558629424c0) at /data/src/10.3/storage/perfschema/pfs.cc:1862
#33 0x00007fe7407d0494 in start_thread (arg=0x7fe738ca1700) at pthread_create.c:333
#34 0x00007fe73ebb693f in clone () from /lib/x86_64-linux-gnu/libc.so.6

No obvious problem on a non-debug build.



 Comments   
Comment by Elena Stepanova [ 2018-08-30 ]

New occurrence: https://travis-ci.org/elenst/travis-tests/jobs/422337227

Comment by Alice Sherepa [ 2021-06-16 ]

10.6 71964c76fe0d726610302

mysqld: /10.6/storage/maria/ma_delete.c:507: d_search: Assertion `anc_page->org_size == anc_page->size' failed.
 
210616 12:23:56 [ERROR] mysqld got signal 6 ;
 
Server version: 10.6.2-MariaDB-debug-log
 
linux/raise.c:51(__GI_raise)[0x7f8b9b7b47bb]
stdlib/abort.c:81(__GI_abort)[0x7f8b9b79f535]
intl/loadmsgcat.c:1177(_nl_load_domain)[0x7f8b9b79f40f]
??:0(__assert_fail)[0x7f8b9b7ad102]
maria/ma_delete.c:509(d_search)[0x555756db3152]
maria/ma_delete.c:422(d_search)[0x555756db2608]
maria/ma_delete.c:422(d_search)[0x555756db2608]
maria/ma_delete.c:422(d_search)[0x555756db2608]
maria/ma_delete.c:235(_ma_ck_real_delete)[0x555756db06b7]
maria/ma_delete.c:184(_ma_ck_delete)[0x555756dafb7a]
maria/ma_delete.c:88(maria_delete)[0x555756dae501]
maria/ha_maria.cc:2415(ha_maria::delete_row(unsigned char const*))[0x555756c47683]
sql/sql_class.h:7310(handler::ha_delete_tmp_row(unsigned char*))[0x5557560b52d5]
sql/sql_union.cc:515(select_unit::delete_record())[0x55575609d333]
sql/sql_union.cc:168(select_unit::send_data(List<Item>&))[0x55575609a399]
sql/sql_class.h:5582(select_result_sink::send_data_with_check(List<Item>&, st_select_lex_unit*, unsigned long long))[0x555755f59f83]
sql/sql_select.cc:22213(end_send(JOIN*, st_join_table*, bool))[0x555755f14bff]
sql/sql_select.cc:21219(evaluate_join_record(JOIN*, st_join_table*, int))[0x555755f0cdf6]
sql/sql_select.cc:21035(sub_select(JOIN*, st_join_table*, bool))[0x555755f0bdf6]
sql/sql_select.cc:20543(do_select(JOIN*, Procedure*))[0x555755f09a0c]
sql/sql_select.cc:4726(JOIN::exec_inner())[0x555755e97da7]
sql/sql_select.cc:4505(JOIN::exec())[0x555755e952ca]
sql/sql_union.cc:2234(st_select_lex_unit::exec())[0x5557560adf8b]
sql/sql_union.cc:41(mysql_union(THD*, LEX*, select_result*, st_select_lex_unit*, unsigned long))[0x555756098f8c]
sql/sql_select.cc:534(handle_select(THD*, LEX*, select_result*, unsigned long))[0x555755e6a045]
sql/sql_parse.cc:6242(execute_sqlcom_select(THD*, TABLE_LIST*))[0x555755dd4680]
sql/sql_parse.cc:3937(mysql_execute_command(THD*))[0x555755dc30fb]
sql/sql_parse.cc:8016(mysql_parse(THD*, char*, unsigned int, Parser_state*))[0x555755ddf46b]
sql/sql_parse.cc:1899(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool))[0x555755db5c7a]
sql/sql_parse.cc:1406(do_command(THD*, bool))[0x555755db296c]
sql/sql_connect.cc:1410(do_handle_one_connection(CONNECT*, bool))[0x5557561ffde7]
sql/sql_connect.cc:1314(handle_one_connection)[0x5557561ff73d]
perfschema/pfs.cc:2203(pfs_spawn_thread)[0x555756ed202a]
nptl/pthread_create.c:487(start_thread)[0x7f8b9bc6dfa3]
x86_64/clone.S:97(clone)[0x7f8b9b8764cf]

Generated at Thu Feb 08 08:30:35 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.