RedisCluster::set is causing seg fault

507 Views Asked by At

Getting seg fault as debugged using Gdb for the following snippet:

ConnectionOptions connection_options;
connection_options.host = "127.0.0.1";  // Required.
connection_options.port = 9001; // Optional. The default port is 6379.

ConnectionPoolOptions pool_options;
pool_options.size = 3;
RedisCluster cluster2(connection_options, pool_options);

cluster2.set("hello_key", "world_value");

The log from gdb:

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff58949ae in sw::redis::ConnectionPool::_fetch() ()
   from /home/workspace_git/third_party/redis-plus-plus/redis-plus-plus_install/lib/libredis++.so.1
(gdb) bt
0x00007ffff58949ae in sw::redis::ConnectionPool::_fetch() ()
   from /home/workspace_git/mongoose/third_party/redis-plus-plus/redis-plus-plus_install/lib/libredis++.so.1
(gdb) bt
#0  0x00007ffff58949ae in sw::redis::ConnectionPool::_fetch() ()
   from /home/workspace_git/third_party/redis-plus-plus/redis-plus-plus_install/lib/libredis++.so.1
#1  0x00007ffff5896e76 in sw::redis::ConnectionPool::fetch() ()
   from /home/workspace_git/third_party/redis-plus-plus/redis-plus-plus_install/lib/libredis++.so.1
#2  0x00007ffff58a20a1 in sw::redis::SafeConnection::SafeConnection(sw::redis::ConnectionPool&) ()
   from /home/workspace_git/third_party/redis-plus-plus/redis-plus-plus_install/lib/libredis++.so.1
#3  0x00007ffff58ac53a in std::unique_ptr<redisReply, sw::redis::ReplyDeleter> sw::redis::RedisCluster::_command<void (*)(sw::redis::Connection&, sw::redis::StringView const&, sw::redis::StringView const&, long long, sw::redis::UpdateType), sw::redis::StringView const&, sw::redis::StringView const&, long, sw::redis::UpdateType&>(void (*)(sw::redis::Connection&, sw::redis::StringView const&, sw::redis::StringView const&, long long, sw::redis::UpdateType), sw::redis::StringView const&, sw::redis::StringView const&, sw::redis::StringView const&, long&&, sw::redis::UpdateType&) ()
   from /home/workspace_git/third_party/redis-plus-plus/redis-plus-plus_install/lib/libredis++.so.1
#4  0x00007ffff58a9015 in sw::redis::RedisCluster::set(sw::redis::StringView const&, sw::redis::StringView const&, std::chrono::duration<long, std::ratio<1l, 1000l> > const&, sw::redis::UpdateType) () from /home/workspace_git/third_party/redis-plus-plus/redis-plus-plus_install/lib/libredis++.so.1

The version of hiredis: 1.0.2.

The version of redis-plus-plus: 1.3.3

Compiled with C++ 11 option.

Am I doing any basic mistake ?

0

There are 0 best solutions below