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

tidb occurred fatal error: sync: unlock of unlocked mutex #39036

Closed
AkiraXie opened this issue Nov 9, 2022 · 1 comment · Fixed by #39099
Closed

tidb occurred fatal error: sync: unlock of unlocked mutex #39036

AkiraXie opened this issue Nov 9, 2022 · 1 comment · Fixed by #39099
Labels
affects-6.4 severity/major type/bug The issue is confirmed as a bug.

Comments

@AkiraXie
Copy link

AkiraXie commented Nov 9, 2022

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

  1. running ch workload: /go-tpc ch run --host *** -P 4000 --warehouses 2000 -T 16 -D longrun_tpcc --acThreads 0 --ignore-errorand randomly execute query in q1,q2,q3,q4,q5,q6,q7,q8,q10,q11,q12,q13,q14,q15,q16,q17,q18,q19,q20,q21,q22,q23
  2. running zto workload: /zto -address ** -ratio 0.8 -update-thread 24 -insert-count 4294967295 -batch-insert 10 -trace-back-days 15 -trace-back-unsign-days 15

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

  1. run without error

3. What did you see instead (Required)

fatal error: sync: unlock of unlocked mutex
goroutine 3119 [running]:
sync.fatal({0x4636dae?, 0xc00bc28800?})
	/usr/local/go/src/runtime/panic.go:1031 +0x1e
sync.(*Mutex).unlockSlow(0xc0b53e4828, 0xffffffff)
	/usr/local/go/src/sync/mutex.go:229 +0x3c
sync.(*Mutex).Unlock(0x1?)
	/usr/local/go/src/sync/mutex.go:223 +0x29
github.com/pingcap/tidb/sessionctx/stmtctx.(*StatementContext).CopTasksDetails(0xc0b53e4798)
	/home/root/tidb/sessionctx/stmtctx/stmtctx.go:930 +0x4bf
github.com/pingcap/tidb/util.GenLogFields(0x3dd24a, 0xc12a2a8240, 0x0)
	/home/root/tidb/util/util.go:113 +0x2ca
github.com/pingcap/tidb/util/memoryusagealarm.(*memoryUsageAlarm).getTop10SqlInfo(0xc016a2df20, 0x1ffffffff?, {0xc12a213038?, 0x2, 0x36?})
	/home/root/tidb/util/memoryusagealarm/memoryusagealarm.go:279 +0x2f6
github.com/pingcap/tidb/util/memoryusagealarm.(*memoryUsageAlarm).getTop10SqlInfoByCostTime(0x5?, {0xc12a213038?, 0x36?, 0x1be767?})
	/home/root/tidb/util/memoryusagealarm/memoryusagealarm.go:311 +0x2e
github.com/pingcap/tidb/util/memoryusagealarm.(*memoryUsageAlarm).printTop10SqlInfo(0xc12945bcc0?, {0xc12a213038, 0x2, 0x3}, 0xc000076000?)
	/home/root/tidb/util/memoryusagealarm/memoryusagealarm.go:262 +0x5a7
github.com/pingcap/tidb/util/memoryusagealarm.(*memoryUsageAlarm).recordSQL(0xc1295d52c0?, {0x4d498d0?, 0xc000ce6e00?}, {0xc1295d52c0, 0x3c})
	/home/root/tidb/util/memoryusagealarm/memoryusagealarm.go:336 +0x471
github.com/pingcap/tidb/util/memoryusagealarm.(*memoryUsageAlarm).doRecord(0xc016a2df20, 0x465a62a10?, 0x0?, {0x4d498d0, 0xc000ce6e00}, 0x1)
	/home/root/tidb/util/memoryusagealarm/memoryusagealarm.go:222 +0xc78
github.com/pingcap/tidb/util/memoryusagealarm.(*memoryUsageAlarm).alarm4ExcessiveMemUsage(0xc016a2df20, {0x4d498d0, 0xc000ce6e00})
	/home/root/tidb/util/memoryusagealarm/memoryusagealarm.go:163 +0x393
github.com/pingcap/tidb/util/memoryusagealarm.(*Handle).Run(0xc000d54420)
	/home/root/tidb/util/memoryusagealarm/memoryusagealarm.go:67 +0x113
created by main.createServer
	/home/root/tidb/tidb-server/main.go:759 +0x4d0

tidb4stderr.log

4. What is your TiDB version? (Required)

v6.4.0

@AkiraXie AkiraXie added the type/bug The issue is confirmed as a bug. label Nov 9, 2022
@AkiraXie
Copy link
Author

AkiraXie commented Nov 9, 2022

/severity major

@ti-chi-bot ti-chi-bot added severity/major may-affects-4.0 This bug maybe affects 4.0.x versions. may-affects-5.0 This bug maybe affects 5.0.x versions. 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.0 may-affects-6.1 may-affects-6.2 may-affects-6.3 labels Nov 10, 2022
@XuHuaiyu XuHuaiyu added affects-6.4 and removed may-affects-4.0 This bug maybe affects 4.0.x versions. 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-5.0 This bug maybe affects 5.0.x versions. may-affects-6.0 may-affects-6.1 may-affects-6.2 may-affects-6.3 labels Nov 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-6.4 severity/major type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants