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

Address data race in task processor test #5807

Conversation

taylanisikdemir
Copy link
Contributor

What changed?
History task processor failed in CI with a data race issue (see below). Addressing it by stopping the processor instances.

WARNING: DATA RACE
Read at 0x00c000e91563 by goroutine 380:
  ...
  go.uber.org/zap/zapcore.(*ioCore).Write()
      /home/runner/go/pkg/mod/go.uber.org/zap@v1.13.0/zapcore/core.go:90 +0x192
  go.uber.org/zap/zapcore.(*CheckedEntry).Write()
      /home/runner/go/pkg/mod/go.uber.org/zap@v1.13.0/zapcore/entry.go:216 +0x20f
  github.com/uber/cadence/common/log/loggerimpl.(*loggerImpl).Debug()
      /home/runner/work/cadence/cadence/common/log/loggerimpl/logger.go:132 +0xc4
  github.com/uber/cadence/common/task.(*weightedRoundRobinTaskSchedulerImpl).dispatcher()
      /home/runner/work/cadence/cadence/common/task/weighted_round_robin_task_scheduler.go:202 +0x19a
  github.com/uber/cadence/common/task.(*weightedRoundRobinTaskSchedulerImpl).Start.gowrap1()
      /home/runner/work/cadence/cadence/common/task/weighted_round_robin_task_scheduler.go:109 +0x33

Previous write at 0x00c000e91563 by goroutine 178:
  testing.tRunner.func1()
      /opt/hostedtoolcache/go/1.22.1/x64/src/testing/testing.go:1676 +0x8fa
  runtime.deferreturn()
      /opt/hostedtoolcache/go/1.22.1/x64/src/runtime/panic.go:602 +0x5d
  github.com/stretchr/testify/suite.Run.func1()
      /home/runner/go/pkg/mod/github.com/stretchr/testify@v1.8.3/suite/suite.go:187 +0x30f
  testing.tRunner()
      /opt/hostedtoolcache/go/1.22.1/x64/src/testing/testing.go:1689 +0x21e
  testing.(*T).Run.gowrap1()
      /opt/hostedtoolcache/go/1.22.1/x64/src/testing/testing.go:1742 +0x44

How did you test it?
go test -timeout 60s -run ^TestQueueTaskProcessorSuite$ github.com/uber/cadence/service/history/task -race -count=10 -v

@coveralls
Copy link

coveralls commented Mar 21, 2024

Pull Request Test Coverage Report for Build 018e62dc-7edf-4be0-89ed-022adf2abc15

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 97 unchanged lines in 15 files lost coverage.
  • Overall coverage decreased (-0.05%) to 65.368%

Files with Coverage Reduction New Missed Lines %
common/task/parallel_task_processor.go 2 93.06%
common/persistence/sql/sqlplugin/mysql/task.go 2 73.68%
service/matching/db.go 2 73.23%
service/history/task/transfer_active_task_executor.go 2 72.38%
service/history/execution/mutable_state_util.go 2 78.48%
common/persistence/sql/sqlplugin/mysql/db.go 2 79.49%
common/log/tag/tags.go 3 50.18%
service/history/task/fetcher.go 3 85.57%
service/history/task/transfer_standby_task_executor.go 4 87.01%
service/matching/taskReader.go 5 83.55%
Totals Coverage Status
Change from base Build 018e62d9-fbff-45f0-aae4-8ed26ea015dc: -0.05%
Covered Lines: 95553
Relevant Lines: 146178

💛 - Coveralls

@taylanisikdemir taylanisikdemir merged commit 857b007 into cadence-workflow:master Mar 21, 2024
18 checks passed
@taylanisikdemir taylanisikdemir deleted the taylan/task_processor_test_race branch March 21, 2024 21:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants