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

[exporter/logicmonitorexporter] Data race detected in unit test #31110

Closed
crobert-1 opened this issue Feb 7, 2024 · 3 comments
Closed

[exporter/logicmonitorexporter] Data race detected in unit test #31110

crobert-1 opened this issue Feb 7, 2024 · 3 comments
Labels
bug Something isn't working ci-cd CI, CD, testing, build issues exporter/logicmonitor

Comments

@crobert-1
Copy link
Member

Component(s)

exporter/logicmonitor

Describe the issue you're reporting

CI/CD run: https://github.com/open-telemetry/opentelemetry-collector-contrib/actions/runs/7817722636/job/21326471498

Failing test: TestPushLogData/Send_Log_data

Failure output:

Running target 'test' in module 'exporter/logicmonitorexporter' as part of group 'exporter-0'
make -C exporter/logicmonitorexporter test
make[2]: Entering directory '/home/runner/work/opentelemetry-collector-contrib/opentelemetry-collector-contrib/exporter/logicmonitorexporter'
go test -race -timeout [300](https://github.com/open-telemetry/opentelemetry-collector-contrib/actions/runs/7817722636/job/21326471498#step:8:301)s -parallel 4 --tags="" ./...
?   	github.com/open-telemetry/opentelemetry-collector-contrib/exporter/logicmonitorexporter/internal/metadata	[no test files]
?   	github.com/open-telemetry/opentelemetry-collector-contrib/exporter/logicmonitorexporter/internal/testutil	[no test files]
==================
WARNING: DATA RACE
Write at 0x00c0003a08b8 by goroutine 75:
  go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp.(*bodyWrapper).Read()
      /home/runner/go/pkg/mod/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp@v0.48.0/wrap.go:40 +0xa4
  io.discard.ReadFrom()
      /opt/hostedtoolcache/go/1.21.6/x64/src/io/io.go:658 +0x91
  io.(*discard).ReadFrom()
      <autogenerated>:1 +0x4c
  io.copyBuffer()
      /opt/hostedtoolcache/go/1.21.6/x64/src/io/io.go:416 +0x1be
  io.Copy()
      /opt/hostedtoolcache/go/1.21.6/x64/src/io/io.go:389 +0x5c
  net/http.(*transferWriter).doBodyCopy()
      /opt/hostedtoolcache/go/1.21.6/x64/src/net/http/transfer.go:412 +0x38
  net/http.(*transferWriter).writeBody()
      /opt/hostedtoolcache/go/1.21.6/x64/src/net/http/transfer.go:375 +0x82f
  net/http.(*Request).write()
      /opt/hostedtoolcache/go/1.21.6/x64/src/net/http/request.go:738 +0x1393
  net/http.(*persistConn).writeLoop()
      /opt/hostedtoolcache/go/1.21.6/x64/src/net/http/transport.go:2424 +0x372
  net/http.(*Transport).dialConn.func6()
      /opt/hostedtoolcache/go/1.21.6/x64/src/net/http/transport.go:1777 +0x33

Previous read at 0x00c0003a08b8 by goroutine 69:
  go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp.(*Transport).RoundTrip()
      /home/runner/go/pkg/mod/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp@v0.48.0/transport.go:185 +0xec8
  net/http.send()
      /opt/hostedtoolcache/go/1.21.6/x64/src/net/http/client.go:260 +0x9c6
  net/http.(*Client).send()
      /opt/hostedtoolcache/go/1.21.6/x64/src/net/http/client.go:181 +0x14e
  net/http.(*Client).do()
      /opt/hostedtoolcache/go/1.21.6/x64/src/net/http/client.go:724 +0x11a8
  net/http.(*Client).Do()
      /opt/hostedtoolcache/go/1.21.6/x64/src/net/http/client.go:590 +0xbe4
  github.com/logicmonitor/lm-data-sdk-go/internal/client.DoRequest()
      /home/runner/go/pkg/mod/github.com/logicmonitor/lm-data-sdk-go@v1.3.0/internal/client/client.go:72 +0xbcf
  github.com/logicmonitor/lm-data-sdk-go/api/logs.(*LMLogIngest).export()
      /home/runner/go/pkg/mod/github.com/logicmonitor/lm-data-sdk-go@v1.3.0/api/logs/logs.go:325 +0x405
  github.com/logicmonitor/lm-data-sdk-go/api/logs.(*LMLogIngest).SendLogs()
      /home/runner/go/pkg/mod/github.com/logicmonitor/lm-data-sdk-go@v1.3.0/api/logs/logs.go:157 +0x16a
  github.com/open-telemetry/opentelemetry-collector-contrib/exporter/logicmonitorexporter/internal/logs.(*Sender).SendLogs()
      /home/runner/work/opentelemetry-collector-contrib/opentelemetry-collector-contrib/exporter/logicmonitorexporter/internal/logs/sender.go:37 +0xae
  github.com/open-telemetry/opentelemetry-collector-contrib/exporter/logicmonitorexporter.(*logExporter).PushLogData()
      /home/runner/work/opentelemetry-collector-contrib/opentelemetry-collector-contrib/exporter/logicmonitorexporter/logs_exporter.go:95 +0x18e
  github.com/open-telemetry/opentelemetry-collector-contrib/exporter/logicmonitorexporter.TestPushLogData.func2()
      /home/runner/work/opentelemetry-collector-contrib/opentelemetry-collector-contrib/exporter/logicmonitorexporter/logs_exporter_test.go:113 +0x[304](https://github.com/open-telemetry/opentelemetry-collector-contrib/actions/runs/7817722636/job/21326471498#step:8:305)
  testing.tRunner()
      /opt/hostedtoolcache/go/1.21.6/x64/src/testing/testing.go:1595 +0x261
  testing.(*T).Run.func1()
      /opt/hostedtoolcache/go/1.21.6/x64/src/testing/testing.go:1648 +0x44

Goroutine 75 (running) created at:
  net/http.(*Transport).dialConn()
      /opt/hostedtoolcache/go/1.21.6/x64/src/net/http/transport.go:1777 +0x266a
  net/http.(*Transport).dialConnFor()
      /opt/hostedtoolcache/go/1.21.6/x64/src/net/http/transport.go:1467 +0x129
  net/http.(*Transport).queueForDial.func1()
      /opt/hostedtoolcache/go/1.21.6/x64/src/net/http/transport.go:1436 +0x44

Goroutine 69 (running) created at:
  testing.(*T).Run()
      /opt/hostedtoolcache/go/1.21.6/x64/src/testing/testing.go:1648 +0x845
  github.com/open-telemetry/opentelemetry-collector-contrib/exporter/logicmonitorexporter.TestPushLogData()
      /home/runner/work/opentelemetry-collector-contrib/opentelemetry-collector-contrib/exporter/logicmonitorexporter/logs_exporter_test.go:108 +0x424
  testing.tRunner()
      /opt/hostedtoolcache/go/1.21.6/x64/src/testing/testing.go:1595 +0x261
  testing.(*T).Run.func1()
      /opt/hostedtoolcache/go/1.21.6/x64/src/testing/testing.go:1648 +0x44
==================
--- FAIL: TestPushLogData (0.01s)
    --- FAIL: TestPushLogData/Send_Log_data (0.01s)
        testing.go:1465: race detected during execution of test
    testing.go:1465: race detected during execution of test
FAIL
FAIL	github.com/open-telemetry/opentelemetry-collector-contrib/exporter/logicmonitorexporter	0.110s
ok  	github.com/open-telemetry/opentelemetry-collector-contrib/exporter/logicmonitorexporter/internal/logs	1.039s
ok  	github.com/open-telemetry/opentelemetry-collector-contrib/exporter/logicmonitorexporter/internal/traces	1.026s
FAIL
@crobert-1 crobert-1 added bug Something isn't working ci-cd CI, CD, testing, build issues needs triage New item requiring triage labels Feb 7, 2024
Copy link
Contributor

github-actions bot commented Feb 7, 2024

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@crobert-1
Copy link
Member Author

This looks like an issue with underlying opentelemetry-go-contrib repo, removing needs triage but leaving open as this will likely continue failing until the dependency is fixed.

@crobert-1 crobert-1 removed the needs triage New item requiring triage label Feb 7, 2024
@crobert-1
Copy link
Member Author

Fixed by #31141

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ci-cd CI, CD, testing, build issues exporter/logicmonitor
Projects
None yet
Development

No branches or pull requests

1 participant