Skip to content

POTENTIAL DEADLOCK: Recursive locking TestAutoCommitRespectsReadOnly #53822

Closed
@D3Hunter

Description

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

Activity

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

Metadata

Assignees

No one assigned

    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.component/testseverity/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