[MDEV-32849] Spider tests failing in asan/valgrind builds Created: 2023-11-21  Updated: 2023-11-28  Resolved: 2023-11-28

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - Spider
Affects Version/s: 10.4
Fix Version/s: 10.4.33

Type: Bug Priority: Blocker
Reporter: Yuchen Pei Assignee: Yuchen Pei
Resolution: Fixed Votes: 0
Labels: regression-10.4

Issue Links:
Duplicate
is duplicated by MDEV-32895 Spider tests fail with ASAN errors in... Closed
Problem/Incident
is caused by MDEV-30014 heap-use-after-free in ha_spider::lo... Closed

 Description   

Caused by the MDEV-30014 patch, but not reproducible in 10.5 branch containing the same patch e.g. at 9f7da106c2c5dd9f48f8fcf40823a9d4fd655298

e.g. https://buildbot.mariadb.org/#/builders/551/builds/8139

[amd64-ubuntu-2204-valgrind | failed test (failure)]
rpl.create_or_replace_mix
spider/bugfix.checksum_table_with_quick_mode_3
spider/bugfix.cp932_column
spider/bugfix.delete_with_float_column_mariadb
spider/bugfix.delete_with_float_column_mysql
spider/bugfix.gbh_outer_fields_in_join
spider/bugfix.group_by_order_by_limit
spider/bugfix.mdev_19866
spider/bugfix.mdev_20100
spider/bugfix.mdev_20502
spider/bugfix.mdev_21884
spider/bugfix.mdev_24020
spider/bugfix.mdev_24343
spider/bugfix.mdev_24517
spider/bugfix.mdev_24523
spider/bugfix.mdev_26013
spider/bugfix.mdev_26544
spider/bugfix.mdev_28856
spider/bugfix.mdev_29163
spider/bugfix.mdev_31338

Seems to be caused by

[Revision 0381197855c58e339ab5034b871ea9c0c2d61522]
Author: Yuchen Pei <ycp@mariadb.com>
Date: 2023-11-17 Fri 11:48:50 AEDT
 
MDEV-30014 Spider should not second guess server when locking / unlocking



 Comments   
Comment by Yuchen Pei [ 2023-11-21 ]

Hi holyfoot, ptal thanks

upstream/bb-10.4-mdev-32849 3cd27d5d418f7e70768c20e0f2067a3893b0e3ad
MDEV-32849 Spider: check if any table is actually locked when unlocking
 
This avoids the scenario in MDEV-32849, when the unlock happens after
the connection has been freed, say in rollback. This is done in 10.5+
after the commit a26700cca579926cddf9a48c45f13b32785746bb.
 
It may or may not prevent potential other scenarios where spider has
locked something, then for some reason the statement needs to be
rolled back and spider frees the connection, and then spider proceeds
to use the freed connection. But at least we fix the regression
introduced by MDEV-30014 to 10.4 and bring 10.4 closer in parity with
10.5+.

Comment by Alexey Botchkov [ 2023-11-26 ]

ok to push.

Comment by Yuchen Pei [ 2023-11-28 ]

pushed 2057820532312e2b6be5bad5abde361532f5d4c6 to 10.4.

As mentioned before, this is a 10.4-only patch, but it should be clear when merging up because the change is already in 10.5.

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