The code crashes at the line lcb_wait(a,LCB_WAIT_DEFAULT); (line no 56) after executing the ping_callback() function.
lcb_ping(a, fp, cmd);
lcb_wait(a,LCB_WAIT_DEFAULT); //Code crashes at this point in the above code snippet
GDB Console Output :
(gdb)
service: N1QL, status: 0, host: 10.132.72.69:11210, latency: 28780368 nanoseconds
service: N1QL, status: 0, host: 10.132.72.80:8093, latency: 28780368 nanoseconds
service: N1QL, status: 0, host: 10.132.72.68:8093, latency: 28780368 nanoseconds
service: N1QL, status: 0, host: 10.132.72.93:8093, latency: 28780368 nanoseconds
service: N1QL, status: 0, host: 10.132.72.81:11210, latency: 28780368 nanoseconds
service: N1QL, status: 0, host: 10.132.72.78:11210, latency: 28780368 nanoseconds
(gdb)
0x00007ffff77d7248 in invoke_ping_callback(lcb_st*, PingCookie*) () from /usr/lib64/libcouchbase.so.8
(gdb)
Single stepping until exit from function _ZL20invoke_ping_callbackP6lcb_stP10PingCookie,
which has no line number information.
0x00007ffff77d86b8 in handle_ping(mc_pipeline_st*, mc_packet_st*, lcb_CALLBACK_TYPE, lcb_STATUS, void const*) () from /usr/lib64/libcouchbase.so.8
(gdb)
Single stepping until exit from function _ZL11handle_pingP14mc_pipeline_stP12mc_packet_st17lcb_CALLBACK_TYPE10lcb_STATUSPKv,
which has no line number information.
0x00007ffff77835e4 in H_noop(mc_pipeline_st*, mc_packet_st*, lcb::MemcachedResponse*, lcb_STATUS) () from /usr/lib64/libcouchbase.so.8
(gdb)
Single stepping until exit from function _ZL6H_noopP14mc_pipeline_stP12mc_packet_stPN3lcb17MemcachedResponseE10lcb_STATUS,
which has no line number information.
0x00007ffff77868ed in mcreq_dispatch_response () from /usr/lib64/libcouchbase.so.8
(gdb)
Single stepping until exit from function mcreq_dispatch_response,
which has no line number information.
0x00007ffff779dbc2 in lcb::Server::try_read(lcbio_CTX*, rdb_IOROPE*) () from /usr/lib64/libcouchbase.so.8
(gdb)
Single stepping until exit from function _ZN3lcb6Server8try_readEP9lcbio_CTXP10rdb_IOROPE,
which has no line number information.
0x00007ffff779f537 in on_read(lcbio_CTX*, unsigned int) () from /usr/lib64/libcouchbase.so.8
(gdb)
Single stepping until exit from function _ZL7on_readP9lcbio_CTXj,
which has no line number information.
0x00007ffff77f4ce0 in lcb_maybe_breakout () from /usr/lib64/libcouchbase.so.8
(gdb)
Single stepping until exit from function lcb_maybe_breakout,
which has no line number information.
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff77f4ca5 in has_pending(lcb_st*) () from /usr/lib64/libcouchbase.so.8
(gdb)
Single stepping until exit from function _ZL11has_pendingP6lcb_st,
which has no line number information.
Program terminated with signal SIGSEGV, Segmentation fault.