I have Couchbase server (version 6.0.4-3082-enterprise) deployed on our own AWS. We have a cluster with 2 nodes.
We wanted to update our Python SDK as the older one (3.2.7) doesn’t build on newer Ubuntu versions and thus constraining us for connecting through our local machines.
I tried to update to version > 4.1 for which a wheel is available (tried 4.10, 4.3.3 and 4.3.5). Cluster.connect
passed but then the different requests timeout locally. After digging around I saw the SDK doctor and added alternate addresses - SDK Not Connected: Diagnose Using SDK Doctor & Couchbase so that the different services are discovered from outside as well.
Then the problem is that Cluster.connect
fails with Segmentation fault (core dumped).
After I run it with gdb
it appears that it fails when it parses the response json from the connect
call. Here is the stacktrace:
#0 0x00007ffff568df6f in std::get<11ul, tao::json::uninitialized_t, tao::json::null_t, bool, long, unsigned long, double, std::__cxx11::basic_string<char, std::char_traits, std::allocator >, std::basic_string_view<char, std::char_traits >, std::vector<std::byte, std::allocatorstd::byte >, tao::span<std::byte const, 18446744073709551615ul>, std::vector<tao::json::basic_valuetao::json::traits, std::allocator<tao::json::basic_valuetao::json::traits > >, std::map<std::__cxx11::basic_string<char, std::char_traits, std::allocator >, tao::json::basic_valuetao::json::traits, std::less, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits, std::allocator > const, tao::json::basic_valuetao::json::traits > > >, tao::json::basic_valuetao::json::traits const*, tao::json::internal::opaque_ptr_t> (__v=…)
at /usr/local/gcc-9.3.0/include/c++/9.3.0/variant:1609
#1 std::get<std::map<std::__cxx11::basic_string<char, std::char_traits, std::allocator >, tao::json::basic_valuetao::json::traits, std::less, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits, std::allocator > const, tao::json::basic_valuetao::json::traits > > >, tao::json::uninitialized_t, tao::json::null_t, bool, long, unsigned long, double, std::__cxx11::basic_string<char, std::char_traits, std::allocator >, std::basic_string_view<char, std::char_traits >, std::vector<std::byte, std::allocatorstd::byte >, tao::span<std::byte const, 18446744073709551615ul>, std::vector<tao::json::basic_valuetao::json::traits, std::allocator<tao::json::basic_valuetao::json::traits > >, std::map<std::__cxx11::basic_string<char, std::char_traits, std::allocator >, tao::json::basic_valuetao::json::traits, std::less, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits, std::allocator > const, tao::json::basic_valuetao::json::traits > > >, tao::json::basic_valuetao::json::traits const*, tao::json::internal::opaque_ptr_t> (__v=…) at /usr/local/gcc-9.3.0/include/c++/9.3.0/variant:1080
#2 tao::json::basic_valuetao::json::traits::get_objectabi:cxx11 const & (this=0x0)
at /home/ec2-user/workspace/python/sdk/python-manylinux-wheel-pipeline/couchbase-python-client/deps/couchbase-cxx-client/third_party/json/include/tao/json/basic_value.hpp:373
#3 tao::json::basic_valuetao::json::traits::find<char const (&) [3]> (key=…, this=0x0)
at /home/ec2-user/workspace/python/sdk/python-manylinux-wheel-pipeline/couchbase-python-client/deps/couchbase-cxx-client/third_party/json/include/tao/json/basic_value.hpp:674
#4 tao::json::basic_valuetao::json::traits::optional<unsigned short, char [3]> (key=…, this=0x0)
at /home/ec2-user/workspace/python/sdk/python-manylinux-wheel-pipeline/couchbase-python-client/deps/couchbase-cxx-client/third_party/json/include/tao/json/basic_value.hpp:872
#5 tao::json::traits<couchbase::core::topology::configuration, void>::astao::json::traits (v=…)
at /home/ec2-user/workspace/python/sdk/python-manylinux-wheel-pipeline/couchbase-python-client/deps/couchbase-cxx-client/core/topology/configuration_json.hxx:80
#6 0x00007ffff5688456 in tao::json::basic_valuetao::json::traits::ascouchbase::core::topology::configuration (this=0x7ffff47fedb0)
at /home/ec2-user/workspace/python/sdk/python-manylinux-wheel-pipeline/couchbase-python-client/deps/couchbase-cxx-client/third_party/json/include/tao/json/basic_value.hpp:779
#7 couchbase::core::protocol::parse_config (input=…, endpoint_address=…, endpoint_port=11210)
at /home/ec2-user/workspace/python/sdk/python-manylinux-wheel-pipeline/couchbase-python-client/deps/couchbase-cxx-client/core/protocol/cmd_get_cluster_config.cxx:31
#8 0x00007ffff5688632 in couchbase::core::protocol::get_cluster_config_response_body::parse (this=this@entry=0x7ffff47ff5a0, status=, header=…,
framing_extras_size=, key_size=, extras_size=, body=…, info=…)
at /home/ec2-user/workspace/python/sdk/python-manylinux-wheel-pipeline/couchbase-python-client/deps/couchbase-cxx-client/core/protocol/cmd_get_cluster_config.cxx:77
#9 0x00007ffff529bcf8 in couchbase::core::protocol::client_responsecouchbase::core::protocol::get_cluster_config_response_body::parse_body (this=0x7ffff47ff5a0)
at /home/ec2-user/workspace/python/sdk/python-manylinux-wheel-pipeline/couchbase-python-client/deps/couchbase-cxx-client/core/protocol/client_response.hxx:172
#10 couchbase::core::protocol::client_responsecouchbase::core::protocol::get_cluster_config_response_body::client_response (this=0x7ffff47ff5a0, msg=…, info=…)
at /home/ec2-user/workspace/python/sdk/python-manylinux-wheel-pipeline/couchbase-python-client/deps/couchbase-cxx-client/core/protocol/client_response.hxx:84
#11 0x00007ffff52c3a4d in couchbase::core::io::mcbp_session::bootstrap_handler::handle (this=0x7fffec0023f0, msg=…)
at /home/ec2-user/workspace/python/sdk/python-manylinux-wheel-pipeline/couchbase-python-client/deps/couchbase-cxx-client/core/io/mcbp_session.hxx:341
#12 0x00007ffff52a411b in couchbase::core::io::mcbp_session::do_read()::{lambda(std::error_code, unsigned long)#1}::operator()(std::error_code, unsigned long) const (
__closure=0x7fffec012770, ec=…, bytes_transferred=)
at /home/ec2-user/workspace/python/sdk/python-manylinux-wheel-pipeline/couchbase-python-client/deps/couchbase-cxx-client/core/io/mcbp_session.hxx:1261
#13 0x00007ffff526f897 in std::function<void (std::error_code, unsigned long)>::operator()(std::error_code, unsigned long) const (__args#1=, __args#0=…,
this=0x7ffff47ff960) at /usr/local/gcc-9.3.0/include/c++/9.3.0/bits/std_function.h:688
#14 asio::detail::binder2<std::function<void (std::error_code, unsigned long)>, std::error_code, unsigned long>::operator()() (this=0x7ffff47ff960)
at /home/ec2-user/workspace/python/sdk/python-manylinux-wheel-pipeline/couchbase-python-client/deps/couchbase-cxx-client/third_party/asio/asio/include/asio/detail/bind_handler.hpp:288