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 TestAlterAddConstraintStateChange3 in ddl pkg #46829

Closed
Tracked by #46819
wuhuizuo opened this issue Sep 11, 2023 · 4 comments
Closed
Tracked by #46819

flaky test TestAlterAddConstraintStateChange3 in ddl pkg #46829

wuhuizuo opened this issue Sep 11, 2023 · 4 comments
Labels
component/ddl This issue is related to DDL of TiDB. component/test type/bug The issue is confirmed as a bug.

Comments

@wuhuizuo
Copy link
Contributor

Bug Report

Flaky runs happened 16 times between "2023-09-01" AND "2023-09-09"

@wuhuizuo wuhuizuo added the type/bug The issue is confirmed as a bug. label Sep 11, 2023
@jebter jebter added component/test component/ddl This issue is related to DDL of TiDB. labels Sep 12, 2023
@wuhuizuo
Copy link
Contributor Author

wuhuizuo commented Nov 2, 2023

local run failed in a debug container with 1 core CPU + 4GB memory (commit reversion: d4b81de)

image
==================
WARNING: DATA RACE
Read at 0x00c0094e15f8 by goroutine 41:
  github.com/pingcap/tidb/pkg/executor.constructResultOfShowCreateTable()
      /workspace/apps/github.com/pingcap/tidb/pkg/executor/show.go:1224 +0x2cdb
  github.com/pingcap/tidb/pkg/executor.(*ShowExec).fetchShowCreateTable()
      /workspace/apps/github.com/pingcap/tidb/pkg/executor/show.go:1449 +0x156
  github.com/pingcap/tidb/pkg/executor.(*ShowExec).fetchAll()
      /workspace/apps/github.com/pingcap/tidb/pkg/executor/show.go:185 +0x3a4
  github.com/pingcap/tidb/pkg/executor.(*ShowExec).Next()
      /workspace/apps/github.com/pingcap/tidb/pkg/executor/show.go:130 +0x125
  github.com/pingcap/tidb/pkg/executor/internal/exec.Next()
      /workspace/apps/github.com/pingcap/tidb/pkg/executor/internal/exec/executor.go:278 +0x326
  github.com/pingcap/tidb/pkg/executor.(*ExecStmt).next()
      /workspace/apps/github.com/pingcap/tidb/pkg/executor/adapter.go:1226 +0x84
  github.com/pingcap/tidb/pkg/executor.(*recordSet).Next()
      /workspace/apps/github.com/pingcap/tidb/pkg/executor/adapter.go:154 +0x14e
  github.com/pingcap/tidb/pkg/session.(*execStmtResult).Next()
      <autogenerated>:1 +0x6c
  github.com/pingcap/tidb/pkg/session.GetRows4Test()
      /workspace/apps/github.com/pingcap/tidb/pkg/session/tidb.go:350 +0xd2
  github.com/pingcap/tidb/pkg/session.ResultSetToStringSlice()
      /workspace/apps/github.com/pingcap/tidb/pkg/session/tidb.go:368 +0xa7
  github.com/pingcap/tidb/pkg/testkit.(*TestKit).ResultSetToResultWithCtx()
      /workspace/apps/github.com/pingcap/tidb/pkg/testkit/testkit.go:251 +0xac
  github.com/pingcap/tidb/pkg/testkit.(*TestKit).MustQueryWithContext()
      /workspace/apps/github.com/pingcap/tidb/pkg/testkit/testkit.go:177 +0x275
  github.com/pingcap/tidb/pkg/testkit.(*TestKit).MustQuery()
      /workspace/apps/github.com/pingcap/tidb/pkg/testkit/testkit.go:152 +0xeb
  github.com/pingcap/tidb/pkg/ddl_test.TestAlterAddConstraintStateChange3()
      /workspace/apps/github.com/pingcap/tidb/pkg/ddl/constraint_test.go:247 +0x464
  github.com/pingcap/tidb/pkg/session.runStmt()
      /workspace/apps/github.com/pingcap/tidb/pkg/session/session.go:2420 +0x617
  github.com/pingcap/tidb/pkg/session.(*session).ExecuteStmt()
      /workspace/apps/github.com/pingcap/tidb/pkg/session/session.go:2270 +0x17b8
  github.com/pingcap/tidb/pkg/testkit.(*TestKit).ExecWithContext()
      /workspace/apps/github.com/pingcap/tidb/pkg/testkit/testkit.go:363 +0x829
  github.com/pingcap/tidb/pkg/testkit.(*TestKit).MustExecWithContext()
      /workspace/apps/github.com/pingcap/tidb/pkg/testkit/testkit.go:135 +0xab
  github.com/pingcap/tidb/pkg/testkit.(*TestKit).MustExec()
      /workspace/apps/github.com/pingcap/tidb/pkg/testkit/testkit.go:130 +0x10d
  github.com/pingcap/tidb/pkg/ddl_test.TestAlterAddConstraintStateChange3()
      /workspace/apps/github.com/pingcap/tidb/pkg/ddl/constraint_test.go:213 +0xcc
  github.com/pingcap/tidb/pkg/domain.(*Domain).rebuildSysVarCache()
      /workspace/apps/github.com/pingcap/tidb/pkg/domain/sysvar_cache.go:146 +0x844
  github.com/pingcap/tidb/pkg/domain.(*Domain).LoadSysVarCacheLoop()
      /workspace/apps/github.com/pingcap/tidb/pkg/domain/domain.go:1687 +0x93
  github.com/pingcap/tidb/pkg/session.bootstrapSessionImpl()
      /workspace/apps/github.com/pingcap/tidb/pkg/session/session.go:3367 +0x704
  github.com/pingcap/tidb/pkg/domain.(*Domain).GetSessionCache()
      /workspace/apps/github.com/pingcap/tidb/pkg/domain/sysvar_cache.go:62 +0x50
  github.com/pingcap/tidb/pkg/session.(*session).loadCommonGlobalVariablesIfNeeded()
      /workspace/apps/github.com/pingcap/tidb/pkg/session/session.go:3739 +0xf4
  github.com/pingcap/tidb/pkg/session.(*session).ExecuteStmt()
      /workspace/apps/github.com/pingcap/tidb/pkg/session/session.go:2131 +0x13a
  github.com/pingcap/tidb/pkg/session.(*session).ExecuteInternal()
      /workspace/apps/github.com/pingcap/tidb/pkg/session/session.go:1644 +0x312
  github.com/pingcap/tidb/pkg/domain.(*Domain).LoadPrivilegeLoop()
      /workspace/apps/github.com/pingcap/tidb/pkg/domain/domain.go:1630 +0x108
  github.com/pingcap/tidb/pkg/session.bootstrapSessionImpl()
      /workspace/apps/github.com/pingcap/tidb/pkg/session/session.go:3360 +0x6a4
  github.com/pingcap/tidb/pkg/session.BootstrapSession()
      /workspace/apps/github.com/pingcap/tidb/pkg/session/session.go:3281 +0xad
  github.com/pingcap/tidb/pkg/testkit.bootstrap()
      /workspace/apps/github.com/pingcap/tidb/pkg/testkit/mockstore.go:227 +0x94
  github.com/pingcap/tidb/pkg/testkit.CreateMockStoreAndDomain()
      /workspace/apps/github.com/pingcap/tidb/pkg/testkit/mockstore.go:200 +0xd5
  github.com/pingcap/tidb/pkg/ddl_test.TestAlterAddConstraintStateChange3()
      /workspace/apps/github.com/pingcap/tidb/pkg/ddl/constraint_test.go:209 +0x49
  testing.tRunner()
      /usr/local/go/src/testing/testing.go:1595 +0x238
  testing.(*T).Run.func1()
      /usr/local/go/src/testing/testing.go:1648 +0x44

Previous write at 0x00c0094e15f8 by goroutine 21515:
  github.com/pingcap/tidb/pkg/ddl_test.TestAlterAddConstraintStateChange3.func1()
      /workspace/apps/github.com/pingcap/tidb/pkg/ddl/constraint_test.go:239 +0x2a5
  github.com/pingcap/tidb/pkg/ddl/util/callback.(*TestDDLCallback).OnJobUpdated()
      /workspace/apps/github.com/pingcap/tidb/pkg/ddl/util/callback/callback.go:124 +0x1dc
  github.com/pingcap/tidb/pkg/ddl.(*ddl).delivery2worker.func1()
      /workspace/apps/github.com/pingcap/tidb/pkg/ddl/job_table.go:448 +0x16da
  github.com/pingcap/tidb/pkg/util.(*WaitGroupWrapper).Run.func1()
      /workspace/apps/github.com/pingcap/tidb/pkg/util/wait_group_wrapper.go:154 +0x72

Goroutine 41 (running) created at:
  testing.(*T).Run()
      /usr/local/go/src/testing/testing.go:1648 +0x82a
  testing.runTests.func1()
      /usr/local/go/src/testing/testing.go:2054 +0x84
  testing.tRunner()
      /usr/local/go/src/testing/testing.go:1595 +0x238
  testing.runTests()
      /usr/local/go/src/testing/testing.go:2052 +0x896
  testing.(*M).Run()
      /usr/local/go/src/testing/testing.go:1925 +0xb57
  go.uber.org/goleak.VerifyTestMain()
      /share/.go/pkg/mod/go.uber.org/goleak@v1.2.1/testmain.go:53 +0x64
  github.com/pingcap/tidb/pkg/ddl_test.TestMain()
      /workspace/apps/github.com/pingcap/tidb/pkg/ddl/main_test.go:73 +0x904
  main.main()
      _testmain.go:851 +0x307

Goroutine 21515 (finished) created at:
  github.com/pingcap/tidb/pkg/util.(*WaitGroupWrapper).Run()
      /workspace/apps/github.com/pingcap/tidb/pkg/util/wait_group_wrapper.go:152 +0xe4
  github.com/pingcap/tidb/pkg/ddl.(*ddl).delivery2worker()
      /workspace/apps/github.com/pingcap/tidb/pkg/ddl/job_table.go:373 +0x1ab
  github.com/pingcap/tidb/pkg/ddl.(*ddl).loadDDLJobAndRun()
      /workspace/apps/github.com/pingcap/tidb/pkg/ddl/job_table.go:366 +0x54c
  github.com/pingcap/tidb/pkg/ddl.(*ddl).startDispatchLoop()
      /workspace/apps/github.com/pingcap/tidb/pkg/ddl/job_table.go:301 +0xd65
  github.com/pingcap/tidb/pkg/ddl.(*ddl).startDispatchLoop-fm()
      <autogenerated>:1 +0x33
  github.com/pingcap/tidb/pkg/util.(*WaitGroupWrapper).Run.func1()
      /workspace/apps/github.com/pingcap/tidb/pkg/util/wait_group_wrapper.go:154 +0x72

@wuhuizuo
Copy link
Contributor Author

wuhuizuo commented Nov 3, 2023

It may be fixed in #48131

@wuhuizuo
Copy link
Contributor Author

wuhuizuo commented Nov 3, 2023

/close

it not happened after 2023-11-01.

Copy link

ti-chi-bot bot commented Nov 3, 2023

@wuhuizuo: Closing this issue.

In response to this:

/close

it not happened after 2023-11-01.

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 kubernetes/test-infra repository.

@ti-chi-bot ti-chi-bot bot closed this as completed Nov 3, 2023
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/bug The issue is confirmed as a bug.
Projects
None yet
Development

No branches or pull requests

2 participants