Skip to content

small probability recursive lock (deadlock) when setting tidb_restricted_read_only #55373

Closed
@time-and-fate

Description

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

count=0
while true; do
mysql -h 127.0.0.1 -P 4000 -u root -e "set global tidb_restricted_read_only = 1;set global tidb_restricted_read_only = 0;";
count=$((count+1))
echo "$count"
done

I tried several times, in most times it can be triggered before the count reaches 5000.

2. What did you expect to see? (Required)

Execute and finish successfully.

3. What did you see instead (Required)

The SET statement above blocks forever, and any following SET GLOBAL statements will block forever.

4. What is your TiDB version? (Required)

I'm using v8.2.0 and master, but I believe many versions have this bug.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

affects-6.5This bug affects the 6.5.x(LTS) versions.affects-7.1This bug affects the 7.1.x(LTS) versions.affects-7.5This bug affects the 7.5.x(LTS) versions.affects-8.1This bug affects the 8.1.x(LTS) versions.severity/majorsig/sql-infraSIG: SQL Infratype/bugThe issue is confirmed as a bug.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions