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 in pkg/domain/sysvar_cache.go:121 domain.(*Domain).rebuildSysVarCache #48178

Open
Tracked by #41316
YangKeao opened this issue Nov 1, 2023 · 0 comments
Assignees
Labels
component/test severity/moderate sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug.

Comments

@YangKeao
Copy link
Member

YangKeao commented Nov 1, 2023

It's produced in CI:

POTENTIAL DEADLOCK:

Previous place where the lock was grabbed

goroutine 132 lock 0xc000ce2658

pkg/domain/sysvar_cache.go:121 domain.(*Domain).rebuildSysVarCache ??? <<<<<

pkg/domain/sysvar_cache.go:51 domain.(*Domain).rebuildSysVarCacheIfNeeded ???

pkg/domain/sysvar_cache.go:62 domain.(*Domain).GetSessionCache ???

pkg/session/session.go:3740 session.(*session).loadCommonGlobalVariablesIfNeeded ???

pkg/session/session.go:2132 session.(*session).ExecuteStmt ???

pkg/session/session.go:1645 session.(*session).ExecuteInternal ???

pkg/domain/domain.go:1630 domain.(*Domain).LoadPrivilegeLoop ???

pkg/session/session.go:3361 session.bootstrapSessionImpl ???

pkg/session/session.go:3282 session.BootstrapSession ???

pkg/session/session.go:3282 session.BootstrapSession ???

tests/realtikvtest/addindextest2/global_sort_test.go:83 addindextest2_test.TestGlobalSortBasic ???


Have been trying to lock it again for more than 20s

goroutine 273 lock 0xc000ce2658

pkg/domain/sysvar_cache.go:121 domain.(*Domain).rebuildSysVarCache ??? <<<<<

pkg/domain/sysvar_cache.go:51 domain.(*Domain).rebuildSysVarCacheIfNeeded ???

pkg/domain/sysvar_cache.go:75 domain.(*Domain).GetGlobalVar ???

pkg/domain/domain.go:1857 domain.(*Domain).LoadBindInfoLoop.(*Domain).globalBindHandleWorkerLoop.func1 ???

pkg/util/wait_group_wrapper.go:96 util.(*WaitGroupEnhancedWrapper).Run.func1 ???

https://do.pingcap.net/jenkins/blue/organizations/jenkins/pingcap%2Ftidb%2Fghpr_check2/detail/ghpr_check2/32519/pipeline/404

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/test severity/moderate sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug.
Projects
None yet
Development

No branches or pull requests

2 participants