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

Test: DATARACE on TestReception Jaeger receiver #287

Closed
pjanotti opened this issue Aug 23, 2019 · 4 comments
Closed

Test: DATARACE on TestReception Jaeger receiver #287

pjanotti opened this issue Aug 23, 2019 · 4 comments

Comments

@pjanotti
Copy link
Contributor

From PR #286

==================
WARNING: DATA RACE
Write at 0x00c0003c41f8 by goroutine 84:
  sync.(*WaitGroup).Wait()
      /home/travis/.gimme/versions/go1.12.9.linux.amd64/src/internal/race/race.go:41 +0xef
  github.com/jaegertracing/jaeger/cmd/agent/app/processors.(*ThriftProcessor).Stop()
      /home/travis/gopath/pkg/mod/github.com/jaegertracing/jaeger@v1.9.0/cmd/agent/app/processors/thrift_processor.go:102 +0x11d
Previous read at 0x00c0003c41f8 by goroutine 53:
  sync.(*WaitGroup).Add()
      /home/travis/.gimme/versions/go1.12.9.linux.amd64/src/internal/race/race.go:37 +0x169
  github.com/jaegertracing/jaeger/cmd/agent/app/processors.(*ThriftProcessor).Serve()
      /home/travis/gopath/pkg/mod/github.com/jaegertracing/jaeger@v1.9.0/cmd/agent/app/processors/thrift_processor.go:84 +0x62
Goroutine 84 (running) created at:
  github.com/jaegertracing/jaeger/cmd/agent/app.(*Agent).Stop()
      /home/travis/gopath/pkg/mod/github.com/jaegertracing/jaeger@v1.9.0/cmd/agent/app/agent.go:88 +0xa1
  github.com/open-telemetry/opentelemetry-service/receiver/jaegerreceiver.(*jReceiver).stopTraceReceptionLocked.func1()
      /home/travis/gopath/src/github.com/open-telemetry/opentelemetry-service/receiver/jaegerreceiver/trace_receiver.go:221 +0x7f4
  sync.(*Once).Do()
      /home/travis/.gimme/versions/go1.12.9.linux.amd64/src/sync/once.go:44 +0xde
  github.com/open-telemetry/opentelemetry-service/receiver/jaegerreceiver.(*jReceiver).stopTraceReceptionLocked()
      /home/travis/gopath/src/github.com/open-telemetry/opentelemetry-service/receiver/jaegerreceiver/trace_receiver.go:217 +0xb8
  github.com/open-telemetry/opentelemetry-service/receiver/jaegerreceiver.(*jReceiver).StopTraceReception()
      /home/travis/gopath/src/github.com/open-telemetry/opentelemetry-service/receiver/jaegerreceiver/trace_receiver.go:212 +0x92
  github.com/open-telemetry/opentelemetry-service/receiver/jaegerreceiver.TestReception()
      /home/travis/gopath/src/github.com/open-telemetry/opentelemetry-service/receiver/jaegerreceiver/trace_receiver_test.go:91 +0xabf
  testing.tRunner()
      /home/travis/.gimme/versions/go1.12.9.linux.amd64/src/testing/testing.go:865 +0x163
Goroutine 53 (running) created at:
  github.com/jaegertracing/jaeger/cmd/agent/app.(*Agent).Run()
      /home/travis/gopath/pkg/mod/github.com/jaegertracing/jaeger@v1.9.0/cmd/agent/app/agent.go:75 +0x2bf
  github.com/open-telemetry/opentelemetry-service/receiver/jaegerreceiver.(*jReceiver).startAgent()
      /home/travis/gopath/src/github.com/open-telemetry/opentelemetry-service/receiver/jaegerreceiver/trace_receiver.go:372 +0x404
  github.com/open-telemetry/opentelemetry-service/receiver/jaegerreceiver.(*jReceiver).StartTraceReception.func1()
      /home/travis/gopath/src/github.com/open-telemetry/opentelemetry-service/receiver/jaegerreceiver/trace_receiver.go:193 +0x96
  sync.(*Once).Do()
      /home/travis/.gimme/versions/go1.12.9.linux.amd64/src/sync/once.go:44 +0xde
  github.com/open-telemetry/opentelemetry-service/receiver/jaegerreceiver.(*jReceiver).StartTraceReception()
      /home/travis/gopath/src/github.com/open-telemetry/opentelemetry-service/receiver/jaegerreceiver/trace_receiver.go:192 +0x111
  github.com/open-telemetry/opentelemetry-service/receiver/jaegerreceiver.TestReception()
      /home/travis/gopath/src/github.com/open-telemetry/opentelemetry-service/receiver/jaegerreceiver/trace_receiver_test.go:56 +0x28f
  testing.tRunner()
      /home/travis/.gimme/versions/go1.12.9.linux.amd64/src/testing/testing.go:865 +0x163
==================
--- FAIL: TestReception (0.01s)
    trace_receiver_test.go:53: Starting
    trace_receiver_test.go:59: StartTraceReception
    testing.go:809: race detected during execution of test
FAIL
@tigrannajaryan
Copy link
Member

I think this is the same as #43
Looks like the workaround I did is not good enough. The data race is fixed in Jaeger (I submitted the patch earlier), we need to bump our Jaeger dependency to the latest (but it is not trivial as explained in the linked issue).

@tigrannajaryan
Copy link
Member

One possibility is to increase the pause in the workaround code to reduce the chance of the failure even more (obviously it is not a proper fix, but may be the reasonable thing to do if updating Jaeger dependency is too costly).

@pjanotti
Copy link
Contributor Author

We should look into upgrading Jaeger: we removed some dependencies and now it may not be so hard.

@pjanotti
Copy link
Contributor Author

pjanotti commented Feb 3, 2020

This was fixed quite some time back, closing it.

@pjanotti pjanotti closed this as completed Feb 3, 2020
hughesjj pushed a commit to hughesjj/opentelemetry-collector that referenced this issue Apr 27, 2023
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

No branches or pull requests

2 participants