Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Blocker
-
Resolution: Fixed
-
Affects Version/s: 2.0.0
-
Fix Version/s: 2.0.1
-
Component/s: None
-
Security Level: Public
-
Labels:None
Description
lcb_wait hangs..
Code:
lcb_http_request_t htreq;
lcb_error_t lcb_err;
lcb_err = lcb_make_http_request(handle->getLcb(),
this,
LCB_HTTP_TYPE_VIEW,
htcmd,
&htreq);
if (lcb_err != LCB_SUCCESS) {
goto GT_ERR;
}
lcb_err = lcb_wait(handle->getLcb());
printf("Wait returned..\n");
GDB:
$45 = {sock = -1275067896, io = 0x7f76b4000208, server = 0x0, instance = 0x4,
url = 0x7f76ffffffff <Address 0x7f76ffffffff out of bounds>, nurl = 0, url_info = {field_set = 65535,
port = 65535, field_data = {{off = 0, len = 0}, {off = 19968, len = 476}, {off = 0, len = 0}, {off = 65535,
len = 65535}, {off = 65535, len = 65535}, {off = 337, len = 0}}}, host = 0x7f76b4000000 " ", port = 0x0,
path = 0x8000000000 <Address 0x8000000000 out of bounds>, npath = 36, password = 0x7f76b4000b90 "\020",
method = LCB_HTTP_METHOD_GET, parser = 0x0, parser_settings = {on_message_begin = 0x25,
on_url = 0x3132312e332e3031, on_header_field = 0x3231313a3830322e, on_header_value = 0x3031,
on_headers_complete = 0x25, on_body = 0x3132312e332e3031, on_message_complete = 0x323131003830322e},
root_ai = 0x3031, curr_ai = 0x35, event = 0x312f2f3a70747468, chunked = 775106096,
on_complete = 0x323930383a383032, on_data = 0x746c75616665642f, output = {root = 0x0,
read_head = 0x35 <Address 0x35 out of bounds>, write_head = 0x3 <Address 0x3 out of bounds>, size = 7,
nbytes = 8}, input = {root = 0x7f76b400e0c0 "", read_head = 0x0,
write_head = 0x55 <Address 0x55 out of bounds>, size = 0, nbytes = 0}, result = {root = 0x0,
read_head = 0x0, write_head = 0x0, size = 0, nbytes = 0}, command_cookie = 0x0, cancelled = 0,
completed = 0, headers_list = 0x25, headers = 0x3132312e332e3031, nheaders = 4120855481762722350}
(gdb) frame 4
#4 0x00007f76ce7340a3 in lcb_wait (instance=0x1dd9580) at src/wait.c:112
112 instance->io->v.v0.run_event_loop(instance->io);
(gdb) print *instance
$46 = {type = LCB_TYPE_BUCKET, host = "10.3.121.212\000\070\060\071\061", '\000' <repeats 1008 times>,
port = "8091", '\000' <repeats 28 times>,
http_uri = 0x1dd14a0 "GET /pools/default/bucketsStreaming/default HTTP/1.1\r\nAuthorization: Basic QWRtaW5pc3RyYXRvcjoxMjM0NTY=\r\n\r\n", n_http_uri_sent = 107, event = 0x1dd8900, vbucket_config = 0x7f76b4003760,
vbucket_stream = {
header = 0x1dd7fb0 "HTTP/1.1 200 OK\r\nTransfer-Encoding: chunked\r\nServer: Couchbase Server 2.0.0-1956-rel-enterprise\r\nPragma: no-cache\r\nDate: Sun, 02 Dec 2012 16:58:58 GMT\r\nContent-Type: application/json; charset=utf-8\r\nC"..., input = {
data = 0x1ddca90 "{\"name\":\"default\",\"bucketType\":\"membase\",\"authType\":\"sasl\",\"saslPassword\":\"\",\"proxyPort\":0,\"replicaIndex\":false,\"uri\":\"/pools/default/buckets/default?bucket_uuid=0535828b5b9f231994f876e3b4299956\",\"str"..., size = 4096, avail = 0}, chunk_size = 18446744073709551615, chunk = {
Code:
lcb_http_request_t htreq;
lcb_error_t lcb_err;
lcb_err = lcb_make_http_request(handle->getLcb(),
this,
LCB_HTTP_TYPE_VIEW,
htcmd,
&htreq);
if (lcb_err != LCB_SUCCESS) {
goto GT_ERR;
}
lcb_err = lcb_wait(handle->getLcb());
printf("Wait returned..\n");
GDB:
$45 = {sock = -1275067896, io = 0x7f76b4000208, server = 0x0, instance = 0x4,
url = 0x7f76ffffffff <Address 0x7f76ffffffff out of bounds>, nurl = 0, url_info = {field_set = 65535,
port = 65535, field_data = {{off = 0, len = 0}, {off = 19968, len = 476}, {off = 0, len = 0}, {off = 65535,
len = 65535}, {off = 65535, len = 65535}, {off = 337, len = 0}}}, host = 0x7f76b4000000 " ", port = 0x0,
path = 0x8000000000 <Address 0x8000000000 out of bounds>, npath = 36, password = 0x7f76b4000b90 "\020",
method = LCB_HTTP_METHOD_GET, parser = 0x0, parser_settings = {on_message_begin = 0x25,
on_url = 0x3132312e332e3031, on_header_field = 0x3231313a3830322e, on_header_value = 0x3031,
on_headers_complete = 0x25, on_body = 0x3132312e332e3031, on_message_complete = 0x323131003830322e},
root_ai = 0x3031, curr_ai = 0x35, event = 0x312f2f3a70747468, chunked = 775106096,
on_complete = 0x323930383a383032, on_data = 0x746c75616665642f, output = {root = 0x0,
read_head = 0x35 <Address 0x35 out of bounds>, write_head = 0x3 <Address 0x3 out of bounds>, size = 7,
nbytes = 8}, input = {root = 0x7f76b400e0c0 "", read_head = 0x0,
write_head = 0x55 <Address 0x55 out of bounds>, size = 0, nbytes = 0}, result = {root = 0x0,
read_head = 0x0, write_head = 0x0, size = 0, nbytes = 0}, command_cookie = 0x0, cancelled = 0,
completed = 0, headers_list = 0x25, headers = 0x3132312e332e3031, nheaders = 4120855481762722350}
(gdb) frame 4
#4 0x00007f76ce7340a3 in lcb_wait (instance=0x1dd9580) at src/wait.c:112
112 instance->io->v.v0.run_event_loop(instance->io);
(gdb) print *instance
$46 = {type = LCB_TYPE_BUCKET, host = "10.3.121.212\000\070\060\071\061", '\000' <repeats 1008 times>,
port = "8091", '\000' <repeats 28 times>,
http_uri = 0x1dd14a0 "GET /pools/default/bucketsStreaming/default HTTP/1.1\r\nAuthorization: Basic QWRtaW5pc3RyYXRvcjoxMjM0NTY=\r\n\r\n", n_http_uri_sent = 107, event = 0x1dd8900, vbucket_config = 0x7f76b4003760,
vbucket_stream = {
header = 0x1dd7fb0 "HTTP/1.1 200 OK\r\nTransfer-Encoding: chunked\r\nServer: Couchbase Server 2.0.0-1956-rel-enterprise\r\nPragma: no-cache\r\nDate: Sun, 02 Dec 2012 16:58:58 GMT\r\nContent-Type: application/json; charset=utf-8\r\nC"..., input = {
data = 0x1ddca90 "{\"name\":\"default\",\"bucketType\":\"membase\",\"authType\":\"sasl\",\"saslPassword\":\"\",\"proxyPort\":0,\"replicaIndex\":false,\"uri\":\"/pools/default/buckets/default?bucket_uuid=0535828b5b9f231994f876e3b4299956\",\"str"..., size = 4096, avail = 0}, chunk_size = 18446744073709551615, chunk = {
at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#1 0x00007ffff69ed6f0 in *__GI_abort () at abort.c:92
#2 0x00007ffff74e66f6 in lcb_http_request_destroy (req=0x64e4e0) at src/http.c:39
#3 0x00007ffff74eef00 in lcb_server_destroy (server=0x620b10) at src/server.c:403
#4 0x00007ffff74ead8b in lcb_update_serverlist (instance=0x61b2b0)
at src/instance.c:596
#5 0x00007ffff74ebaea in vbucket_stream_handler (sock=28, which=2, arg=0x61b2b0)
at src/instance.c:970
#6 0x00007ffff5d7cccc in event_base_loop ()
from /usr/lib/x86_64-linux-gnu/libevent-2.0.so.5
#7 0x00007ffff4f60537 in lcb_io_run_event_loop (iops=0x61a570)
at plugins/io/libevent/plugin-libevent.c:320
#8 0x00007ffff74f269f in lcb_wait (instance=0x61b2b0) at src/wait.c:112
#9 0x00007ffff7bbe5c9 in CBSdkd::ViewExecutor::runSingleView (
this=0x7ffff475c710, htcmd=0x7ffff475c5a0) at ViewExecutor.cpp:255
#10 0x00007ffff7bbe9c0 in CBSdkd::ViewExecutor::executeView (this=0x7ffff475c710,
cmd=..., out=..., options=..., req=...) at ViewExecutor.cpp:310
#11 0x00007ffff7bb2c49 in CBSdkd::WorkerDispatch::_process_request (
this=0x61a0b0, req=..., rs=0x61a480) at IODispatch.cpp:548
#12 0x00007ffff7bb3574 in CBSdkd::WorkerDispatch::run (this=0x61a0b0)
at IODispatch.cpp:634
#13 0x00007ffff7bb0c4a in CBSdkd::new_worker_thread (worker=0x61a0b0)
at IODispatch.cpp:216
#14 0x00007ffff7952b50 in start_thread (arg=<optimized out>)
at pthread_create.c:304
#15 0x00007ffff6a9070d in clone ()
at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#16 0x0000000000000000 in ?? ()
(gdb)