kmesh-net / kmesh

High Performance ServiceMesh Data Plane Based on Programmable Kernel
https://kmesh.net
Apache License 2.0
398 stars 52 forks source link

`TestPodSidecarLabelChangeTriggersAddIptablesAction` sometimes run failed in github CI #626

Closed Okabe-Rintarou-0 closed 1 month ago

Okabe-Rintarou-0 commented 1 month ago

What happened:

=== RUN   TestPodSidecarLabelChangeTriggersAddIptablesAction
time="2024-07-23T01:54:14Z" level=info msg="pod default/test-pod-no-sidecar does not have sidecar injected, skip" subsys=bypass
coverage: 18.3% of statements
panic: test timed out after 10m0s
running tests:
    TestPodSidecarLabelChangeTriggersAddIptablesAction (10m0s)

goroutine 19 [running]:
testing.(*M).startAlarm.func1()
    /root/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.22.0.linux-amd64/src/testing/testing.go:2366 +0x265
created by time.goFunc
    /root/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.22.0.linux-amd64/src/time/sleep.go:177 +0x45

goroutine 1 [chan receive, 10 minutes]:
testing.(*T).Run(0xc0007fe680, {0x4549905, 0x32}, 0x461c810)
    /root/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.22.0.linux-amd64/src/testing/testing.go:1750 +0x851
testing.runTests.func1(0xc0007fe680)
    /root/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.22.0.linux-amd64/src/testing/testing.go:2161 +0x86
testing.tRunner(0xc0007fe680, 0xc000171b00)
    /root/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.22.0.linux-amd64/src/testing/testing.go:1689 +0x21f
testing.runTests(0xc0004e2210, {0x68a9fe0, 0x1, 0x1}, {0xc000171ba8?, 0xc000171bf0?, 0x693cf20?})
    /root/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.22.0.linux-amd64/src/testing/testing.go:2159 +0x8bf
testing.(*M).Run(0xc0003d7400)
    /root/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.22.0.linux-amd64/src/testing/testing.go:2027 +0xf18
main.main()
    _testmain.go:81 +0x2e5

What you expected to happen:

How to reproduce it (as minimally and precisely as possible):

Anything else we need to know?:

Environment:

Okabe-Rintarou-0 commented 1 month ago

plz check https://github.com/kmesh-net/kmesh/actions/runs/10051260127/job/27780563289

hzxuzhonghu commented 1 month ago

There must be something race, I met once before

Okabe-Rintarou-0 commented 1 month ago

Maybe my pr is using the old version of TestPodSidecarLabelChangeTriggersAddIptablesAction.

hzxuzhonghu commented 1 month ago

I can reproduce with go test -v -run TestPodSidecarLabelChangeTriggersAddIptablesAction --count=100

Okabe-Rintarou-0 commented 1 month ago

fixed