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

Failed to run UT on PC #8814

Closed
zgcbj opened this issue Nov 14, 2024 · 5 comments
Closed

Failed to run UT on PC #8814

zgcbj opened this issue Nov 14, 2024 · 5 comments
Labels
type/question The issue belongs to a question.

Comments

@zgcbj
Copy link

zgcbj commented Nov 14, 2024

Bug Report

When I run ut with make ci-test-job JOB_COUNT=1 JOB_INDEX=1 on PC, there are many POTENTIAL DEADLOCKs. Why doesn't github action report an error?

What did you do?

git clone [email protected]:tikv/pd.git
git checkout v8.1.1
cd pd
make ci-test-job JOB_COUNT=1 JOB_INDEX=1

What did you expect to see?

All UT can pass

What did you see instead?

[2024/11/14 16:00:44.212 +08:00] [INFO] [key_manager.go:131] ["saved encryption keys"]
FAIL    github.com/tikv/pd/pkg/encryption       10.768s
ok      github.com/tikv/pd/pkg/election 72.475s coverage: 1.5% of statements in ./...
ok      github.com/tikv/pd/pkg/dashboard/adapter        1.782s  coverage: 1.1% of statements in ./...
POTENTIAL DEADLOCK: Duplicate locking, saw callers this locks in one goroutine:
current goroutine 2 lock &{{{0 0} 0 0 {{} 1} {{} 0}}}
all callers to this lock in the goroutine
sliding_window.go:118 storelimit.(*SlidingWindows).Available { s.mu.RLock() } <<<<<
limit_test.go:138 storelimit.TestFeedback.func1 { if s.Available(regionSize, SendSnapshot, constant.Low) && iter.Load() > 0 { }

sliding_window.go:151 storelimit.(*SlidingWindows).Ack { s.mu.Lock() } <<<<<
/usr/local/go23/go/src/container/list/list.go:70 list.(*List).Front { if l.len == 0 { }


Other goroutines holding locks:


FAIL    github.com/tikv/pd/pkg/core/storelimit  0.207s

What version of PD are you using (pd-server -V)?

tag: v8.1.1

@zgcbj zgcbj added the type/bug The issue is confirmed as a bug. label Nov 14, 2024
@rleungx
Copy link
Member

rleungx commented Nov 18, 2024

Did you run tests with go 1.23?

@zgcbj
Copy link
Author

zgcbj commented Nov 20, 2024

Did you run tests with go 1.23?

yes

When I run make ci-test-job JOB_COUNT=1 JOB_INDEX=1 it actually runs go test witch -tags deadlock。After I removed -tags deadlock and it ran fine.

@rleungx
Copy link
Member

rleungx commented Nov 20, 2024

Deadlock detection has some issues with go 1.23. You can try 1.22 or manually upgrade the deadlock dependency to v0.3.5.

@zgcbj
Copy link
Author

zgcbj commented Nov 20, 2024

Deadlock detection has some issues with go 1.23. You can try 1.22 or manually upgrade the deadlock dependency to v0.3.5.

go 1.22 works fine!

@rleungx
Copy link
Member

rleungx commented Nov 20, 2024

Change the issue to question and close it, feel free to reopen it.

@rleungx rleungx closed this as completed Nov 20, 2024
@rleungx rleungx added type/question The issue belongs to a question. and removed type/bug The issue is confirmed as a bug. labels Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/question The issue belongs to a question.
Projects
None yet
Development

No branches or pull requests

2 participants