Description
When performing a lcb_diag call, the SDK occasionally will segfault. The underlying cause for this is not entirely clear as it is one of the last calls we perform, and having the call execute alone does not reproduce this issue. I have included a stack trace below.
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x20)
|
...
|
(lldb) f 0
|
frame #0: 0x00000001052b06ce couchbase_impl.node`endpointToJSON(now=86485188759, node=0x00007ffeefbfdce0, host=<unavailable>, info=0x0000000102a179c0) at manager.cc:280 [opt]
|
277 snprintf(id, sizeof(id), "%p", (void *)info->sock);
|
278 endpoint["id"] = id;
|
279 endpoint["remote"] = get_hehost(host);
|
-> 280 endpoint["local"] = info->sock->info->ep_local;
|
281 endpoint["last_activity_us"] = (Json::Value::UInt64)(now - info->sock->atime);
|
282 endpoint["status"] = "connected";
|
283 node[lcbio_svcstr(info->sock->service)].append(endpoint);
|
(lldb) f 1
|
frame #1: 0x00000001052b057f couchbase_impl.node`lcb::io::Pool::toJSON(this=<unavailable>, now=86485188759, node=<unavailable>) at manager.cc:298 [opt]
|
295 }
|
296 LCB_LIST_FOR(llcur, (lcb_list_t *)&host->ll_pending)
|
297 {
|
-> 298 endpointToJSON(now, node, host, PoolConnInfo::from_llnode(llcur));
|
299 }
|
300 }
|
301 }
|
(lldb) f 2
|
frame #2: 0x00000001052d54ab couchbase_impl.node`::lcb_diag(instance=<unavailable>, cookie=0x0000000102d54470, cmd=0x0000000102d2e020) at ping.cc:694 [opt]
|
691 }
|
692 }
|
693 instance->memd_sockpool->toJSON(now, root);
|
-> 694 instance->http_sockpool->toJSON(now, root);
|
695 {
|
696 Json::Value cur;
|
697 lcb_ASPEND_SETTYPE::iterator it;
|