tikv / pd

Placement driver for TiKV
Apache License 2.0
1.05k stars 719 forks source link

test: tests fail because bind address already in use #8511

Open lhy1024 opened 3 months ago

lhy1024 commented 3 months ago

Flaky Test

Which jobs are failing

2024-08-09T10:13:43.8843538Z     member_test.go:339: 
2024-08-09T10:13:43.8844726Z            Error Trace:    /home/runner/work/pd/pd/tests/server/member/member_test.go:339
2024-08-09T10:13:43.8845893Z            Error:          Received unexpected error:
2024-08-09T10:13:43.8848471Z                            [PD:etcd:ErrStartEtcd]listen tcp 127.0.0.1:41903: bind: address already in use: listen tcp 127.0.0.1:41903: bind: address already in use
2024-08-09T10:13:43.8850327Z                            github.com/pingcap/errors.AddStack
2024-08-09T10:13:43.8853049Z                                /home/runner/go/pkg/mod/github.com/pingcap/errors@v0.11.5-0.20211224045212-9687c2b0f87c/errors.go:174
2024-08-09T10:13:43.8855194Z                            github.com/pingcap/errors.(*Error).GenWithStackByCause
2024-08-09T10:13:43.8857807Z                                /home/runner/go/pkg/mod/github.com/pingcap/errors@v0.11.5-0.20211224045212-9687c2b0f87c/normalize.go:307
2024-08-09T10:13:43.8859576Z                            github.com/tikv/pd/server.(*Server).startEtcd
2024-08-09T10:13:43.8861027Z                                /home/runner/work/pd/pd/server/server.go:331
2024-08-09T10:13:43.8862268Z                            github.com/tikv/pd/server.(*Server).Run
2024-08-09T10:13:43.8863652Z                                /home/runner/work/pd/pd/server/server.go:620
2024-08-09T10:13:43.8864960Z                            github.com/tikv/pd/tests.(*TestServer).Run
2024-08-09T10:13:43.8866351Z                                /home/runner/work/pd/pd/tests/cluster.go:127
2024-08-09T10:13:43.8867570Z                            github.com/tikv/pd/tests.RunServer.func1
2024-08-09T10:13:43.8868949Z                                /home/runner/work/pd/pd/tests/cluster.go:577
2024-08-09T10:13:43.8869927Z                            runtime.goexit
2024-08-09T10:13:43.8871403Z                                /opt/hostedtoolcache/go/1.21.12/x64/src/runtime/asm_amd64.s:1650
2024-08-09T10:13:43.8872714Z                            github.com/tikv/pd/tests.RunServers
2024-08-09T10:13:43.8874084Z                                /home/runner/work/pd/pd/tests/cluster.go:589
2024-08-09T10:13:43.8875673Z                            github.com/tikv/pd/tests.(*TestCluster).RunInitialServers
2024-08-09T10:13:43.8877146Z                                /home/runner/work/pd/pd/tests/cluster.go:601
2024-08-09T10:13:43.8878866Z                            github.com/tikv/pd/tests/server/member_test.TestCampaignLeaderFrequently
2024-08-09T10:13:43.8880777Z                                /home/runner/work/pd/pd/tests/server/member/member_test.go:338
2024-08-09T10:13:43.8881875Z                            testing.tRunner
2024-08-09T10:13:43.8883380Z                                /opt/hostedtoolcache/go/1.21.12/x64/src/testing/testing.go:1595
2024-08-09T10:13:43.8884428Z                            runtime.goexit
2024-08-09T10:13:43.8885826Z                                /opt/hostedtoolcache/go/1.21.12/x64/src/runtime/asm_amd64.s:1650
2024-08-09T10:13:43.8886856Z            Test:           TestCampaignLeaderFrequently

CI link

https://github.com/tikv/pd/actions/runs/10317426723/job/28561957825?pr=8510

Reason for failure (if possible)

Anything else

lhy1024 commented 3 months ago
2024-08-08T08:54:47.6819770Z     server_test.go:286: 
2024-08-08T08:54:47.6820486Z            Error Trace:    /home/runner/work/pd/pd/tests/integrations/mcs/tso/server_test.go:286
2024-08-08T08:54:47.6821657Z                                        /home/runner/work/pd/pd/tests/integrations/mcs/tso/server_test.go:322
2024-08-08T08:54:47.6822289Z            Error:          Received unexpected error:
2024-08-08T08:54:47.6823605Z                            [PD:etcd:ErrStartEtcd]listen tcp 127.0.0.1:34997: bind: address already in use: listen tcp 127.0.0.1:34997: bind: address already in use
2024-08-08T08:54:47.6824758Z                            github.com/pingcap/errors.AddStack
2024-08-08T08:54:47.6826180Z                                /home/runner/go/pkg/mod/github.com/pingcap/errors@v0.11.5-0.20211224045212-9687c2b0f87c/errors.go:174
2024-08-08T08:54:47.6827171Z                            github.com/pingcap/errors.(*Error).GenWithStackByCause
2024-08-08T08:54:47.6828674Z                                /home/runner/go/pkg/mod/github.com/pingcap/errors@v0.11.5-0.20211224045212-9687c2b0f87c/normalize.go:307
2024-08-08T08:54:47.6829595Z                            github.com/tikv/pd/server.(*Server).startEtcd
2024-08-08T08:54:47.6830329Z                                /home/runner/work/pd/pd/server/server.go:331
2024-08-08T08:54:47.6831021Z                            github.com/tikv/pd/server.(*Server).Run
2024-08-08T08:54:47.6831782Z                                /home/runner/work/pd/pd/server/server.go:620
2024-08-08T08:54:47.6832439Z                            github.com/tikv/pd/tests.(*TestServer).Run
2024-08-08T08:54:47.6833408Z                                /home/runner/work/pd/pd/tests/cluster.go:127
2024-08-08T08:54:47.6834307Z                            github.com/tikv/pd/tests.RunServer.func1
2024-08-08T08:54:47.6835134Z                                /home/runner/work/pd/pd/tests/cluster.go:577
2024-08-08T08:54:47.6835665Z                            runtime.goexit
2024-08-08T08:54:47.6836452Z                                /opt/hostedtoolcache/go/1.21.12/x64/src/runtime/asm_amd64.s:1650
2024-08-08T08:54:47.6837146Z                            github.com/tikv/pd/tests.RunServers
2024-08-08T08:54:47.6838144Z                                /home/runner/work/pd/pd/tests/cluster.go:589
2024-08-08T08:54:47.6839515Z                            github.com/tikv/pd/tests.(*TestCluster).RunInitialServers
2024-08-08T08:54:47.6840623Z                                /home/runner/work/pd/pd/tests/cluster.go:601
2024-08-08T08:54:47.6842332Z                            github.com/tikv/pd/tests/integrations/mcs/tso.NewAPIServerForward
2024-08-08T08:54:47.6844254Z                                /home/runner/work/pd/pd/tests/integrations/mcs/tso/server_test.go:285
2024-08-08T08:54:47.6846122Z                            github.com/tikv/pd/tests/integrations/mcs/tso.TestForwardTSORelated
2024-08-08T08:54:47.6848075Z                                /home/runner/work/pd/pd/tests/integrations/mcs/tso/server_test.go:322
2024-08-08T08:54:47.6849208Z                            testing.tRunner
2024-08-08T08:54:47.6850478Z                                /opt/hostedtoolcache/go/1.21.12/x64/src/testing/testing.go:1595
2024-08-08T08:54:47.6851067Z                            runtime.goexit
2024-08-08T08:54:47.6851839Z                                /opt/hostedtoolcache/go/1.21.12/x64/src/runtime/asm_amd64.s:1650
2024-08-08T08:54:47.6852415Z            Test:           TestForwardTSORelated
2024-08-08T08:54:47.6853179Z --- FAIL: TestForwardTSORelated (6.73s)

https://github.com/tikv/pd/actions/runs/10298993363/job/28505341279