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

*: make test is failed about cgroup #5953

Closed
lhy1024 opened this issue Feb 9, 2023 · 6 comments · Fixed by #6330
Closed

*: make test is failed about cgroup #5953

lhy1024 opened this issue Feb 9, 2023 · 6 comments · Fixed by #6330
Labels
type/ci The issue is related to CI.

Comments

@lhy1024
Copy link
Contributor

lhy1024 commented Feb 9, 2023

Bug Report

What did you do?

make test

What did you expect to see?

success

What did you see instead?

failed after #5848 merged

--- FAIL: TestGetCgroupCPU (0.00s)
    cgroup_cpu_test.go:45: 
                Error Trace:    /home/lhy1024/pd/pkg/cgroup/cgroup_cpu_test.go:45
                Error:          Received unexpected error:
                                no cpu controller detected
                                github.com/tikv/pd/pkg/cgroup.getCgroupCPUHelper
                                        /home/lhy1024/pd/pkg/cgroup/cgroup_cpu.go:33
                                github.com/tikv/pd/pkg/cgroup.GetCgroupCPU
                                        /home/lhy1024/pd/pkg/cgroup/cgroup_cpu_linux.go:28
                                github.com/tikv/pd/pkg/cgroup.TestGetCgroupCPU
                                        /home/lhy1024/pd/pkg/cgroup/cgroup_cpu_test.go:44
                                testing.tRunner
                                        /usr/local/go/src/testing/testing.go:1446
                                runtime.goexit
                                        /usr/local/go/src/runtime/asm_amd64.s:1594
                Test:           TestGetCgroupCPU
[2023/02/09 14:11:28.732 +08:00] [WARN] [cgroup_memory.go:84] ["no cgroup memory controller detected"]
[2023/02/09 14:11:28.780 +08:00] [WARN] [cgroup_memory.go:55] ["no cgroup memory controller detected"]
[2023/02/09 14:11:28.796 +08:00] [WARN] [cgroup_memory.go:115] ["no cgroup memory controller detected"]
FAIL
coverage: 76.5% of statements
FAIL    github.com/tikv/pd/pkg/cgroup   0.184s
--- FAIL: TestFinalizer (0.01s)
    finalizer_test.go:40: 
                Error Trace:    /home/lhy1024/pd/pkg/gctuner/finalizer_test.go:40
                Error:          Not equal: 
                                expected: 1
                                actual  : 0
                Test:           TestFinalizer
[2023/02/09 14:18:20.957 +08:00] [INFO] [memory_limit_tuner.go:49] [debug.SetMemoryLimit] [limit=858993459] [ret=9223372036854775807]
[2023/02/09 14:18:21.022 +08:00] [INFO] [memory_limit_tuner.go:49] [debug.SetMemoryLimit] [limit=1181116006] [ret=858993459]
[2023/02/09 14:18:23.825 +08:00] [INFO] [tuner.go:117] ["new gctuner"] [threshold=524288000]
[2023/02/09 14:18:23.826 +08:00] [INFO] [gogc.go:43] [debug.SetGCPercent] [val=500] [result=100]
panic: Fail in goroutine after TestFinalizer has completed

goroutine 20 [running]:
testing.(*common).Fail(0xc000248680)
        /usr/local/go/src/testing/testing.go:824 +0x1a8
testing.(*common).FailNow(0xc000248680)
        /usr/local/go/src/testing/testing.go:847 +0x51
testing.(*common).Fatalf(0xc000248680, {0x93287f, 0x32}, {0x0, 0x0, 0x0})
        /usr/local/go/src/testing/testing.go:955 +0xaf
github.com/tikv/pd/pkg/gctuner.TestFinalizer.func1()
        /home/lhy1024/pd/pkg/gctuner/finalizer_test.go:35 +0x6f
github.com/tikv/pd/pkg/gctuner.finalizerHandler(0xc000216048)
        /home/lhy1024/pd/pkg/gctuner/finalizer.go:40 +0xc2
FAIL    github.com/tikv/pd/pkg/gctuner  2.954s

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

@lhy1024 lhy1024 added the type/bug The issue is confirmed as a bug. label Feb 9, 2023
@lhy1024
Copy link
Contributor Author

lhy1024 commented Feb 9, 2023

--- FAIL: TestTuner (0.39s)
    tuner_test.go:57: 
                Error Trace:    /home/lhy1024/pd/pkg/gctuner/tuner_test.go:57
                Error:          "296" is not less than or equal to "250"
                Test:           TestTuner
FAIL
coverage: 76.9% of statements
FAIL    github.com/tikv/pd/pkg/gctuner  3.353s

@lhy1024
Copy link
Contributor Author

lhy1024 commented Feb 9, 2023

--- FAIL: TestGlobalMemoryTuner (2.20s)
    memory_limit_tuner_test.go:95: 
        	Error Trace:	/home/lhy1024/pd/pkg/gctuner/memory_limit_tuner_test.go:95
        	Error:      	Not equal: 
        	            	expected: 1181116006
        	            	actual  : 858993459
        	Test:       	TestGlobalMemoryTuner
    memory_limit_tuner_test.go:66: 
        	Error Trace:	/home/lhy1024/pd/pkg/gctuner/memory_limit_tuner_test.go:66
        	            				/home/lhy1024/pd/pkg/gctuner/panic.go:540
        	            				/home/lhy1024/pd/pkg/gctuner/testing.go:871
        	            				/home/lhy1024/pd/pkg/gctuner/memory_limit_tuner_test.go:95
        	Error:      	Not equal: 
        	            	expected: true
        	            	actual  : false
        	Test:       	TestGlobalMemoryTuner

@lhy1024
Copy link
Contributor Author

lhy1024 commented Feb 9, 2023

--- FAIL: TestTuner (0.01s)
    tuner_test.go:40: 
        	Error Trace:	/home/lhy1024/pd/pkg/gctuner/tuner_test.go:40
        	Error:      	Not equal: 
        	            	expected: 0x1f4
        	            	actual  : 0x64
        	Test:       	TestTuner
FAIL

@lhy1024
Copy link
Contributor Author

lhy1024 commented Feb 9, 2023

@hnes
Copy link
Contributor

hnes commented Feb 14, 2023

The reason of "no cpu controller detected" error in TestGetCgroupCPU is because the kernel of the testing environment is too old and such old kernel is not supported very well by the current pkg/cgroup package. I think maybe this is not a very severe problem because we don't use GetCgroupCPU related functions currently.

@hnes
Copy link
Contributor

hnes commented Feb 14, 2023

In TiDB, these flaky tests in gctuner is marked as flaky and Bazel passes flaky tests if 1 out of 3 retries passes. There is also a tracking task list which aims to fix flaky tests and gctuner is one of them.

ti-chi-bot pushed a commit that referenced this issue Feb 16, 2023
)

ref #5953

Signed-off-by: Sen Han <00hnes@gmail.com>

Co-authored-by: lhy1024 <admin@liudos.us>
@rleungx rleungx added type/ci The issue is related to CI. and removed type/bug The issue is confirmed as a bug. severity/moderate labels Jul 17, 2023
@ti-chi-bot ti-chi-bot bot closed this as completed in #6330 Aug 7, 2024
ti-chi-bot bot pushed a commit that referenced this issue Aug 7, 2024
close #5953

Signed-off-by: Ryan Leung <rleungx@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/ci The issue is related to CI.
Projects
Development

Successfully merging a pull request may close this issue.

3 participants