-
I add traces with otlp http exporter in my project, but after a little time, all my worker threads are stuck. Stacks shows that a thread waiting for a response got the SimpleSpanProcessor's lock and another threads waiting for the lock. The stacks as follows: Thread 15 (Thread 0x7f29f4ff9700 (LWP 30)): Thread 16 (Thread 0x7f29effff700 (LWP 31)): I didn't configure exporter::otlp::OtlpHttpExporterOptions.timeout, so the value got from environment variables by default ( My question is,
For now I don't know the reason why the request didn't response (I compile the static libraries without -DCMAKE_BUILD_TYPE=Debug, there is no symbol tables found in gdb, I got nothing from stack frames), maybe I will consider to add the compile options. some details: |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
This is possible. Have seen sometimes timeout not working in our CI pipeline for the nonexistent endpoint. Is the collector endpoint not reachable in this case? Please update here if you find more information.
Yes, as the shared_ptr to the Span object is returned, it is fine to move it across, and close in a different thread. In the case of multiple threads, the
symbols should be generated if build using -DCMAKE_BUILD_TYPE=Debug |
Beta Was this translation helpful? Give feedback.
-
I replayed this situation:
It's because std::condition_variable.wait() will wait forever when notify_all() is called before wait(), but we can't make any assumption about the calling order between notify_all() and wait(). how to fix:
references: |
Beta Was this translation helpful? Give feedback.
-
Thanks, @wxl374 . Would you like to contribute to the fix, or else raise an issue to let someone pick this up? Thanks once again for investigating the issue. |
Beta Was this translation helpful? Give feedback.
I replayed this situation:
std::this_thread::sleep_for(std::chrono::seconds(1));
before function body in
opentelemetry-cpp/exporters/otlp/src/otlp_http_client.cc
Line 111 in 7b9132c
It's because std::condition_variable.wait() will wait forever when notify_all() is called before wait(), but we can't make any assumption about the calling order between notify_all() and wait().
how to fix:
opentelemetry-cpp/exporters/otlp/src/otlp_http_client.cc
Line 67 in 1cf2422