Skip to content

Data race in IMC dispatcher #3960

@vaikas

Description

@vaikas

Describe the bug
From:
https://prow.knative.dev/view/gcs/knative-prow/logs/ci-knative-eventing-continuous/1299329237383122944

==================
WARNING: DATA RACE
Read at 0x00c0005e8ee3 by goroutine 55:
  testing.(*common).logDepth()
      /root/.gvm/gos/go1.14.6/src/testing/testing.go:710 +0xa7
  testing.(*common).log()
      /root/.gvm/gos/go1.14.6/src/testing/testing.go:703 +0x8f
  testing.(*common).Logf()
      /root/.gvm/gos/go1.14.6/src/testing/testing.go:749 +0x21
  testing.(*T).Logf()
      <autogenerated>:1 +0x75
  go.uber.org/zap/zaptest.testingWriter.Write()
      /home/prow/go/src/knative.dev/eventing/vendor/go.uber.org/zap/zaptest/logger.go:130 +0x11f
  go.uber.org/zap/zaptest.(*testingWriter).Write()
      <autogenerated>:1 +0xa9
  go.uber.org/zap/zapcore.(*ioCore).Write()
      /home/prow/go/src/knative.dev/eventing/vendor/go.uber.org/zap/zapcore/core.go:90 +0x1c3
  go.uber.org/zap/zapcore.(*CheckedEntry).Write()
      /home/prow/go/src/knative.dev/eventing/vendor/go.uber.org/zap/zapcore/entry.go:216 +0x1e7
  go.uber.org/zap.(*SugaredLogger).log()
      /home/prow/go/src/knative.dev/eventing/vendor/go.uber.org/zap/sugar.go:234 +0x141
  go.uber.org/zap.(*SugaredLogger).Errorw()
      /home/prow/go/src/knative.dev/eventing/vendor/go.uber.org/zap/sugar.go:191 +0x27a
  knative.dev/eventing/pkg/reconciler/inmemorychannel/dispatcher.NewController.func3()
      /home/prow/go/src/knative.dev/eventing/pkg/reconciler/inmemorychannel/dispatcher/controller.go:110 +0xf3

Previous write at 0x00c0005e8ee3 by goroutine 46:
  testing.tRunner.func1()
      /root/.gvm/gos/go1.14.6/src/testing/testing.go:1025 +0x467
  testing.tRunner()
      /root/.gvm/gos/go1.14.6/src/testing/testing.go:1043 +0x20d

Goroutine 55 (running) created at:
  knative.dev/eventing/pkg/reconciler/inmemorychannel/dispatcher.NewController()
      /home/prow/go/src/knative.dev/eventing/pkg/reconciler/inmemorychannel/dispatcher/controller.go:107 +0x1408
  knative.dev/eventing/pkg/reconciler/inmemorychannel/dispatcher.TestNewInNamespace()
      /home/prow/go/src/knative.dev/eventing/pkg/reconciler/inmemorychannel/dispatcher/controller_test.go:47 +0x111
  testing.tRunner()
      /root/.gvm/gos/go1.14.6/src/testing/testing.go:1039 +0x1eb

Goroutine 46 (running) created at:
  testing.(*T).Run()
      /root/.gvm/gos/go1.14.6/src/testing/testing.go:1090 +0x700
  testing.runTests.func1()
      /root/.gvm/gos/go1.14.6/src/testing/testing.go:1334 +0xa6
  testing.tRunner()
      /root/.gvm/gos/go1.14.6/src/testing/testing.go:1039 +0x1eb
  testing.runTests()
      /root/.gvm/gos/go1.14.6/src/testing/testing.go:1332 +0x527
  testing.(*M).Run()
      /root/.gvm/gos/go1.14.6/src/testing/testing.go:1249 +0x43f
  main.main()
      _testmain.go:48 +0x223
==================

Expected behavior
Not that

To Reproduce
Steps to reproduce the behavior.

Knative release version

Additional context
Add any other context about the problem here such as proposed priority

Metadata

Metadata

Labels

area/channelsarea/test-and-releaseTest infrastructure, tests or releasekind/bugCategorizes issue or PR as related to a bug.priority/critical-urgentHighest priority. Must be actively worked on as someone's top priority right now.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions