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

Occasional error in unittest TestExporterShutdown/testClientStopHonorsTimeout #2989

Closed
Petrie opened this issue Jul 3, 2022 · 1 comment
Closed
Labels
area:trace Part of OpenTelemetry tracing bug Something isn't working help wanted Extra attention is needed pkg:exporter:otlp Related to the OTLP exporter package

Comments

@Petrie
Copy link
Contributor

Petrie commented Jul 3, 2022

Description

This is an error in unittest TestExporterShutdown/testClientStopHonorsTimeout

A few days ago, I open a pr #2987 , try fix golangci-lint not working correctly. But the pr checks occur a error in unittest TestExporterShutdown/testClientStopHonorsTimeout for exporter grpc client Stop() function :exporters/otlp/otlptrace/otlptracegrpc/client.go#L130

I figure out in Stop(ctx context.Context) the select for <-ctx.Done() and acquired may reach at the same time. In select if acquired be exec first, The Stop(ctx context.Context) function may return nil . when Stop(ctx context.Context) function return nil, unittest TestExporterShutdown/testClientStopHonorsTimeout and TestExporterShutdown/testClientStopHonorsTimeout will failure.

Environment

  • OS: [Mac OS X]
  • Architecture: [ i386]
  • Go Version: [go version go1.17.11 darwin/amd64]
  • opentelemetry-go version: [main]

Steps To Reproduce

cd exporters/otlp/otlptrace/otlptracegrpc/
while true ; do go clean -testcache | go list \
| xargs go test -v -timeout 60s -race -run \
  TestExporterShutdown/testClientStopHonorsTimeout; sleep 0.5;  done;

Wait for 2~3 minutes, the error while occur.

image

 

Expected behavior

The all unittest pass

@Petrie Petrie added the bug Something isn't working label Jul 3, 2022
@MrAlias MrAlias added area:trace Part of OpenTelemetry tracing pkg:exporter:otlp Related to the OTLP exporter package help wanted Extra attention is needed labels Oct 27, 2022
@pellared pellared moved this to Needs triage in Go: Triage Nov 2, 2023
@pellared
Copy link
Member

pellared commented Nov 2, 2023

I think it was fixed or at least I have not seen it for a very long time.

@pellared pellared closed this as not planned Won't fix, can't repro, duplicate, stale Nov 2, 2023
@github-project-automation github-project-automation bot moved this from Needs triage to Closed in Go: Triage Nov 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:trace Part of OpenTelemetry tracing bug Something isn't working help wanted Extra attention is needed pkg:exporter:otlp Related to the OTLP exporter package
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants