Work with two clusters at the same time


#1

Postby Slader » Mon Sep 30, 2013 2:34 pm

I use Aerospike 3 Community Edition. And C driver. Ubuntu 12.04. I would like to connect and operate two (or more) clusters at the same time. Using C API i connect to two clusters without any errors. But when I try to put or get records I can do it only with first cluster. And when I try to put/get data to second cluster i have got core dump:

Program terminated with signal 11, Segmentation fault.
#0  __pthread_mutex_lock (mutex=0x0) at pthread_mutex_lock.c:50
50      pthread_mutex_lock.c: No such file or directory.
(gdb) bt
#0  __pthread_mutex_lock (mutex=0x0) at pthread_mutex_lock.c:50
#1  0x000000000042b418 in cl_cluster_node_get (asc=0x0, ns=0x7fff77fc95a1 "users", d=0x7fff77fc9300, write=true) at src/main/citrusleaf/cl_cluster.c:738
#2  0x000000000042716f in do_the_full_monte (asc=0x0, info1=<optimized out>, info2=<optimized out>, info3=<optimized out>, ns=0x7fff77fc95a1 "users", set=<optimized out>, key=0x0, digest=0x7fff77fc9631, values=0x7fff77fc93c8,
    operator=CL_OP_WRITE, operations=0x0, n_values=0x7fff77fc93c4, cl_gen=0x0, cl_w_p=0x7fff77fc9470, trid=0x7fff77fc93d8, setname_r=0x0, call=0x0, cl_ttl=0x0) at src/main/citrusleaf/citrusleaf.c:1413
#3  0x0000000000428291 in citrusleaf_put_digest_with_setname (asc=<optimized out>, ns=<optimized out>, set=<optimized out>, digest=<optimized out>, values=0x7fff77fc9400, n_values=1, cl_w_p=0x7fff77fc9470)
    at src/main/citrusleaf/citrusleaf.c:1711
#4  0x0000000000418ec4 in aerospike_key_put (as=0x7fff77fcc1b8, err=0x7fff77fce6d8, policy=<optimized out>, key=0x7fff77fc95a0, rec=<optimized out>) at src/main/aerospike/aerospike_key.c:372
#5  0x0000000000413915 in Aerospike::set (this=0x7fff77fcc1b0, set=..., key=..., bin=..., value=...) at /home/slader/projects/utils/as-test/src/Aerospike.cpp:102
#6  0x0000000000414186 in main () at /home/slader/projects/utils/as-test/src/main.cpp:48Program terminated with signal 11, Segmentation fault.
#0  __pthread_mutex_lock (mutex=0x0) at pthread_mutex_lock.c:50
50      pthread_mutex_lock.c: No such file or directory.
(gdb) bt
#0  __pthread_mutex_lock (mutex=0x0) at pthread_mutex_lock.c:50
#1  0x000000000042b418 in cl_cluster_node_get (asc=0x0, ns=0x7fff77fc95a1 "users", d=0x7fff77fc9300, write=true) at src/main/citrusleaf/cl_cluster.c:738
#2  0x000000000042716f in do_the_full_monte (asc=0x0, info1=<optimized out>, info2=<optimized out>, info3=<optimized out>, ns=0x7fff77fc95a1 "users", set=<optimized out>, key=0x0, digest=0x7fff77fc9631, values=0x7fff77fc93c8,
    operator=CL_OP_WRITE, operations=0x0, n_values=0x7fff77fc93c4, cl_gen=0x0, cl_w_p=0x7fff77fc9470, trid=0x7fff77fc93d8, setname_r=0x0, call=0x0, cl_ttl=0x0) at src/main/citrusleaf/citrusleaf.c:1413
#3  0x0000000000428291 in citrusleaf_put_digest_with_setname (asc=<optimized out>, ns=<optimized out>, set=<optimized out>, digest=<optimized out>, values=0x7fff77fc9400, n_values=1, cl_w_p=0x7fff77fc9470)
    at src/main/citrusleaf/citrusleaf.c:1711
#4  0x0000000000418ec4 in aerospike_key_put (as=0x7fff77fcc1b8, err=0x7fff77fce6d8, policy=<optimized out>, key=0x7fff77fc95a0, rec=<optimized out>) at src/main/aerospike/aerospike_key.c:372
#5  0x0000000000413915 in Aerospike::set (this=0x7fff77fcc1b0, set=..., key=..., bin=..., value=...) at /home/slader/projects/utils/as-test/src/Aerospike.cpp:102
#6  0x0000000000414186 in main () at /home/slader/projects/utils/as-test/src/main.cpp:48

#2

Post by young » Thu Oct 03, 2013 4:26 pm

Thank you for your post. We recently found a bug in this implementation and are working on a fix for this now. Please check back in the next release for the fix.


#3

Post by sumeetjain » Tue Oct 08, 2013 10:31 am

Hi Young,

Can you please elaborate on the bug, and an estimated timeline of when it will be fixed?

I’m running into the identical stack trace (a segmentation fault in pthread_mutex_lock), but only connecting to a single cluster.

Also, I’m able to put/get records for some sets, but seeing the segfault for others.

Thanks, Sumeet


#4

Pos tby young » Wed Oct 09, 2013 10:47 am

We are actively working on the fix and it should roll out with the next release. I am not sure about the exact time.

We have not seen the other segfaults your are referring to. Perhaps the fix we put out will fix this as well.


#5

This issue is now fixed.

Please make sure you have client version 3.0.34 or above

http://www.aerospike.com/download/client/c/notes.html#3.0.72