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

May crash when using OTLP Http exporter in async mode #1759

Closed
owent opened this issue Nov 10, 2022 · 0 comments · Fixed by #1760
Closed

May crash when using OTLP Http exporter in async mode #1759

owent opened this issue Nov 10, 2022 · 0 comments · Fixed by #1760
Labels
bug Something isn't working

Comments

@owent
Copy link
Member

owent commented Nov 10, 2022

Describe your environment

OS: Linux
Compiler: GCC 8

Additional context

We should also lock session_manager_lock_ when create and add new session into OtlpHttpClient.

#3  std::unordered_map<opentelemetry_ecosystem::v1::ext::http::client::Session const*, opentelemetry_ecosystem::v1::exporter::otlp::OtlpHttpClient::HttpSessionData, std::hash<opentelemetry_ecosystem::v1::ext::http::client::Session const*>, std::equal_to<opentelemetry_ecosystem::v1::ext::http::client::Session const*>, std::allocator<std::pair<opentelemetry_ecosystem::v1::ext::http::client::Session const* const, opentelemetry_ecosystem::v1::exporter::otlp::OtlpHttpClient::HttpSessionData> > >::find (__x=<optimized out>, this=0x7fe009315930)
    at /usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/bits/unordered_map.h:921
#4  opentelemetry_ecosystem::v1::exporter::otlp::OtlpHttpClient::ReleaseSession (this=0x7fe009315880, session=...)
    at external/opentelemetry-cpp-ecosystem/exporters/otlp/src/otlp_http_client.cc:729
#5  0x0000000000f762a5 in opentelemetry_ecosystem::v1::exporter::otlp::(anonymous namespace)::ResponseHandler::Unbind (result=opentelemetry::v1::sdk::common::ExportResult::kSuccess, 
    this=0x7fddc8e25820) at external/opentelemetry-cpp-ecosystem/exporters/otlp/src/otlp_http_client.cc:300
#6  opentelemetry_ecosystem::v1::exporter::otlp::(anonymous namespace)::ResponseHandler::OnResponse (this=0x7fddc8e25820, response=...)
    at external/opentelemetry-cpp-ecosystem/exporters/otlp/src/otlp_http_client.cc:131
#7  0x0000000000f81057 in opentelemetry_ecosystem::v1::ext::http::client::curl::Session::<lambda(opentelemetry_ecosystem::v1::ext::http::client::curl::HttpOperation&)>::operator() (
    operation=..., __closure=0x7fe0077476a0) at /usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/bits/shared_ptr_base.h:1018
#8  std::_Function_handler<void (opentelemetry_ecosystem::v1::ext::http::client::curl::HttpOperation&), opentelemetry_ecosystem::v1::ext::http::client::curl::Session::SendRequest(std::shared_ptr<opentelemetry::v1::ext::http::client::EventHandler>)::{lambda(opentelemetry_ecosystem::v1::ext::http::client::curl::HttpOperation&)#1}>::_M_invoke(std::_Any_data const&, opentelemetry_ecosystem::v1::ext::http::client::curl::HttpOperation&) () at /usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/bits/std_function.h:297
#9  0x0000000000f884e6 in std::function<void (opentelemetry_ecosystem::v1::ext::http::client::curl::HttpOperation&)>::operator()(opentelemetry_ecosystem::v1::ext::http::client::curl::HttpOperation&) const (__args#0=..., this=0x7fddc8863260) at /usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/bits/std_function.h:682
#10 opentelemetry_ecosystem::v1::ext::http::client::curl::HttpOperation::Cleanup() () at external/opentelemetry-cpp-ecosystem/ext/src/http/client/curl/http_operation_curl.cc:300
#11 0x0000000000f88c92 in opentelemetry_ecosystem::v1::ext::http::client::curl::HttpOperation::PerformCurlMessage(CURLcode) ()
    at external/opentelemetry-cpp-ecosystem/ext/src/http/client/curl/http_operation_curl.cc:551
#12 0x0000000000f82e4c in opentelemetry_ecosystem::v1::ext::http::client::curl::HttpClient::<lambda(opentelemetry_ecosystem::v1::ext::http::client::curl::HttpClient*)>::operator() (
    __closure=<optimized out>, self=0x7fe0092d3210) at /usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/bits/unique_ptr.h:337
#13 std::__invoke_impl<void, opentelemetry_ecosystem::v1::ext::http::client::curl::HttpClient::MaybeSpawnBackgroundThread()::<lambda(opentelemetry_ecosystem::v1::ext::http::client::curl::HttpClient*)>, opentelemetry_ecosystem::v1::ext::http::client::curl::HttpClient*> (__f=<optimized out>) at /usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/bits/invoke.h:60
#14 std::__invoke<opentelemetry_ecosystem::v1::ext::http::client::curl::HttpClient::MaybeSpawnBackgroundThread()::<lambda(opentelemetry_ecosystem::v1::ext::http::client::curl::HttpClient*)>, opentelemetry_ecosystem::v1::ext::http::client::curl::HttpClient*> (__fn=<optimized out>) at /usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/bits/invoke.h:95
#15 std::thread::_Invoker<std::tuple<opentelemetry_ecosystem::v1::ext::http::client::curl::HttpClient::MaybeSpawnBackgroundThread()::<lambda(opentelemetry_ecosystem::v1::ext::http::client::curl::HttpClient*)>, opentelemetry_ecosystem::v1::ext::http::client::curl::HttpClient*> >::_M_invoke<0, 1> (this=<optimized out>)
    at /usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/thread:244
#16 std::thread::_Invoker<std::tuple<opentelemetry_ecosystem::v1::ext::http::client::curl::HttpClient::MaybeSpawnBackgroundThread()::<lambda(opentelemetry_ecosystem::v1::ext::http::client::curl::HttpClient*)>, opentelemetry_ecosystem::v1::ext::http::client::curl::HttpClient*> >::operator() (this=<optimized out>)
    at /usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/thread:253
#17 std::thread::_State_impl<std::thread::_Invoker<std::tuple<opentelemetry_ecosystem::v1::ext::http::client::curl::HttpClient::MaybeSpawnBackgroundThread()::{lambda(opentelemetry_ecosystem::v1::ext::http::client::curl::HttpClient*)#1}, opentelemetry_ecosystem::v1::ext::http::client::curl::HttpClient*> > >::_M_run() ()
    at /usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/thread:196
#18 0x00007fe02eca0b73 in ?? () from /lib64/libstdc++.so.6
#19 0x00007fe02caff2de in start_thread (arg=<optimized out>) at pthread_create.c:486
---Type <return> to continue, or q <return> to quit---
#20 0x00007fe02c618e83 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
@owent owent added the bug Something isn't working label Nov 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant