Bug #89223 rpl.rpl_innodb_info_tbl_slave_tmp_tbl_mismatch is unstable

Submitted: 14 Jan 2018 8:37 Modified: 11 Apr 2019 20:27
Reporter: Alexey Kopytov Email Updates:
Status: Verified Impact on me:
None 
Category:Tests: Replication Severity:S3 (Non-critical)
Version:5.7, 8.0 OS:Any
Assigned to: CPU Architecture:Any

[14 Jan 2018 8:37] Alexey Kopytov
Description:
The rpl.rpl_innodb_info_tbl_slave_tmp_tbl_mismatch test fails frequently
for me in highly-concurrent MTR runs. The reason is that the test
asserts a condition which depends on specific timing of events.

More specifically, it asserts that after a START SLAVE the number of
temporary tables in INFORMATION_SCHEMA.INNODB_TEMP_TABLE_INFO equals the
value reported by the slave_open_temp_tables system variables. Those
values, however, are never updated atomically, so race conditions are
always possible.

For example, one place where slave_open_temp_tables is updated is
sql_base.cc:close_temporary_tables(). As seen from the code, we first go
over all open temporary tables and close them (which I think will be
reflected immediately in I_S.INNODB_TEMP_TABLE_INFO), and only after
that loop slave_open_temp_tables is updated. So any test asserting the
same values shown by I_S and slave_open_temp_tables must do extra
synchronization.

How to repeat:
It may be hard to repeat under normal conditions, so the best bet here
is to look at the test case and the relevant code parts.

Suggested fix:
Use DEBUG_SYNC point(s) to make the test reliable.
[11 Apr 2019 20:27] MySQL Verification Team
Hi,
I'm having troubles reproducing this myself but inspecting code I do agree with your assessment so I'm verifying the bug

all best
Bogdan

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.049 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.