[jira] Updated: (ZOOKEEPER-78) added a high level protocol/feature - for easy Leader Election or exclusive Write Lock creation
[ https://issues.apache.org/jira/browse/ZOOKEEPER-78?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Mahadev konar updated ZOOKEEPER-78: --- Attachment: ZOOKEEPER-78.patch a new patch. I have changed the directory structure in this the code now is in {{root}}/src/recipes/lock/src/java/org/apache/zookepeer/recipes/lock/ also the tests are in {{root}}/src/recipes/lock/test/org/apache/zookeeper/recipes/lock/ the new directory structure allows us to have both the java and c implemention in the same parent directory strucure. src/recipes/lock/ also - - added a new interface Locklistener - removed runnable to be a locklistener interface whose methods lockAcqured and lockReleased are called on a lock acquired and relase of a lock - refactored some code - deleted not required public methods. - added build files for the recipes directory - changed the tests to work with new api's i am implementing the recipes in c. Will have an updated patch up soon. comments are welcome. > added a high level protocol/feature - for easy Leader Election or exclusive > Write Lock creation > --- > > Key: ZOOKEEPER-78 > URL: https://issues.apache.org/jira/browse/ZOOKEEPER-78 > Project: Zookeeper > Issue Type: New Feature > Components: java client >Affects Versions: 3.0.0 >Reporter: james strachan >Assignee: james strachan > Fix For: 3.2.0 > > Attachments: patch_with_including_Benjamin's_fix.patch, > using_zookeeper_facade.patch, ZOOKEEPER-78.patch, ZOOKEEPER-78.patch, > ZOOKEEPER-78.patch > > > Here's a patch which adds a little WriteLock helper class for performing > leader elections or creating exclusive locks in some directory znode. Note > its an early cut; am sure we can improve it over time. The aim is to avoid > folks having to use the low level ZK stuff but provide a simpler high level > abstraction. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Updated: (ZOOKEEPER-333) helgrind thread issues identified in mt c client code
[ https://issues.apache.org/jira/browse/ZOOKEEPER-333?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Mahadev konar updated ZOOKEEPER-333: Attachment: ZOOKEEPER-333.patch most of the traces in the helgrind output seem harmless to me. This patch has some minor changes (declaring the head pointers of lists as volatile, which we keep checking in different threads without locking), which might cause some problems. the others I think is fine. > helgrind thread issues identified in mt c client code > - > > Key: ZOOKEEPER-333 > URL: https://issues.apache.org/jira/browse/ZOOKEEPER-333 > Project: Zookeeper > Issue Type: Bug > Components: c client >Reporter: Patrick Hunt >Assignee: Mahadev konar >Priority: Critical > Fix For: 3.1.1, 3.2.0 > > Attachments: helgrind_mt.out, helgrind_mt.out.gz, ZOOKEEPER-333.patch > > > helgrind generated a number of issues, I pulled a bunch of them. Most are > related to the test, some are really issues with the mt zk client code though: > valgrind --tool=helgrind --log-file=helgrind_mt.out ./zktest-mt > ==31294== Thread #2: pthread_cond_{timed}wait called with un-held mutex > ==31294==at 0x4027F8F: pthread_cond_w...@* (hg_intercepts.c:560) > ==31294==by 0x404D881: pthread_cond_w...@glibc_2.0 (in > /lib/tls/i686/cmov/libpthread-2.8.90.so) > ==31294==by 0x4028037: pthread_cond_w...@* (hg_intercepts.c:574) > ==31294==by 0x809EBB7: pthread_cond_wait (PthreadMocks.cc:54) > ==31294==by 0x80ABCF6: notify_thread_ready (mt_adaptor.c:136) > ==31294==by 0x80ABE90: do_io (mt_adaptor.c:277) > ==31294== Possible data race during write of size 4 at 0x42E9A58 > ==31294==at 0x8050D83: terminateZookeeperThreads(_zhandle*) > (ZKMocks.cc:518) > ==31294==by 0x805543B: DeliverWatchersWrapper::call(_zhandle*, int, int, > char const*, watcher_object_list**) (ZKMocks.cc:261) > ==31294==by 0x80520F7: __wrap_deliverWatchers (ZKMocks.cc:220) > ==31294==by 0x80A287B: process_completions (zookeeper.c:1393) > ==31294==by 0x80ABDAA: do_completion (mt_adaptor.c:332) > ==31294== Possible data race during write of size 4 at 0xBEFF5F30 > ==31294==at 0x80589AF: > Zookeeper_watchers::ConnectionWatcher::~ConnectionWatcher() > (TestWatchers.cc:54) > ==31294==by 0x805D062: Zookeeper_watchers::testDefaultSessionWatcher1() > (TestWatchers.cc:438) > ==31294==by 0x805608C: CppUnit::TestCaller::runTest() > (TestCaller.h:166) > ==31294== Possible data race during write of size 4 at 0x42EB104 > ==31294==at 0x80A03EE: queue_completion (zookeeper.c:1776) > ==31294==by 0x80A3A44: zookeeper_process (zookeeper.c:1598) > ==31294==by 0x80AC00B: do_io (mt_adaptor.c:309) > ==31294== Thread #29: pthread_cond_{timed}wait called with un-held mutex > ==31294==at 0x4027F8F: pthread_cond_w...@* (hg_intercepts.c:560) > ==31294==by 0x404D881: pthread_cond_w...@glibc_2.0 (in > /lib/tls/i686/cmov/libpthread-2.8.90.so) > ==31294==by 0x4028037: pthread_cond_w...@* (hg_intercepts.c:574) > ==31294==by 0x809EBB7: pthread_cond_wait (PthreadMocks.cc:54) > ==31294==by 0x80AB9B3: wait_sync_completion (mt_adaptor.c:82) > ==31294==by 0x80A1E82: zoo_wget (zookeeper.c:2517) > ==31294==by 0x80A1F13: zoo_get (zookeeper.c:2497) -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Updated: (ZOOKEEPER-333) helgrind thread issues identified in mt c client code
[ https://issues.apache.org/jira/browse/ZOOKEEPER-333?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Mahadev konar updated ZOOKEEPER-333: Status: Patch Available (was: Open) > helgrind thread issues identified in mt c client code > - > > Key: ZOOKEEPER-333 > URL: https://issues.apache.org/jira/browse/ZOOKEEPER-333 > Project: Zookeeper > Issue Type: Bug > Components: c client >Reporter: Patrick Hunt >Assignee: Mahadev konar >Priority: Critical > Fix For: 3.1.1, 3.2.0 > > Attachments: helgrind_mt.out, helgrind_mt.out.gz, ZOOKEEPER-333.patch > > > helgrind generated a number of issues, I pulled a bunch of them. Most are > related to the test, some are really issues with the mt zk client code though: > valgrind --tool=helgrind --log-file=helgrind_mt.out ./zktest-mt > ==31294== Thread #2: pthread_cond_{timed}wait called with un-held mutex > ==31294==at 0x4027F8F: pthread_cond_w...@* (hg_intercepts.c:560) > ==31294==by 0x404D881: pthread_cond_w...@glibc_2.0 (in > /lib/tls/i686/cmov/libpthread-2.8.90.so) > ==31294==by 0x4028037: pthread_cond_w...@* (hg_intercepts.c:574) > ==31294==by 0x809EBB7: pthread_cond_wait (PthreadMocks.cc:54) > ==31294==by 0x80ABCF6: notify_thread_ready (mt_adaptor.c:136) > ==31294==by 0x80ABE90: do_io (mt_adaptor.c:277) > ==31294== Possible data race during write of size 4 at 0x42E9A58 > ==31294==at 0x8050D83: terminateZookeeperThreads(_zhandle*) > (ZKMocks.cc:518) > ==31294==by 0x805543B: DeliverWatchersWrapper::call(_zhandle*, int, int, > char const*, watcher_object_list**) (ZKMocks.cc:261) > ==31294==by 0x80520F7: __wrap_deliverWatchers (ZKMocks.cc:220) > ==31294==by 0x80A287B: process_completions (zookeeper.c:1393) > ==31294==by 0x80ABDAA: do_completion (mt_adaptor.c:332) > ==31294== Possible data race during write of size 4 at 0xBEFF5F30 > ==31294==at 0x80589AF: > Zookeeper_watchers::ConnectionWatcher::~ConnectionWatcher() > (TestWatchers.cc:54) > ==31294==by 0x805D062: Zookeeper_watchers::testDefaultSessionWatcher1() > (TestWatchers.cc:438) > ==31294==by 0x805608C: CppUnit::TestCaller::runTest() > (TestCaller.h:166) > ==31294== Possible data race during write of size 4 at 0x42EB104 > ==31294==at 0x80A03EE: queue_completion (zookeeper.c:1776) > ==31294==by 0x80A3A44: zookeeper_process (zookeeper.c:1598) > ==31294==by 0x80AC00B: do_io (mt_adaptor.c:309) > ==31294== Thread #29: pthread_cond_{timed}wait called with un-held mutex > ==31294==at 0x4027F8F: pthread_cond_w...@* (hg_intercepts.c:560) > ==31294==by 0x404D881: pthread_cond_w...@glibc_2.0 (in > /lib/tls/i686/cmov/libpthread-2.8.90.so) > ==31294==by 0x4028037: pthread_cond_w...@* (hg_intercepts.c:574) > ==31294==by 0x809EBB7: pthread_cond_wait (PthreadMocks.cc:54) > ==31294==by 0x80AB9B3: wait_sync_completion (mt_adaptor.c:82) > ==31294==by 0x80A1E82: zoo_wget (zookeeper.c:2517) > ==31294==by 0x80A1F13: zoo_get (zookeeper.c:2497) -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
Build failed in Hudson: ZooKeeper-trunk #250
See http://hudson.zones.apache.org/hudson/job/ZooKeeper-trunk/250/ -- [...truncated 55103 lines...] [junit] 2009-03-10 13:11:21,450 - INFO [NIOServerCxn.Factory:33221:nioservercnxn$fact...@177] - NIOServerCnxn factory exited run method [junit] 2009-03-10 13:11:21,451 - INFO [main:finalrequestproces...@268] - shutdown of request processor complete [junit] 2009-03-10 13:11:21,451 - INFO [SyncThread:0:syncrequestproces...@119] - SyncRequestProcessor exited! [junit] 2009-03-10 13:11:21,451 - INFO [ProcessThread:-1:preprequestproces...@111] - PrepRequestProcessor exited loop! [junit] 2009-03-10 13:11:21,549 - INFO [main:clientb...@306] - STARTING server [junit] 2009-03-10 13:11:21,550 - INFO [main:zookeeperser...@160] - Created server [junit] 2009-03-10 13:11:21,551 - INFO [main:files...@71] - Reading snapshot http://hudson.zones.apache.org/hudson/job/ZooKeeper-trunk/ws/trunk/build/test/tmp/test5886730081064576607.junit.dir/version-2/snapshot.0 [junit] 2009-03-10 13:11:21,552 - INFO [main:filetxnsnap...@198] - Snapshotting: 3 [junit] 2009-03-10 13:11:21,554 - INFO [NIOServerCxn.Factory:33221:nioserverc...@635] - Processing stat command from /127.0.0.1:50130 [junit] 2009-03-10 13:11:21,554 - WARN [NIOServerCxn.Factory:33221:nioserverc...@431] - Exception causing close of session 0x0 due to java.io.IOException: Responded to info probe [junit] 2009-03-10 13:11:21,555 - INFO [NIOServerCxn.Factory:33221:nioserverc...@766] - closing session:0x0 NIOServerCnxn: java.nio.channels.SocketChannel[connected local=/127.0.0.1:33221 remote=/127.0.0.1:50130] [junit] 2009-03-10 13:11:22,944 - INFO [main-SendThread:clientcnxn$sendthr...@800] - Attempting connection to server /127.0.0.1:33221 [junit] 2009-03-10 13:11:22,944 - INFO [main-SendThread:clientcnxn$sendthr...@716] - Priming connection to java.nio.channels.SocketChannel[connected local=/127.0.0.1:50131 remote=/127.0.0.1:33221] [junit] 2009-03-10 13:11:22,944 - INFO [main-SendThread:clientcnxn$sendthr...@868] - Server connection successful [junit] 2009-03-10 13:11:22,944 - INFO [NIOServerCxn.Factory:33221:nioserverc...@517] - Connected to /127.0.0.1:50131 lastZxid 3 [junit] 2009-03-10 13:11:22,945 - INFO [NIOServerCxn.Factory:33221:nioserverc...@895] - Finished init of 0x11ff0823e57 valid:true [junit] 2009-03-10 13:11:22,945 - INFO [NIOServerCxn.Factory:33221:nioserverc...@545] - Renewing session 0x11ff0823e57 [junit] 2009-03-10 13:11:24,000 - INFO [SessionTracker:sessiontrackeri...@142] - SessionTrackerImpl exited loop! [junit] 2009-03-10 13:11:24,000 - INFO [SessionTracker:sessiontrackeri...@142] - SessionTrackerImpl exited loop! [junit] 2009-03-10 13:11:56,954 - INFO [main:clientb...@300] - STOPPING server [junit] 2009-03-10 13:11:56,955 - INFO [main:nioserverc...@766] - closing session:0x11ff0823e57 NIOServerCnxn: java.nio.channels.SocketChannel[connected local=/127.0.0.1:33221 remote=/127.0.0.1:50131] [junit] 2009-03-10 13:11:56,955 - WARN [main-SendThread:clientcnxn$sendthr...@898] - Exception closing session 0x11ff0823e57 to sun.nio.ch.selectionkeyi...@4d76b4 [junit] java.io.IOException: Read error rc = -1 java.nio.DirectByteBuffer[pos=0 lim=4 cap=4] [junit] at org.apache.zookeeper.ClientCnxn$SendThread.doIO(ClientCnxn.java:632) [junit] at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:876) [junit] 2009-03-10 13:11:56,956 - INFO [NIOServerCxn.Factory:33221:nioservercnxn$fact...@177] - NIOServerCnxn factory exited run method [junit] 2009-03-10 13:11:56,956 - INFO [main:finalrequestproces...@268] - shutdown of request processor complete [junit] 2009-03-10 13:11:56,956 - INFO [SyncThread:0:syncrequestproces...@119] - SyncRequestProcessor exited! [junit] 2009-03-10 13:11:56,956 - INFO [ProcessThread:-1:preprequestproces...@111] - PrepRequestProcessor exited loop! [junit] 2009-03-10 13:11:57,000 - INFO [SessionTracker:sessiontrackeri...@142] - SessionTrackerImpl exited loop! [junit] 2009-03-10 13:11:57,056 - INFO [main:clientb...@306] - STARTING server [junit] 2009-03-10 13:11:57,056 - INFO [main:zookeeperser...@160] - Created server [junit] 2009-03-10 13:11:57,057 - INFO [main:files...@71] - Reading snapshot http://hudson.zones.apache.org/hudson/job/ZooKeeper-trunk/ws/trunk/build/test/tmp/test5886730081064576607.junit.dir/version-2/snapshot.3 [junit] 2009-03-10 13:11:57,059 - INFO [main:filetxnsnap...@198] - Snapshotting: 5 [junit] 2009-03-10 13:11:57,061 - INFO [NIOServerCxn.Factory:33221:nioserverc...@635] - Processing stat command from /127.0.0.1:50133 [junit] 2009-03-10 13:11:57,071 - WARN [NIOServerCxn.Factory:33221:nioserverc...@431] - Exception causing close of session 0x0 due to java.io.IOException: Responded to info probe [junit] 2009-03-10 13:11