Bug #115416 MTR TEST innodb.parallel_read_kill FAILING IN MYSQL 8.0.37
Submitted: 24 Jun 11:05 Modified: 27 Sep 19:00
Reporter: Varun Nagaraju (OCA) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S3 (Non-critical)
Version:8.0.37 OS:Any
Assigned to: CPU Architecture:Any
Tags: Contribution

[24 Jun 11:05] Varun Nagaraju
Description:
The MTR test innodb.parallel_read_kill is failing in debug builds after an optimization was introduced in the latest release of MySQL 8.0.37 
Bug#35952353 SELECT COUNT(*) degraded performance on 8.0 compared to 5.7 | https://github.com/mysql/mysql-server/commit/ffad6cf7216

==============================================================================
                  TEST NAME                       RESULT  TIME (ms) COMMENT
------------------------------------------------------------------------------
[ 50%] innodb.parallel_read_kill                 [ fail ]
        Test ended at 2024-06-24 16:30:28

CURRENT_TEST: innodb.parallel_read_kill
mysqltest: At line 60: Query 'reap' succeeded, should have failed with error '1317'

The result from queries just before the failure was:
SET TRANSACTION ISOLATION LEVEL READ COMMITTED;
SET SESSION innodb_parallel_read_threads=2;
# Count committed rows
SET DEBUG_SYNC='parallel_read_wait_for_kill_query SIGNAL ready WAIT_FOR kill_query';
SELECT count(*) FROM t1;
SET DEBUG_SYNC='now WAIT_FOR ready';
Warnings:
Warning 1639    debug sync point wait timed out
SET DEBUG_SYNC='now SIGNAL kill_query';
# Killing select query
kill query @id;
# Should be 0 since the query should not be active
SELECT COUNT(*) FROM information_schema.processlist WHERE id = @id AND
INFO = 'SELECT count(*) FROM t1' AND state="executing";
COUNT(*)
0
Warnings:
Warning 1287    'INFORMATION_SCHEMA.PROCESSLIST' is deprecated and will be removed in a future release. Please use performance_schema.processlist instead
count(*)
0
safe_process[341867]: Child process: 341868, exit: 1

After the recent change, after the SET DEBUG_SYNC='parallel_read_wait_for_kill_query SIGNAL ready WAIT_FOR kill_query' statement, SELECT count(*) FROM t1 returns 0 if the reap is removed with the expected error.

How to repeat:
Run the test case, innodb.parallel_read_kill in a debug build of MySQL 8.0.37
[24 Jun 12:23] Laurynas Biveinis
Looks like a duplicate of bug 114888, but this report also points to a regression-introducing commit
[24 Jun 12:49] MySQL Verification Team
Hello Varun Nagaraju,

Thank you for the report and feedback.

regards,
Umesh
[8 Jul 3:36] Rahul Sisondia
Posted by developer:
 
Thanks Varun, Laurynas for the bug report and pointing out the exact commit# that introduced this bug.  I shall fix the test.
[3 Sep 18:07] Dmitry Lenev
Simple fix for the innodb.parallel_read_kill test case failures against MySQL 8.0.39 tree.

(*) I confirm the code being submitted is offered under the terms of the OCA, and that I am authorized to contribute it.

Contribution: ps-iprk-test-fix-bug115416-contrib.patch (text/x-patch), 1.81 KiB.

[3 Sep 18:11] Dmitry Lenev
Hello!

Just in case I am contributing a simple fix for the test case we have used in our trees. The patch is against 8.0.39 tree.
[4 Sep 2:33] Rahul Sisondia
Posted by developer:
 
Hi Dmitry, 

Thank you for contribution. This test is already fixed in upcoming 8.0.40 and upstream.
[4 Sep 7:12] Dmitry Lenev
Hello Rahul!

Great! Thank you for update!!!

Best regards,
Dmitry
[27 Sep 19:00] Philip Olson
Posted by developer:
 
Fixed as of the upcoming MySQL Server 8.0.40, 8.4.3, and 9.1.0 releases, and here's the proposed changelog entry from the documentation team:

Fixed an innodb.parallel_read_kill related unit test to better account for recent optimizer changes.

Our thanks to Dmitry Lenev and the team at Percona for contributing to this fix.

Thank you for the bug report.