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

flaky test TestFrameworkWithQuery #50055

Closed
Tracked by #41316
hawkingrei opened this issue Jan 4, 2024 · 7 comments · Fixed by #50251
Closed
Tracked by #41316

flaky test TestFrameworkWithQuery #50055

hawkingrei opened this issue Jan 4, 2024 · 7 comments · Fixed by #50251
Assignees
Labels
component/ddl This issue is related to DDL of TiDB. component/test type/enhancement The issue or PR belongs to an enhancement.

Comments

@hawkingrei
Copy link
Member

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

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

3. What did you see instead (Required)

 --- FAIL: TestFrameworkWithQuery (2.06s)
    testkit.go:138: 
        	Error Trace:	pkg/testkit/testkit.go:138
        	            				pkg/testkit/testkit.go:131
        	            				pkg/disttask/framework/framework_test.go:131
        	Error:      	Received unexpected error:
        	            	[schema:1050]Table 't' already exists
        	            	github.com/pingcap/errors.AddStack
        	            		external/com_github_pingcap_errors/errors.go:174
        	            	github.com/pingcap/errors.Trace
        	            		external/com_github_pingcap_errors/juju_adaptor.go:15
        	            	github.com/pingcap/tidb/pkg/ddl.(*ddl).DoDDLJob
        	            		pkg/ddl/ddl.go:1171
        	            	github.com/pingcap/tidb/pkg/ddl.(*ddl).CreateTableWithInfo
        	            		pkg/ddl/ddl_api.go:2747
        	            	github.com/pingcap/tidb/pkg/ddl.(*ddl).CreateTable
        	            		pkg/ddl/ddl_api.go:2586
        	            	github.com/pingcap/tidb/pkg/executor.(*DDLExec).executeCreateTable
        	            		pkg/executor/ddl.go:267
        	            	github.com/pingcap/tidb/pkg/executor.(*DDLExec).Next
        	            		pkg/executor/ddl.go:159
        	            	github.com/pingcap/tidb/pkg/executor/internal/exec.Next
        	            		pkg/executor/internal/exec/executor.go:314
        	            	github.com/pingcap/tidb/pkg/executor.(*ExecStmt).next
        	            		pkg/executor/adapter.go:1252
        	            	github.com/pingcap/tidb/pkg/executor.(*ExecStmt).handleNoDelayExecutor
        	            		pkg/executor/adapter.go:997
        	            	github.com/pingcap/tidb/pkg/executor.(*ExecStmt).handleNoDelay
        	            		pkg/executor/adapter.go:823
        	            	github.com/pingcap/tidb/pkg/executor.(*ExecStmt).Exec
        	            		pkg/executor/adapter.go:598
        	            	github.com/pingcap/tidb/pkg/session.runStmt
        	            		pkg/session/session.go:2380
        	            	github.com/pingcap/tidb/pkg/session.(*session).ExecuteStmt
        	            		pkg/session/session.go:2239
        	            	github.com/pingcap/tidb/pkg/testkit.(*TestKit).ExecWithContext
        	            		pkg/testkit/testkit.go:364
        	            	github.com/pingcap/tidb/pkg/testkit.(*TestKit).MustExecWithContext
        	            		pkg/testkit/testkit.go:136
        	            	github.com/pingcap/tidb/pkg/testkit.(*TestKit).MustExec
        	            		pkg/testkit/testkit.go:131
        	            	pkg/disttask/framework/framework_test_test.TestFrameworkWithQuery
        	            		pkg/disttask/framework/framework_test.go:131
        	            	testing.tRunner
        	            		GOROOT/src/testing/testing.go:1595
        	            	runtime.goexit
        	            		src/runtime/asm_amd64.s:1650
        	Test:       	TestFrameworkWithQuery
        	Messages:   	sql:create table t(a int not null, b int not null), [], error stack [schema:1050]Table 't' already exists
        	            	github.com/pingcap/errors.AddStack
        	            		external/com_github_pingcap_errors/errors.go:174
        	            	github.com/pingcap/errors.Trace
        	            		external/com_github_pingcap_errors/juju_adaptor.go:15
        	            	github.com/pingcap/tidb/pkg/ddl.(*ddl).DoDDLJob
        	            		pkg/ddl/ddl.go:1171
        	            	github.com/pingcap/tidb/pkg/ddl.(*ddl).CreateTableWithInfo
        	            		pkg/ddl/ddl_api.go:2747
        	            	github.com/pingcap/tidb/pkg/ddl.(*ddl).CreateTable
        	            		pkg/ddl/ddl_api.go:2586
        	            	github.com/pingcap/tidb/pkg/executor.(*DDLExec).executeCreateTable
        	            		pkg/executor/ddl.go:267
        	            	github.com/pingcap/tidb/pkg/executor.(*DDLExec).Next
        	            		pkg/executor/ddl.go:159
        	            	github.com/pingcap/tidb/pkg/executor/internal/exec.Next
        	            		pkg/executor/internal/exec/executor.go:314
        	            	github.com/pingcap/tidb/pkg/executor.(*ExecStmt).next
        	            		pkg/executor/adapter.go:1252
        	            	github.com/pingcap/tidb/pkg/executor.(*ExecStmt).handleNoDelayExecutor
        	            		pkg/executor/adapter.go:997
        	            	github.com/pingcap/tidb/pkg/executor.(*ExecStmt).handleNoDelay
        	            		pkg/executor/adapter.go:823
        	            	github.com/pingcap/tidb/pkg/executor.(*ExecStmt).Exec
        	            		pkg/executor/adapter.go:598
        	            	github.com/pingcap/tidb/pkg/session.runStmt
        	            		pkg/session/session.go:2380
        	            	github.com/pingcap/tidb/pkg/session.(*session).ExecuteStmt
        	            		pkg/session/session.go:2239
        	            	github.com/pingcap/tidb/pkg/testkit.(*TestKit).ExecWithContext
        	            		pkg/testkit/testkit.go:364
        	            	github.com/pingcap/tidb/pkg/testkit.(*TestKit).MustExecWithContext
        	            		pkg/testkit/testkit.go:136
        	            	github.com/pingcap/tidb/pkg/testkit.(*TestKit).MustExec
        	            		pkg/testkit/testkit.go:131
        	            	pkg/disttask/framework/framework_test_test.TestFrameworkWithQuery
        	            		pkg/disttask/framework/framework_test.go:131
        	            	testing.tRunner
        	            		GOROOT/src/testing/testing.go:1595
        	            	runtime.goexit
        	            		src/runtime/asm_amd64.s:1650
FAIL
================================================================================

4. What is your TiDB version? (Required)

@hawkingrei hawkingrei added the type/bug The issue is confirmed as a bug. label Jan 4, 2024
@ywqzzy
Copy link
Contributor

ywqzzy commented Jan 4, 2024

/assign ywqzzy

@hawkingrei
Copy link
Member Author

TestFrameworkWithQuery has a panic

panic: Log in goroutine after TestFrameworkWithQuery has completed: 
	Error Trace:	pkg/disttask/framework/framework_test.go:44
	            				pkg/disttask/framework/framework_test.go:35
	            				pkg/disttask/framework/framework_test.go:124
	            				pkg/util/wait_group_wrapper.go:157
	            				src/runtime/asm_amd64.s:1650
	Error:      	Not equal: 
	            	expected: "succeed"
	            	actual  : "failed"
	            	
	            	Diff:
	            	--- Expected
	            	+++ Actual
	            	@@ -1,2 +1,2 @@
	            	-(proto.TaskState) (len=7) "succeed"
	            	+(proto.TaskState) (len=6) "failed"
	            	 
	Test:       	TestFrameworkWithQuery
goroutine 33667 [running]:
testing.(*common).logDepth(0xc000e95a00, {0xc005bf2580, 0x284}, 0x3)
	GOROOT/src/testing/testing.go:1022 +0x4c5
testing.(*common).log(...)
	GOROOT/src/testing/testing.go:1004
testing.(*common).Errorf(0xc000e95a00, {0x24cd1de?, 0x53a5ee5?}, {0xc006987bc0?, 0x1c735c0?, 0x201?})
	GOROOT/src/testing/testing.go:1068 +0x54
github.com/stretchr/testify/assert.Fail({0x7f674c505c70, 0xc000e95a00}, {0xc000083ce0, 0xad}, {0x0, 0x0, 0x0})
	external/com_github_stretchr_testify/assert/assertions.go:333 +0x350
github.com/stretchr/testify/assert.Equal({0x7f674c505c70, 0xc000e95a00}, {0x1d866c0?, 0x2e7abb0}, {0x1d866c0?, 0xc006987ab0?}, {0x0, 0x0, 0x0})
	external/com_github_stretchr_testify/assert/assertions.go:417 +0x2bd
github.com/stretchr/testify/require.Equal({0x2e9a5a0, 0xc000e95a00}, {0x1d866c0, 0x2e7abb0}, {0x1d866c0, 0xc006987ab0}, {0x0, 0x0, 0x0})
	external/com_github_stretchr_testify/require/require.go:162 +0xbe
pkg/disttask/framework/framework_test_test.submitTaskAndCheckSuccess({0x2ebdfd0?, 0xc0010b60c0?}, 0x2?, {0x24cdb30?, 0x772ecfd2?}, 0x98c9dc0?, 0xc15da32a5cb3dfe6?)
	pkg/disttask/framework/framework_test.go:44 +0x89
pkg/disttask/framework/framework_test_test.submitTaskAndCheckSuccessForBasic(...)
	pkg/disttask/framework/framework_test.go:35
pkg/disttask/framework/framework_test_test.TestFrameworkWithQuery.func1()
	pkg/disttask/framework/framework_test.go:124 +0x125
github.com/pingcap/tidb/pkg/util.(*WaitGroupWrapper).Run.func1()
	pkg/util/wait_group_wrapper.go:157 +0x59
created by github.com/pingcap/tidb/pkg/util.(*WaitGroupWrapper).Run in goroutine 84
	pkg/util/wait_group_wrapper.go:155 +0x7c
--
Coverage runner: Not collecting coverage for failed test. 

@jebter jebter added component/test component/ddl This issue is related to DDL of TiDB. labels Jan 4, 2024
@ywqzzy ywqzzy removed their assignment Jan 10, 2024
@tangenta tangenta self-assigned this Jan 10, 2024
@tangenta tangenta added type/enhancement The issue or PR belongs to an enhancement. and removed type/bug The issue is confirmed as a bug. labels Jan 10, 2024
@ywqzzy
Copy link
Contributor

ywqzzy commented Jan 10, 2024

/severity major

@ywqzzy
Copy link
Contributor

ywqzzy commented Jan 10, 2024

/remove-severity

@ywqzzy
Copy link
Contributor

ywqzzy commented Jan 10, 2024

/remove-label major

Copy link

ti-chi-bot bot commented Jan 10, 2024

@ywqzzy: The label(s) major cannot be applied. These labels are supported: fuzz/sqlancer, challenge-program, compatibility-breaker, first-time-contributor, contribution, good first issue, correctness, duplicate, proposal, security, ok-to-test, needs-ok-to-test, needs-more-info, needs-cherry-pick-release-5.4, needs-cherry-pick-release-6.1, needs-cherry-pick-release-6.5, needs-cherry-pick-release-7.1, needs-cherry-pick-release-7.5, needs-cherry-pick-release-7.6, affects-5.4, affects-6.1, affects-6.5, affects-7.1, affects-7.5, affects-7.6, may-affects-5.4, may-affects-6.1, may-affects-6.5, may-affects-7.1, may-affects-7.5, may-affects-7.6.

In response to this:

/remove-label major

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/ddl This issue is related to DDL of TiDB. component/test type/enhancement The issue or PR belongs to an enhancement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants