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

fatal error: sync: unlock of unlocked mutex #57798

Open
tiancaiamao opened this issue Nov 28, 2024 · 0 comments · May be fixed by #57799
Open

fatal error: sync: unlock of unlocked mutex #57798

tiancaiamao opened this issue Nov 28, 2024 · 0 comments · May be fixed by #57799
Labels
affects-7.5 This bug affects the 7.5.x(LTS) versions. affects-8.5 This bug affects the 8.5.x(LTS) 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 may-affects-8.1 report/customer Customers have encountered this bug. severity/major sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug.

Comments

@tiancaiamao
Copy link
Contributor

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

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

3. What did you see instead (Required)

fatal error: sync: unlock of unlocked mutex

goroutine 7349387639 [running]:
sync.fatal({0x5a4e38e?, 0x30?})
	/usr/local/go/src/runtime/panic.go:1061 +0x18
sync.(*Mutex).unlockSlow(0xc09de4f2d0, 0xffffffff)
	/usr/local/go/src/sync/mutex.go:229 +0x35
sync.(*Mutex).Unlock(0x0?)
	/usr/local/go/src/sync/mutex.go:223 +0x25
github.com/pingcap/tidb/pkg/sessionctx/variable.(*SessionVars).GetRelatedTableForMDL(0xc15716a000)
	/workspace/source/tidb/pkg/sessionctx/variable/session.go:3558 +0x106
github.com/pingcap/tidb/pkg/session.(*session).TxnInfo(0xc05925d180)
	/workspace/source/tidb/pkg/session/session.go:528 +0x209
github.com/pingcap/tidb/pkg/server.(*Server).ShowTxnList(0xc002603100)
	/workspace/source/tidb/pkg/server/server.go:849 +0x1a8
github.com/pingcap/tidb/pkg/executor.(*tidbTrxTableRetriever).retrieve(0xc09e604d20, {0x63a0500?, 0xc06dc9a570}, {0x6419780?, 0xc098691680})
	/workspace/source/tidb/pkg/executor/infoschema_reader.go:2492 +0xee
github.com/pingcap/tidb/pkg/executor.(*MemTableReaderExec).Next(0xc09e6106e0, {0x63a0500, 0xc06dc9a570}, 0xc0a2d0fc20)
	/workspace/source/tidb/pkg/executor/memtable_reader.go:119 +0x2a6
github.com/pingcap/tidb/pkg/executor/internal/exec.Next({0x63a0500, 0xc06dc9a570}, {0x63b5a40, 0xc09e6106e0}, 0xc0a2d0fc20)
	/workspace/source/tidb/pkg/executor/internal/exec/executor.go:283 +0x2fa
github.com/pingcap/tidb/pkg/executor.(*SelectionExec).Next(0xc09e6140e0, {0x63a0500, 0xc06dc9a570}, 0xc0a2d0fc70)
	/workspace/source/tidb/pkg/executor/executor.go:1598 +0xde
github.com/pingcap/tidb/pkg/executor/internal/exec.Next({0x63a0500, 0xc06dc9a570}, {0x63b6d80, 0xc09e6140e0}, 0xc0a2d0fc70)
	/workspace/source/tidb/pkg/executor/internal/exec/executor.go:283 +0x2fa
github.com/pingcap/tidb/pkg/executor.(*CoprocessorDAGHandler).HandleRequest(0xc09e65d8f0, {0x63a0500?, 0xc06dc9a150?}, 0xc000f75900?)
	/workspace/source/tidb/pkg/executor/coprocessor.go:90 +0x2b7
github.com/pingcap/tidb/pkg/server.(*rpcServer).handleCopRequest(0x1c19d5a?, {0x63a0500, 0xc06dc9a150}, 0x0?)
	/workspace/source/tidb/pkg/server/rpc_server.go:214 +0x216
github.com/pingcap/tidb/pkg/server.(*rpcServer).Coprocessor(0x589fa20?, {0x63a0500, 0xc06dc9a150}, 0x0?)
	/workspace/source/tidb/pkg/server/rpc_server.go:103 +0xa5
github.com/pingcap/kvproto/pkg/tikvpb._Tikv_Coprocessor_Handler({0x59b3e80?, 0xc01413f0e0}, {0x63a0500, 0xc06dc9a150}, 0xc1b33c4c00, 0x0)
	/root/go/pkg/mod/github.com/pingcap/[email protected]/pkg/tikvpb/tikvpb.pb.go:3512 +0x169
google.golang.org/grpc.(*Server).processUnaryRPC(0xc013fde780, {0x63a0500, 0xc06dc9a090}, {0x63bf7e0, 0xc00f1bd1e0}, 0xc09dcec7e0, 0xc01413f200, 0x8b6c0b0, 0x0)
	/root/go/pkg/mod/google.golang.org/[email protected]/server.go:1343 +0xe03
google.golang.org/grpc.(*Server).handleStream(0xc013fde780, {0x63bf7e0, 0xc00f1bd1e0}, 0xc09dcec7e0)
	/root/go/pkg/mod/google.golang.org/[email protected]/server.go:1737 +0xc4c
google.golang.org/grpc.(*Server).serveStreams.func1.1()
	/root/go/pkg/mod/google.golang.org/[email protected]/server.go:986 +0x86
created by google.golang.org/grpc.(*Server).serveStreams.func1 in goroutine 52285
	/root/go/pkg/mod/google.golang.org/[email protected]/server.go:997 +0x145

4. What is your TiDB version? (Required)

v7.5.3

@tiancaiamao tiancaiamao added type/bug The issue is confirmed as a bug. affects-7.5 This bug affects the 7.5.x(LTS) versions. labels Nov 28, 2024
@tiancaiamao tiancaiamao linked a pull request Nov 28, 2024 that will close this issue
13 tasks
@jebter jebter added the sig/sql-infra SIG: SQL Infra label Nov 29, 2024
@ti-chi-bot ti-chi-bot bot added the report/customer Customers have encountered this bug. label Nov 29, 2024
@tiancaiamao tiancaiamao added the affects-8.5 This bug affects the 8.5.x(LTS) versions. label Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-7.5 This bug affects the 7.5.x(LTS) versions. affects-8.5 This bug affects the 8.5.x(LTS) 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 may-affects-8.1 report/customer Customers have encountered this bug. 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.

2 participants