-
Notifications
You must be signed in to change notification settings - Fork 440
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
Otel threads spawn before "main" impact signal handling #2445
Comments
@nleclercq - Can you share the stack trace, to understand the origin of threads. Also if you have the self-contained reproduction. otlp_grpc_exporter doesn't spawn any threads as of now (until #2407 is merged). Batch span processor creates a worked thread during initialization, but it won't be before main unless you are creating a static/global instance of the processor. But all theory for now, will wait for more details from your side :) |
Damned! I actually have a singleton statically initialized as a global variable which makes a call to |
Ok. Switching to an explicit instantiation solves the problem. Thanks. I think we can close this issue. |
#2407 do not spawn any thread, it will reuse the background threads of gRPC, and they are also created during or after initialization. |
Its seems that otel-ccp spawn some threads even before the
main
function is executed.That's at least true when the instrumented application is linked against when the
otlp_grpc_exporter
.Placing a breakpoint at the entry of
main
, we clearly see that 3 gRPC threads are already there. I guess they are spawn by hook executed when the shared library is loaded.The problem is that this behavior as an impact on the signal handling mechanism implemented by our (shared) library. It, in fact, prevents our handler from behind called.
The text was updated successfully, but these errors were encountered: