Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

POTENTIAL DEADLOCK: Recursive locking TestAutoCommitRespectsReadOnly #53822

Closed
D3Hunter opened this issue Jun 5, 2024 · 0 comments · Fixed by #55407
Closed

POTENTIAL DEADLOCK: Recursive locking TestAutoCommitRespectsReadOnly #53822

D3Hunter opened this issue Jun 5, 2024 · 0 comments · Fixed by #55407
Labels
affects-6.5 This bug affects the 6.5.x(LTS) versions. affects-7.1 This bug affects the 7.1.x(LTS) versions. affects-7.5 This bug affects the 7.5.x(LTS) versions. affects-8.1 This bug affects the 8.1.x(LTS) versions. component/test severity/major sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug.

Comments

@D3Hunter
Copy link
Contributor

D3Hunter commented Jun 5, 2024

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

see https://do.pingcap.net/jenkins/blue/rest/organizations/jenkins/pipelines/pingcap/pipelines/tidb/pipelines/ghpr_unit_test/runs/10712/nodes/63/steps/69/log/?start=0

POTENTIAL DEADLOCK: Recursive locking:
current goroutine 123 lock 0xc007ef60c8
pkg/domain/sysvar_cache.go:120 domain.(*Domain).rebuildSysVarCache ??? <<<<<
pkg/domain/sysvar_cache.go:119 domain.(*Domain).rebuildSysVarCache ???
pkg/domain/domain.go:2639 domain.(*Domain).NotifyUpdateSysVarCache ???
pkg/session/session.go:1283 session.(*session).replaceGlobalVariablesTableValue ???
pkg/session/session.go:1344 session.(*session).SetGlobalSysVar ???
pkg/sessionctx/variable/sysvar.go:823 variable.glob..func164 ???
pkg/domain/sysvar_cache.go:146 domain.(*Domain).rebuildSysVarCache ???
pkg/domain/domain.go:2639 domain.(*Domain).NotifyUpdateSysVarCache ???
pkg/session/session.go:1283 session.(*session).replaceGlobalVariablesTableValue ???
pkg/session/session.go:1344 session.(*session).SetGlobalSysVar ???
pkg/executor/set.go:155 executor.(*SetExecutor).setSysVariable ???
pkg/executor/set.go:104 executor.(*SetExecutor).Next ???
pkg/executor/internal/exec/executor.go:409 exec.Next ???
pkg/executor/adapter.go:1212 executor.(*ExecStmt).next ???
pkg/executor/adapter.go:960 executor.(*ExecStmt).handleNoDelayExecutor ???
pkg/executor/adapter.go:794 executor.(*ExecStmt).handleNoDelay ???
pkg/executor/adapter.go:558 executor.(*ExecStmt).Exec ???
pkg/session/session.go:2284 session.runStmt ???
pkg/session/session.go:2162 session.(*session).ExecuteStmt ???
pkg/testkit/testkit.go:394 testkit.(*TestKit).ExecWithContext ???
external/com_github_pingcap_errors/juju_adaptor.go:112 errors.ErrorStack ???
pkg/testkit/testkit.go:150 testkit.(*TestKit).MustExec ???
pkg/session/test/txn/txn_test.go:298 txn_test.TestAutoCommitRespectsReadOnly ???

Previous place where the lock was grabbed (same goroutine)
pkg/domain/sysvar_cache.go:120 domain.(*Domain).rebuildSysVarCache ??? <<<<<
pkg/domain/sysvar_cache.go:119 domain.(*Domain).rebuildSysVarCache ???
pkg/domain/domain.go:2639 domain.(*Domain).NotifyUpdateSysVarCache ???
pkg/session/session.go:1283 session.(*session).replaceGlobalVariablesTableValue ???
pkg/session/session.go:1344 session.(*session).SetGlobalSysVar ???
pkg/executor/set.go:155 executor.(*SetExecutor).setSysVariable ???
pkg/executor/set.go:104 executor.(*SetExecutor).Next ???
pkg/executor/internal/exec/executor.go:409 exec.Next ???
pkg/executor/adapter.go:1212 executor.(*ExecStmt).next ???
pkg/executor/adapter.go:960 executor.(*ExecStmt).handleNoDelayExecutor ???
pkg/executor/adapter.go:794 executor.(*ExecStmt).handleNoDelay ???
pkg/executor/adapter.go:558 executor.(*ExecStmt).Exec ???
pkg/session/session.go:2284 session.runStmt ???
pkg/session/session.go:2162 session.(*session).ExecuteStmt ???
pkg/testkit/testkit.go:394 testkit.(*TestKit).ExecWithContext ???
external/com_github_pingcap_errors/juju_adaptor.go:112 errors.ErrorStack ???
pkg/testkit/testkit.go:150 testkit.(*TestKit).MustExec ???
pkg/session/test/txn/txn_test.go:298 txn_test.TestAutoCommitRespectsReadOnly ???

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

3. What did you see instead (Required)

4. What is your TiDB version? (Required)

master

@D3Hunter D3Hunter added the type/bug The issue is confirmed as a bug. label Jun 5, 2024
@Defined2014 Defined2014 added affects-6.1 This bug affects the 6.1.x(LTS) versions. affects-6.5 This bug affects the 6.5.x(LTS) versions. affects-7.1 This bug affects the 7.1.x(LTS) versions. affects-7.5 This bug affects the 7.5.x(LTS) versions. affects-8.1 This bug affects the 8.1.x(LTS) versions. and removed may-affects-5.4 This bug maybe affects 5.4.x versions. may-affects-6.1 may-affects-6.5 may-affects-7.1 may-affects-7.5 may-affects-8.1 affects-6.1 This bug affects the 6.1.x(LTS) versions. labels Aug 14, 2024
@ti-chi-bot ti-chi-bot bot closed this as completed in 1b172b6 Aug 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-6.5 This bug affects the 6.5.x(LTS) versions. affects-7.1 This bug affects the 7.1.x(LTS) versions. affects-7.5 This bug affects the 7.5.x(LTS) versions. affects-8.1 This bug affects the 8.1.x(LTS) versions. component/test severity/major sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants