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

[upgrading] get owner op failed led tidb can not start #44366

Closed
aytrack opened this issue Jun 2, 2023 · 3 comments
Closed

[upgrading] get owner op failed led tidb can not start #44366

aytrack opened this issue Jun 2, 2023 · 3 comments
Assignees
Labels
component/ddl This issue is related to DDL of TiDB. may-affects-5.1 This bug maybe affects 5.1.x versions. may-affects-5.2 This bug maybe affects 5.2.x versions. may-affects-5.3 This bug maybe affects 5.3.x versions. may-affects-5.4 This bug maybe affects 5.4.x versions. may-affects-6.1 may-affects-6.5 may-affects-7.1 severity/major sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug.

Comments

@aytrack
Copy link
Contributor

aytrack commented Jun 2, 2023

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

  1. deploy v7.1.0 cluster with tiup cluster
  2. use sysbench prepare data
  3. using tiup cluster upgrade the cluster to nightly

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

upgrade success

3. What did you see instead (Required)

ugrade failed

[2023/06/02 16:35:24.772 +08:00] [WARN] [bootstrap.go:1188] ["[upgrading] get owner op failed"] [state=none] []
[2023/06/02 16:35:24.973 +08:00] [INFO] [manager.go:344] ["get owner"] ["owner info"="upgrade bootstrap"] ["owner key"=/tidb/ddl/fg/owner/db4887b356a3f6d] [ownerID=c4a4c6ff-e140-4248-9414-c80a1fa74703] [op=none]
[2023/06/02 16:35:24.973 +08:00] [FATAL] [bootstrap.go:1186] ["[upgrading] get owner op failed"] [state=none] [] [stack="github.com/pingcap/tidb/session.syncUpgradeState
	/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/session/bootstrap.go:1186
github.com/pingcap/tidb/session.upgrade
	/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/session/bootstrap.go:1125
github.com/pingcap/tidb/session.runInBootstrapSession
	/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/session/session.go:3540
github.com/pingcap/tidb/session.BootstrapSession
	/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/session/session.go:3317
main.createStoreAndDomain
	/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/tidb-server/main.go:347
main.main
	/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/tidb-server/main.go:241
runtime.main
	/usr/local/go/src/runtime/proc.go:250"]

4. What is your TiDB version? (Required)

 ["Welcome to TiDB."] ["Release Version"=v7.1.0] [Edition=Community] ["Git Commit Hash"=635a4362235e8a3c0043542e629532e3c7bb2756]
["Welcome to TiDB."] ["Release Version"=v7.2.0-alpha] [Edition=Community] ["Git Commit Hash"=50fb9a77a9d6505f30f3fb13a801d650747c63ec]
@aytrack aytrack added the type/bug The issue is confirmed as a bug. label Jun 2, 2023
@ti-chi-bot ti-chi-bot bot added may-affects-5.1 This bug maybe affects 5.1.x versions. may-affects-5.2 This bug maybe affects 5.2.x versions. may-affects-5.3 This bug maybe affects 5.3.x versions. may-affects-5.4 This bug maybe affects 5.4.x versions. may-affects-6.1 may-affects-6.5 may-affects-7.1 labels Jun 2, 2023
@zimulala
Copy link
Contributor

zimulala commented Jun 2, 2023

I checked this cluster. When we upgrade tidb-0, the tidb-1 and tidb-2 encountered a panic(like #43829) . So the cluster's 3 nodes all need to upgrade and hasn't a stable DDL owner.
Details:
tidb-0 upgrade failed because the owner was out of date.
tidb-1 and tidb-2 upgrade failed because their encountered can't be paused: state [done] or schema state [public] error(by design).

@zimulala
Copy link
Contributor

zimulala commented Jun 2, 2023

tidb-1 and tidb-2 panic info(like #43829):

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x110 pc=0x4917721]

goroutine 587 [running]:
github.com/pingcap/tidb/session.(*session).TxnInfo(0xc0027f7180)
	/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/session/session.go:545 +0x141
github.com/pingcap/tidb/session.GetStartTSFromSession({0x546bfc0?, 0xc0027f7180?})
	/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/session/session.go:3822 +0xce
github.com/pingcap/tidb/server.(*Server).GetInternalSessionStartTSList(0xc0017c18c0)
	/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/server/server.go:960 +0x20c
github.com/pingcap/tidb/domain/infosync.(*InfoSyncer).ReportMinStartTS(0xc001a23590, {0x5d716a8, 0xc000dae840})
	/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/domain/infosync/info.go:802 +0x82
github.com/pingcap/tidb/domain.(*Domain).infoSyncerKeeper(0xc000458000)
	/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/domain/domain.go:671 +0x42a
github.com/pingcap/tidb/util.(*WaitGroupEnhancedWrapper).Run.func1()
	/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/util/wait_group_wrapper.go:96 +0x77
created by github.com/pingcap/tidb/util.(*WaitGroupEnhancedWrapper).Run
	/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/tidb/util/wait_group_wrapper.go:91 +0xcc

@ti-chi-bot ti-chi-bot added the affects-7.5 This bug affects the 7.5.x(LTS) versions. label Oct 23, 2023
@bb7133 bb7133 added component/ddl This issue is related to DDL of TiDB. and removed sig/sql-infra SIG: SQL Infra labels Oct 26, 2023
@zimulala
Copy link
Contributor

zimulala commented Nov 8, 2023

#43829 is closed

@zimulala zimulala closed this as completed Nov 8, 2023
@zimulala zimulala added the sig/sql-infra SIG: SQL Infra label Nov 8, 2023
@ti-chi-bot ti-chi-bot removed the affects-7.5 This bug affects the 7.5.x(LTS) versions. label Nov 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/ddl This issue is related to DDL of TiDB. may-affects-5.1 This bug maybe affects 5.1.x versions. may-affects-5.2 This bug maybe affects 5.2.x versions. may-affects-5.3 This bug maybe affects 5.3.x versions. may-affects-5.4 This bug maybe affects 5.4.x versions. may-affects-6.1 may-affects-6.5 may-affects-7.1 severity/major sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug.
Projects
None yet
Development

No branches or pull requests

4 participants