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

server: race in TestAlterTenantCompleteToTime on auditlogging.UserAuditEnterpriseParamsHook #104838

Closed
yuzefovich opened this issue Jun 14, 2023 · 4 comments
Assignees
Labels
C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.

Comments

@yuzefovich
Copy link
Member

yuzefovich commented Jun 14, 2023

Seen here (on #104828 which should be unrelated):

=== RUN   TestAlterTenantCompleteToTime
    test_log_scope.go:161: test logs captured to: /artifacts/tmp/_tmp/90c1b75d835f45b8488807abb5b1092d/logTestAlterTenantCompleteToTime2659692391
    test_log_scope.go:79: use -show-logs to present logs inline
==================
WARNING: DATA RACE
Write at 0x000012efccc8 by goroutine 42:
  github.com/cockroachdb/cockroach/pkg/server.newSQLServer()
      github.com/cockroachdb/cockroach/pkg/server/server_sql.go:1383 +0xd0fe
  github.com/cockroachdb/cockroach/pkg/server.NewServer()
      github.com/cockroachdb/cockroach/pkg/server/server.go:1099 +0xa347
  github.com/cockroachdb/cockroach/pkg/server.NewServer()
      github.com/cockroachdb/cockroach/pkg/server/server.go:281 +0xf69
  github.com/cockroachdb/cockroach/pkg/server.testServerFactoryImpl.New()
      github.com/cockroachdb/cockroach/pkg/server/testserver.go:1867 +0x46e
  github.com/cockroachdb/cockroach/pkg/server.(*testServerFactoryImpl).New()
      <autogenerated>:1 +0x6f
  github.com/cockroachdb/cockroach/pkg/testutils/serverutils.NewServer()
      github.com/cockroachdb/cockroach/pkg/testutils/serverutils/test_server_shim.go:392 +0x9d
  github.com/cockroachdb/cockroach/pkg/testutils/testcluster.(*TestCluster).AddServer()
      github.com/cockroachdb/cockroach/pkg/testutils/testcluster/testcluster.go:568 +0x504
  github.com/cockroachdb/cockroach/pkg/testutils/testcluster.NewTestCluster()
      github.com/cockroachdb/cockroach/pkg/testutils/testcluster/testcluster.go:329 +0xcec
  github.com/cockroachdb/cockroach/pkg/testutils/testcluster.StartTestCluster()
      github.com/cockroachdb/cockroach/pkg/testutils/testcluster/testcluster.go:232 +0x7d
  github.com/cockroachdb/cockroach/pkg/ccl/streamingccl/replicationtestutils.CreateTenantStreamingClusters.func1()
      github.com/cockroachdb/cockroach/pkg/ccl/streamingccl/replicationtestutils/testutils.go:260 +0xd5
  github.com/cockroachdb/cockroach/pkg/ccl/streamingccl/replicationtestutils.CreateTenantStreamingClusters.func3()
      github.com/cockroachdb/cockroach/pkg/ccl/streamingccl/replicationtestutils/testutils.go:285 +0x109
  github.com/cockroachdb/cockroach/pkg/util/ctxgroup.Group.GoCtx.func1()
      github.com/cockroachdb/cockroach/pkg/util/ctxgroup/ctxgroup.go:168 +0x4c
  golang.org/x/sync/errgroup.(*Group).Go.func1()
      golang.org/x/sync/errgroup/external/org_golang_x_sync/errgroup/errgroup.go:75 +0x86

Previous write at 0x000012efccc8 by goroutine 41:
  github.com/cockroachdb/cockroach/pkg/server.newSQLServer()
      github.com/cockroachdb/cockroach/pkg/server/server_sql.go:1383 +0xd0fe
  github.com/cockroachdb/cockroach/pkg/server.NewServer()
      github.com/cockroachdb/cockroach/pkg/server/server.go:1099 +0xa347
  github.com/cockroachdb/cockroach/pkg/server.NewServer()
      github.com/cockroachdb/cockroach/pkg/server/server.go:281 +0xf69
  github.com/cockroachdb/cockroach/pkg/server.testServerFactoryImpl.New()
      github.com/cockroachdb/cockroach/pkg/server/testserver.go:1867 +0x46e
  github.com/cockroachdb/cockroach/pkg/server.(*testServerFactoryImpl).New()
      <autogenerated>:1 +0x6f
  github.com/cockroachdb/cockroach/pkg/testutils/serverutils.NewServer()
      github.com/cockroachdb/cockroach/pkg/testutils/serverutils/test_server_shim.go:392 +0x9d
  github.com/cockroachdb/cockroach/pkg/testutils/testcluster.(*TestCluster).AddServer()
      github.com/cockroachdb/cockroach/pkg/testutils/testcluster/testcluster.go:568 +0x504
  github.com/cockroachdb/cockroach/pkg/testutils/testcluster.NewTestCluster()
      github.com/cockroachdb/cockroach/pkg/testutils/testcluster/testcluster.go:329 +0xcec
  github.com/cockroachdb/cockroach/pkg/testutils/testcluster.StartTestCluster()
      github.com/cockroachdb/cockroach/pkg/testutils/testcluster/testcluster.go:232 +0x7d
  github.com/cockroachdb/cockroach/pkg/ccl/streamingccl/replicationtestutils.CreateTenantStreamingClusters.func1()
      github.com/cockroachdb/cockroach/pkg/ccl/streamingccl/replicationtestutils/testutils.go:260 +0xd5
  github.com/cockroachdb/cockroach/pkg/ccl/streamingccl/replicationtestutils.CreateTenantStreamingClusters.func2()
      github.com/cockroachdb/cockroach/pkg/ccl/streamingccl/replicationtestutils/testutils.go:277 +0x134
  github.com/cockroachdb/cockroach/pkg/util/ctxgroup.Group.GoCtx.func1()
      github.com/cockroachdb/cockroach/pkg/util/ctxgroup/ctxgroup.go:168 +0x4c
  golang.org/x/sync/errgroup.(*Group).Go.func1()
      golang.org/x/sync/errgroup/external/org_golang_x_sync/errgroup/errgroup.go:75 +0x86

Goroutine 42 (running) created at:
  golang.org/x/sync/errgroup.(*Group).Go()
      golang.org/x/sync/errgroup/external/org_golang_x_sync/errgroup/errgroup.go:72 +0x12e
  github.com/cockroachdb/cockroach/pkg/util/ctxgroup.Group.GoCtx()
      github.com/cockroachdb/cockroach/pkg/util/ctxgroup/ctxgroup.go:167 +0x109
  github.com/cockroachdb/cockroach/pkg/ccl/streamingccl/replicationtestutils.CreateTenantStreamingClusters()
      github.com/cockroachdb/cockroach/pkg/ccl/streamingccl/replicationtestutils/testutils.go:283 +0xd64
  github.com/cockroachdb/cockroach/pkg/ccl/streamingccl/streamingest.TestAlterTenantCompleteToTime()
      github.com/cockroachdb/cockroach/pkg/ccl/streamingccl/streamingest/alter_replication_job_test.go:37 +0x19a
  testing.tRunner()
      GOROOT/src/testing/testing.go:1446 +0x216
  testing.(*T).Run.func1()
      GOROOT/src/testing/testing.go:1493 +0x47

Goroutine 41 (running) created at:
  golang.org/x/sync/errgroup.(*Group).Go()
      golang.org/x/sync/errgroup/external/org_golang_x_sync/errgroup/errgroup.go:72 +0x12e
  github.com/cockroachdb/cockroach/pkg/util/ctxgroup.Group.GoCtx()
      github.com/cockroachdb/cockroach/pkg/util/ctxgroup/ctxgroup.go:167 +0x109
  github.com/cockroachdb/cockroach/pkg/ccl/streamingccl/replicationtestutils.CreateTenantStreamingClusters()
      github.com/cockroachdb/cockroach/pkg/ccl/streamingccl/replicationtestutils/testutils.go:275 +0xa77
  github.com/cockroachdb/cockroach/pkg/ccl/streamingccl/streamingest.TestAlterTenantCompleteToTime()
      github.com/cockroachdb/cockroach/pkg/ccl/streamingccl/streamingest/alter_replication_job_test.go:37 +0x19a
  testing.tRunner()
      GOROOT/src/testing/testing.go:1446 +0x216
  testing.(*T).Run.func1()
      GOROOT/src/testing/testing.go:1493 +0x47
==================

Jira issue: CRDB-28743

@yuzefovich yuzefovich added the C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. label Jun 14, 2023
@lidorcarmel
Copy link
Contributor

introduced (by me) in #102476

@lidorcarmel
Copy link
Contributor

and also because of #104383
:)
but please feel free to assign to me if you want.. running 2 clusters in parallel breaks some things.

@THardy98
Copy link

I'll take a look :)

@THardy98
Copy link

THardy98 commented Jul 4, 2023

Fix: #105227

@THardy98 THardy98 closed this as completed Jul 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.
Projects
None yet
Development

No branches or pull requests

3 participants