[MDEV-26382] sys_vars.pseudo_slave_mode_basic fails Created: 2021-08-17  Updated: 2023-11-28

Status: Confirmed
Project: MariaDB Server
Component/s: None
Affects Version/s: 10.4, 10.5, 10.6, 10.7, 10.8, 10.9, 10.10, 10.11
Fix Version/s: 10.4, 10.5, 10.6, 10.11

Type: Bug Priority: Major
Reporter: Oleksandr Byelkin Assignee: Andrei Elkin
Resolution: Unresolved Votes: 0
Labels: None


 Description   

CURRENT_TEST: sys_vars.pseudo_slave_mode_basic
--- /home/sanja/maria/git/server/mysql-test/suite/sys_vars/r/pseudo_slave_mode_basic.result	2021-08-04 21:06:51.360558653 +0200
+++ /home/sanja/maria/git/server/mysql-test/suite/sys_vars/r/pseudo_slave_mode_basic.reject	2021-08-17 09:12:00.720160187 +0200
@@ -4,8 +4,6 @@
 0
 '#--------------------FN_DYNVARS_156_01------------------------#'
 SET @@session.pseudo_slave_mode = 0;
-Warnings:
-Warning	1231	'pseudo_slave_mode' change was ineffective.
 SET @@session.pseudo_slave_mode = DEFAULT;
 Warnings:
 Warning	1231	'pseudo_slave_mode' change was ineffective.
 
mysqltest: Result length mismatch

Here is the sequence which lead to the problem (I can not make it smaller). Also on my computer it is 100% fail, when on Elena's computer with some probability.

perl ./mtr main.func_op main.get_diagnostics  main.grant5 main.grant_binlog_replay main.grant_cache_no_prot main.grant_kill main.grant_lowercase_fs main.grant_master_admin main.grant_not_windows main.grant_repair main.grant_slave_admin main.grant_slave_monitor main.greedy_optimizer main.group_by main.group_by_null main.group_min_max main.handler_read_last main.having main.having_cond_pushdown main.help main.implicit_char_to_num_conversion main.in_datetime_241 main.in_subq_cond_pushdown main.index_intersect main.information_schema2 main.information_schema_chmod main.information_schema_db main.information_schema_linux sys_vars.myisam_max_sort_file_size_basic sys_vars.myisam_mmap_size_basic sys_vars.myisam_repair_threads_basic sys_vars.myisam_sort_buffer_size_basic sys_vars.myisam_stats_method_basic sys_vars.myisam_stats_method_func sys_vars.myisam_use_mmap_basic sys_vars.mysql56_temporal_format_basic sys_vars.mysql56_temporal_format_func sys_vars.named_pipe_basic sys_vars.net_buffer_length_basic sys_vars.net_read_timeout_basic sys_vars.net_retry_count_basic sys_vars.net_write_timeout_basic sys_vars.old_alter_table_basic sys_vars.old_basic sys_vars.old_mode_basic sys_vars.old_passwords_basic sys_vars.old_passwords_func sys_vars.open_files_limit_basic sys_vars.optimizer_prune_level_basic sys_vars.optimizer_search_depth_basic sys_vars.optimizer_selectivity_sampling_limit_basic sys_vars.optimizer_switch_basic sys_vars.optimizer_use_condition_selectivity_basic sys_vars.oqgraph_allow_create_integer_latch_basic sys_vars.pfs_digests_size_basic sys_vars.pfs_max_digest_length_basic sys_vars.pid_file_basic sys_vars.plugin_maturity_basic sys_vars.port_basic sys_vars.preload_buffer_size_basic sys_vars.preudo_thread_id_grant sys_vars.profiling_basic sys_vars.profiling_history_size_basic sys_vars.progress_report_time_basic sys_vars.protocol_version_basic sys_vars.proxy_protocol_networks_grant sys_vars.proxy_user_basic sys_vars.pseudo_slave_mode_basic --mem --noreorder

On 10.6 this short and full sequences do lead to error.

10.4 lack many of tests which I could not remove from the sequence on 10.5, so it is not surprise that I was not able to repeat on 10.4 (it does not mean that the bug is absent there)



 Comments   
Comment by Marko Mäkelä [ 2022-04-05 ]

This fails also on 10.6:

10.6 8d9c2561cd131a4a0a40c3852f43717508733908

sys_vars.pseudo_slave_mode_basic         w58 [ fail ]
        Test ended at 2022-04-05 13:45:38
 
CURRENT_TEST: sys_vars.pseudo_slave_mode_basic
--- /mariadb/10.6/mysql-test/suite/sys_vars/r/pseudo_slave_mode_basic.result	2020-07-14 16:19:22.890937766 +0300
+++ /mariadb/10.6/mysql-test/suite/sys_vars/r/pseudo_slave_mode_basic.reject	2022-04-05 13:45:37.868646053 +0300
@@ -4,8 +4,6 @@
 0
 '#--------------------FN_DYNVARS_156_01------------------------#'
 SET @@session.pseudo_slave_mode = 0;
-Warnings:
-Warning	1231	'pseudo_slave_mode' change was ineffective.
 SET @@session.pseudo_slave_mode = DEFAULT;
 Warnings:
 Warning	1231	'pseudo_slave_mode' change was ineffective.
 
mysqltest: Result length mismatch

Comment by Andrei Elkin [ 2022-04-05 ]

angelique.sklavounos, I suspect this is the test's own issue. I am around for any questions, of course.

Comment by Angelique Sklavounos (Inactive) [ 2022-05-24 ]

I was able to reliably reproduce the fail, but had to expand the sequence of tests (below) for my environment. I combined all the tests that ran on the same worker as the failing test from this BB fail (similar environment to mine): https://buildbot.mariadb.org/#/builders/98/builds/6649

I have not tried to condense this sequence yet:

perl ./mtr binlog_encryption.rpl_parallel_wrong_exec_master_pos,'innodb,mix' binlog_encryption.rpl_gtid_basic,'innodb,mix,ncmpr' encryption.innodb-compressed-blob,'8k,cbc,innodb,none' encryption.innodb_encrypt_key_rotation_age,'innodb' rpl.rpl_000010,'mix' rpl.rpl_row_basic_11bugs,'innodb,row' rpl.rpl_flushlog_loop,'row' rpl.rpl_xa,'innodb,stmt' rpl.rpl_xa_gtid_pos_auto_engine,'innodb,stmt' rpl.rpl_gtid_mdev4485,'mix' innodb.alter_algorithm,'INSTANT,innodb' sys_vars.autocommit_func4,'innodb' binlog.binlog_delete_and_flush_index,'mix' binlog.binlog_invalid_read_in_rotate,'disable_checksum,innodb,row' binlog.binlog_show_binlog_event_random_pos,'disable_checksum,innodb,row' main.mysqlcheck,'innodb' main.ctype_utf8,'innodb' main.ctype_utf8mb4,'innodb' main.ctype_utf8mb4_innodb,'innodb' main.implicit_commit,'innodb' main.ps_3innodb,'innodb' main.strict,'innodb' sys_vars.general_log_file_basic sys_vars.log_disabled_statements_func mariabackup.absolute_ibdata_paths innodb_zip.innochecksum_3,'4k,full_crc32,innodb' innodb.encryption_threads_shutdown,'innodb' innodb.purge_secondary,'innodb' sys_vars.innodb_file_per_table_basic,'innodb' sys_vars.innodb_read_io_threads_basic,'innodb' main.stat_tables_innodb,'innodb' funcs_2.innodb_charset,'innodb' mariabackup.incremental_rocksdb mariabackup.xb_rocksdb main.count_distinct2 main.multi_update_tiny_hash main.udf_skip_grants main.trans_read_only main.gis-rt-precise main.gis-rtree main.gis_notembedded main.grant5 main.grant_4332 main.grant_binlog_replay main.grant_cache_no_prot main.grant_explain_non_select main.grant_kill main.grant_master_admin main.grant_not_windows main.grant_read_only main.grant_repair main.grant_server main.grant_slave_admin main.grant_slave_monitor main.greedy_optimizer main.group_by main.group_by_null main.handler_read_last main.having main.having_cond_pushdown main.help main.implicit_char_to_num_conversion main.in_datetime_241 main.in_subq_cond_pushdown main.index_intersect main.information_schema2 main.information_schema_chmod main.information_schema_db sys_vars.aria_checkpoint_interval_basic sys_vars.aria_checkpoint_log_activity_basic sys_vars.aria_encrypt_tables_basic sys_vars.aria_force_start_after_recovery_failures_basic sys_vars.aria_group_commit_basic sys_vars.aria_group_commit_interval_basic sys_vars.aria_log_file_size_basic sys_vars.aria_log_purge_type_basic sys_vars.aria_max_sort_file_size_basic sys_vars.aria_page_checksum_basic sys_vars.aria_pagecache_age_threshold_basic sys_vars.aria_pagecache_buffer_size_basic sys_vars.aria_pagecache_division_limit_basic sys_vars.aria_pagecache_file_hash_size_basic sys_vars.aria_recover_options_basic sys_vars.aria_repair_threads_basic sys_vars.aria_sort_buffer_size_basic,'64bit' sys_vars.pseudo_slave_mode_basic --mem --noreorder

Comment by Angelique Sklavounos (Inactive) [ 2023-02-17 ]

I was able to reduce the fail to:

perl ./mtr main.grant_binlog_replay main.grant_cache_no_prot main.grant_explain_non_select sys_vars.pseudo_slave_mode_basic --noreorder

with Ubuntu, gcc and:
cmake ../server/ -DCMAKE_INSTALL_PREFIX=build1 -DCMAKE_BUILD_TYPE=Debug

I reduced and combined these tests even further and ran mtr with --debug and saw this for when the test fails:

T@7    : | | | | >sql_set_variables
T@7    : | | | | | >Relay_log_info::~Relay_log_info
T@7    : | | | | | | >safe_mutex_destroy

as compared to when the test passes:

T@6    : | | | | >sql_set_variables
T@6    : | | | | | >push_warning
T@6    : | | | | | | enter: code: 1231, msg: 'pseudo_slave_mode' change was ineffective.

When reducing the tests, the failure seemed sensitive to the number of connections made within main.grant_cache_no_prot.
I suspect there is an issue with the BINLOG '' statement in main.grant_binlog_replay. Removing it then causes the test sequence to pass. Also, if I move grant_binlog_replay to the binlog suite and run the test sequence, then all the tests pass.

I am not sure how to resolve this, so passing to Andrei.

Comment by Angelique Sklavounos (Inactive) [ 2023-02-17 ]

Also, if main.grant_binlog_replay is modified to not use the BINLOG REPLAY privilege that was only introduced in 10.5, it is still possible to obtain the sys_vars.pseudo_slave_mode_basic failure with 10.4.

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