-
Notifications
You must be signed in to change notification settings - Fork 89
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
Shutdown deadlock #1218
Comments
Two things:
|
MrAlias
added a commit
to MrAlias/opentelemetry-go-instrumentation
that referenced
this issue
Oct 25, 2024
Fix open-telemetry#1218 Close probes in a different goroutine than the one draining their event channel.
MrAlias
added a commit
to MrAlias/opentelemetry-go-instrumentation
that referenced
this issue
Oct 25, 2024
Fix open-telemetry#1218 Close probes in a different goroutine than the one draining their event channel.
This should be addressed in #1219 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
When the
Instrumentation
is stopped, it will hang "Waiting for probes to stop...".(additional logging added)
Environment
To Reproduce
Steps to reproduce the behavior:
autosdk
example a few times.Expected behavior
Clean shutdown
Additional context
The probes all send on a chan from the
Manager
:opentelemetry-go-instrumentation/internal/pkg/instrumentation/probe/probe.go
Line 244 in 098f594
opentelemetry-go-instrumentation/internal/pkg/instrumentation/manager.go
Line 227 in 098f594
When the manager is stopped it stops all the probes, waits for them to return, then closes that chan:
opentelemetry-go-instrumentation/internal/pkg/instrumentation/manager.go
Lines 283 to 294 in 098f594
The issue is, the
Probe
may still be trying to write to theeventCh
. Since there is no reader of this chan while theManager
is shutting down, that can result in a full chan and the probe indefinitely trying to make the write. This results in theManager
indefinitely waiting for the probe's toRun
function to return and the gouroutine to decrement itsWaitGroup
:opentelemetry-go-instrumentation/internal/pkg/instrumentation/manager.go
Line 289 in 098f594
The text was updated successfully, but these errors were encountered: