ZooKeeper
  1. ZooKeeper
  2. ZOOKEEPER-591

The C Client cannot exit properly in some situation

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 3.2.1
    • Fix Version/s: 3.3.0
    • Component/s: c client
    • Labels:
      None
    • Environment:

      Linux db-passport-test05.vm 2.6.9_5-4-0-5 #1 SMP Tue Apr 14 15:56:24 CST 2009 x86_64 x86_64 x86_64 GNU/Linux

    • Hadoop Flags:
      Reviewed
    • Tags:
      Zookeeper C Client

      Description

      The following code produce a situation, where the C Client can not exit properly,

      #include "include/zookeeper.h"

      void default_zoo_watcher(zhandle_t zzh, int type, int state, const char *path, void context){
      int zrc = 0;
      struct String_vector str_vec =

      {0, NULL};
      printf("in the default_zoo_watcher\n");
      zrc = zoo_wget_children(zzh, "/mytest", default_zoo_watcher, NULL, &str_vec);
      printf("zoo_wget_children, error: %d\n", zrc);

      return;
      }

      int main()
      {
      int zrc = 0;
      int buff_len = 10;
      char buff[10] = "hello";
      char path[512];
      struct Stat stat;
      struct String_vector str_vec = {0, NULL}

      ;

      zhandle_t *zh = zookeeper_init("10.81.20.62:2181", NULL, 30000, 0, 0, 0);
      zrc = zoo_create(zh, "/mytest", buff, 10, &ZOO_OPEN_ACL_UNSAFE, 0, path, 512);
      printf("zoo_create, error: %d\n", zrc);

      zrc = zoo_wget_children(zh, "/mytest", default_zoo_watcher, NULL, &str_vec);
      printf("zoo_wget_children, error: %d\n", zrc);

      zrc = zoo_create(zh, "/mytest/test1", buff, 10, &ZOO_OPEN_ACL_UNSAFE, 0, path, 512);
      printf("zoo_create, error: %d\n", zrc);

      zrc = zoo_wget_children(zh, "/mytest", default_zoo_watcher, NULL, &str_vec);
      printf("zoo_wget_children, error: %d\n", zrc);

      zrc = zoo_delete(zh, "/mytest/test1", -1);

      printf("zoo_delete, error: %d\n", zrc);
      zookeeper_close(zh);
      return 0;
      }

      running this code can cause the program hang at zookeeper_close(zh);(line 38). using gdb to attach the process, I found that the main thread is waiting for do_completion thread to finish,
      (gdb) bt
      #0 0x000000302b806ffb in pthread_join () from /lib64/tls/libpthread.so.0
      #1 0x000000000040de3b in adaptor_finish (zh=0x515b60) at src/mt_adaptor.c:219
      #2 0x00000000004060ba in zookeeper_close (zh=0x515b60) at src/zookeeper.c:2100
      #3 0x000000000040220b in main ()

      and the thread which handle the zoo_wget_children(in the default_zoo_watcher) is waiting for sc->cond.
      (gdb) thread 2
      [Switching to thread 2 (Thread 1094719840 (LWP 25093))]#0 0x000000302b8089aa in pthread_cond_wait@@GLIBC_2.3.2 ()
      from /lib64/tls/libpthread.so.0
      (gdb) bt
      #0 0x000000302b8089aa in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/tls/libpthread.so.0
      #1 0x000000000040d88b in wait_sync_completion (sc=0x5167f0) at src/mt_adaptor.c:82
      #2 0x00000000004082c9 in zoo_wget_children (zh=0x515b60, path=0x40ebc0 "/mytest", watcher=0x401fd8 <default_zoo_watcher>, watcherCtx=Variable "watcherCtx" is not available.)
      at src/zookeeper.c:2884
      #3 0x0000000000402037 in default_zoo_watcher ()
      #4 0x000000000040d664 in deliverWatchers (zh=0x515b60, type=4, state=3, path=0x515100 "/mytest", list=0x5177d8) at src/zk_hashtable.c:274
      #5 0x0000000000403861 in process_completions (zh=0x515b60) at src/zookeeper.c:1631
      #6 0x000000000040e1b5 in do_completion (v=Variable "v" is not available.) at src/mt_adaptor.c:333
      #7 0x000000302b80610a in start_thread () from /lib64/tls/libpthread.so.0
      #8 0x000000302afc6003 in clone () from /lib64/tls/libc.so.6
      #9 0x0000000000000000 in ?? ()

      here, a deadlock presents.

      1. zootest.c
        1 kB
        Mahadev konar
      2. ZOOKEEPER-591.patch
        0.5 kB
        Mahadev konar
      3. ZOOKEEPER-591.patch
        2 kB
        Mahadev konar
      4. ZOOKEEPER-591.patch
        3 kB
        Mahadev konar
      5. ZOOKEEPER-591.patch
        4 kB
        Mahadev konar
      6. ZOOKEEPER-591_2.patch
        0.4 kB
        Mahadev konar
      7. ZOOKEEPER-591_1.patch
        4 kB
        Mahadev konar
      8. ZOOKEEPER-591_1.patch
        4 kB
        Mahadev konar
      9. ZOOKEEPER-591_1.patch
        4 kB
        Mahadev konar

        Activity

        Hide
        Qian Ye added a comment -

        The reason of the deadlock is that the io thread didn't check whether there is some sync commands still in processing, before it returned. I think some kind of pending sync commands and thread mutex should be added to make sure the zookeeper handler can be closed properly. Has anyone have a look at this bug yet?

        Show
        Qian Ye added a comment - The reason of the deadlock is that the io thread didn't check whether there is some sync commands still in processing, before it returned. I think some kind of pending sync commands and thread mutex should be added to make sure the zookeeper handler can be closed properly. Has anyone have a look at this bug yet?
        Hide
        Patrick Hunt added a comment -

        Upping the priority and assigning to 3.3.0

        Show
        Patrick Hunt added a comment - Upping the priority and assigning to 3.3.0
        Hide
        Mahadev konar added a comment -

        ben, did you get a chance to take a look at it ?

        Show
        Mahadev konar added a comment - ben, did you get a chance to take a look at it ?
        Hide
        Mahadev konar added a comment -

        looking at the code, it looks like that there is a race condition wherein after free_completions is called by do_io(), calls could still be queued, which will cause the above problem to happen. I am attachign a patch which will not allow calls to be queued as soon as zookeeper_close() is callled.

        Qian, can you try out this patch and post the results. Its not possible to write a unit test for this.

        Show
        Mahadev konar added a comment - looking at the code, it looks like that there is a race condition wherein after free_completions is called by do_io(), calls could still be queued, which will cause the above problem to happen. I am attachign a patch which will not allow calls to be queued as soon as zookeeper_close() is callled. Qian, can you try out this patch and post the results. Its not possible to write a unit test for this.
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12438345/ZOOKEEPER-591.patch
        against trunk revision 921117.

        +1 @author. The patch does not contain any @author tags.

        -1 tests included. The patch doesn't appear to include any new or modified tests.
        Please justify why no tests are needed for this patch.

        +1 javadoc. The javadoc tool did not generate any warning messages.

        +1 javac. The applied patch does not increase the total number of javac compiler warnings.

        +1 findbugs. The patch does not introduce any new Findbugs warnings.

        +1 release audit. The applied patch does not increase the total number of release audit warnings.

        +1 core tests. The patch passed core unit tests.

        +1 contrib tests. The patch passed contrib unit tests.

        Test results: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h1.grid.sp2.yahoo.net/6/testReport/
        Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h1.grid.sp2.yahoo.net/6/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
        Console output: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h1.grid.sp2.yahoo.net/6/console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12438345/ZOOKEEPER-591.patch against trunk revision 921117. +1 @author. The patch does not contain any @author tags. -1 tests included. The patch doesn't appear to include any new or modified tests. Please justify why no tests are needed for this patch. +1 javadoc. The javadoc tool did not generate any warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 findbugs. The patch does not introduce any new Findbugs warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. +1 core tests. The patch passed core unit tests. +1 contrib tests. The patch passed contrib unit tests. Test results: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h1.grid.sp2.yahoo.net/6/testReport/ Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h1.grid.sp2.yahoo.net/6/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Console output: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h1.grid.sp2.yahoo.net/6/console This message is automatically generated.
        Hide
        Qian Ye added a comment -

        Hi Mahadev, the patch doesn't work , the deadlock still exist.

        (gdb) info thread
        2 Thread 1094719840 (LWP 13889) 0x000000302b8089aa in pthread_cond_wait@@GLIBC_2.3.2 ()
        from /lib64/tls/libpthread.so.0
        1 Thread 182894113888 (LWP 13887) 0x000000302b806ffb in pthread_join () from /lib64/tls/libpthread.so.0
        (gdb) thread 1
        [Switching to thread 1 (Thread 182894113888 (LWP 13887))]#0 0x000000302b806ffb in pthread_join ()
        from /lib64/tls/libpthread.so.0
        (gdb) bt
        #0 0x000000302b806ffb in pthread_join () from /lib64/tls/libpthread.so.0
        #1 0x000000000040de2b in adaptor_finish (zh=0x515b60) at src/mt_adaptor.c:218
        #2 0x00000000004060aa in zookeeper_close (zh=0x515b60) at src/zookeeper.c:2086
        #3 0x000000000040220b in main ()
        (gdb) thread 2
        [Switching to thread 2 (Thread 1094719840 (LWP 13889))]#0 0x000000302b8089aa in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/tls/libpthread.so.0
        (gdb) bt
        #0 0x000000302b8089aa in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/tls/libpthread.so.0
        #1 0x000000000040d87b in wait_sync_completion (sc=0x517850) at src/mt_adaptor.c:82
        #2 0x00000000004082b9 in zoo_wget_children (zh=0x515b60, path=0x40eba0 "/mytest",
        watcher=0x401fd8 <default_zoo_watcher>, watcherCtx=Variable "watcherCtx" is not available.
        ) at src/zookeeper.c:2866
        #3 0x0000000000402037 in default_zoo_watcher ()
        #4 0x000000000040d654 in deliverWatchers (zh=0x515b60, type=4, state=3, path=0x516920 "/mytest",
        list=0x5177d8) at src/zk_hashtable.c:271
        #5 0x0000000000403871 in process_completions (zh=0x515b60) at src/zookeeper.c:1620
        #6 0x000000000040e1a5 in do_completion (v=Variable "v" is not available.
        ) at src/mt_adaptor.c:332
        #7 0x000000302b80610a in start_thread () from /lib64/tls/libpthread.so.0
        #8 0x000000302afc6003 in clone () from /lib64/tls/libc.so.6
        #9 0x0000000000000000 in ?? ()

        Show
        Qian Ye added a comment - Hi Mahadev, the patch doesn't work , the deadlock still exist. (gdb) info thread 2 Thread 1094719840 (LWP 13889) 0x000000302b8089aa in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/tls/libpthread.so.0 1 Thread 182894113888 (LWP 13887) 0x000000302b806ffb in pthread_join () from /lib64/tls/libpthread.so.0 (gdb) thread 1 [Switching to thread 1 (Thread 182894113888 (LWP 13887))] #0 0x000000302b806ffb in pthread_join () from /lib64/tls/libpthread.so.0 (gdb) bt #0 0x000000302b806ffb in pthread_join () from /lib64/tls/libpthread.so.0 #1 0x000000000040de2b in adaptor_finish (zh=0x515b60) at src/mt_adaptor.c:218 #2 0x00000000004060aa in zookeeper_close (zh=0x515b60) at src/zookeeper.c:2086 #3 0x000000000040220b in main () (gdb) thread 2 [Switching to thread 2 (Thread 1094719840 (LWP 13889))] #0 0x000000302b8089aa in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/tls/libpthread.so.0 (gdb) bt #0 0x000000302b8089aa in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/tls/libpthread.so.0 #1 0x000000000040d87b in wait_sync_completion (sc=0x517850) at src/mt_adaptor.c:82 #2 0x00000000004082b9 in zoo_wget_children (zh=0x515b60, path=0x40eba0 "/mytest", watcher=0x401fd8 <default_zoo_watcher>, watcherCtx=Variable "watcherCtx" is not available. ) at src/zookeeper.c:2866 #3 0x0000000000402037 in default_zoo_watcher () #4 0x000000000040d654 in deliverWatchers (zh=0x515b60, type=4, state=3, path=0x516920 "/mytest", list=0x5177d8) at src/zk_hashtable.c:271 #5 0x0000000000403871 in process_completions (zh=0x515b60) at src/zookeeper.c:1620 #6 0x000000000040e1a5 in do_completion (v=Variable "v" is not available. ) at src/mt_adaptor.c:332 #7 0x000000302b80610a in start_thread () from /lib64/tls/libpthread.so.0 #8 0x000000302afc6003 in clone () from /lib64/tls/libc.so.6 #9 0x0000000000000000 in ?? ()
        Hide
        Mahadev konar added a comment -

        we need to resolve this. marking it as a blocker.

        Show
        Mahadev konar added a comment - we need to resolve this. marking it as a blocker.
        Hide
        Mahadev konar added a comment -

        here is the updated patch. Qian can you try it out as soon as possible?

        Show
        Mahadev konar added a comment - here is the updated patch. Qian can you try it out as soon as possible?
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12438438/ZOOKEEPER-591.patch
        against trunk revision 921509.

        +1 @author. The patch does not contain any @author tags.

        -1 tests included. The patch doesn't appear to include any new or modified tests.
        Please justify why no tests are needed for this patch.

        +1 javadoc. The javadoc tool did not generate any warning messages.

        +1 javac. The applied patch does not increase the total number of javac compiler warnings.

        +1 findbugs. The patch does not introduce any new Findbugs warnings.

        +1 release audit. The applied patch does not increase the total number of release audit warnings.

        +1 core tests. The patch passed core unit tests.

        +1 contrib tests. The patch passed contrib unit tests.

        Test results: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h1.grid.sp2.yahoo.net/11/testReport/
        Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h1.grid.sp2.yahoo.net/11/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
        Console output: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h1.grid.sp2.yahoo.net/11/console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12438438/ZOOKEEPER-591.patch against trunk revision 921509. +1 @author. The patch does not contain any @author tags. -1 tests included. The patch doesn't appear to include any new or modified tests. Please justify why no tests are needed for this patch. +1 javadoc. The javadoc tool did not generate any warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 findbugs. The patch does not introduce any new Findbugs warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. +1 core tests. The patch passed core unit tests. +1 contrib tests. The patch passed contrib unit tests. Test results: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h1.grid.sp2.yahoo.net/11/testReport/ Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h1.grid.sp2.yahoo.net/11/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Console output: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h1.grid.sp2.yahoo.net/11/console This message is automatically generated.
        Hide
        Qian Ye added a comment -

        The process still hang there, Mahadev.
        (gdb) info thread
        2 Thread 1094719840 (LWP 31877) 0x000000302b8089aa in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/tls/libpthread.so.0
        1 Thread 182894113888 (LWP 31875) 0x000000302b806ffb in pthread_join () from /lib64/tls/libpthread.so.0
        (gdb) thread 1
        [Switching to thread 1 (Thread 182894113888 (LWP 31875))]#0 0x000000302b806ffb in pthread_join () from /lib64/tls/libpthread.so.0
        (gdb) bt
        #0 0x000000302b806ffb in pthread_join () from /lib64/tls/libpthread.so.0
        #1 0x000000000040de5b in adaptor_finish (zh=0x515b60) at src/mt_adaptor.c:218
        #2 0x00000000004060da in zookeeper_close (zh=0x515b60) at src/zookeeper.c:2109
        #3 0x000000000040220b in main ()
        (gdb) thread 2
        [Switching to thread 2 (Thread 1094719840 (LWP 31877))]#0 0x000000302b8089aa in pthread_cond_wait@@GLIBC_2.3.2 ()
        from /lib64/tls/libpthread.so.0
        (gdb) bt
        #0 0x000000302b8089aa in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/tls/libpthread.so.0
        #1 0x000000000040d8ab in wait_sync_completion (sc=0x5167f0) at src/mt_adaptor.c:82
        #2 0x00000000004082e9 in zoo_wget_children (zh=0x515b60, path=0x40ebe0 "/mytest", watcher=0x401fd8 <default_zoo_watcher>, watcherCtx=Variable "watcherCtx" is not available.
        )
        at src/zookeeper.c:2889
        #3 0x0000000000402037 in default_zoo_watcher ()
        #4 0x000000000040d684 in deliverWatchers (zh=0x515b60, type=4, state=3, path=0x515100 "/mytest", list=0x2a95700b08) at src/zk_hashtable.c:271
        #5 0x0000000000403771 in process_completions (zh=0x515b60) at src/zookeeper.c:1623
        #6 0x000000000040e1d5 in do_completion (v=Variable "v" is not available.
        ) at src/mt_adaptor.c:332
        #7 0x000000302b80610a in start_thread () from /lib64/tls/libpthread.so.0
        #8 0x000000302afc6003 in clone () from /lib64/tls/libc.so.6
        #9 0x0000000000000000 in ?? ()

        I patched the patch to the c client source code version 3.2.2, not the working copy, I think this won't make any difference, right?

        Show
        Qian Ye added a comment - The process still hang there, Mahadev. (gdb) info thread 2 Thread 1094719840 (LWP 31877) 0x000000302b8089aa in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/tls/libpthread.so.0 1 Thread 182894113888 (LWP 31875) 0x000000302b806ffb in pthread_join () from /lib64/tls/libpthread.so.0 (gdb) thread 1 [Switching to thread 1 (Thread 182894113888 (LWP 31875))] #0 0x000000302b806ffb in pthread_join () from /lib64/tls/libpthread.so.0 (gdb) bt #0 0x000000302b806ffb in pthread_join () from /lib64/tls/libpthread.so.0 #1 0x000000000040de5b in adaptor_finish (zh=0x515b60) at src/mt_adaptor.c:218 #2 0x00000000004060da in zookeeper_close (zh=0x515b60) at src/zookeeper.c:2109 #3 0x000000000040220b in main () (gdb) thread 2 [Switching to thread 2 (Thread 1094719840 (LWP 31877))] #0 0x000000302b8089aa in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/tls/libpthread.so.0 (gdb) bt #0 0x000000302b8089aa in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/tls/libpthread.so.0 #1 0x000000000040d8ab in wait_sync_completion (sc=0x5167f0) at src/mt_adaptor.c:82 #2 0x00000000004082e9 in zoo_wget_children (zh=0x515b60, path=0x40ebe0 "/mytest", watcher=0x401fd8 <default_zoo_watcher>, watcherCtx=Variable "watcherCtx" is not available. ) at src/zookeeper.c:2889 #3 0x0000000000402037 in default_zoo_watcher () #4 0x000000000040d684 in deliverWatchers (zh=0x515b60, type=4, state=3, path=0x515100 "/mytest", list=0x2a95700b08) at src/zk_hashtable.c:271 #5 0x0000000000403771 in process_completions (zh=0x515b60) at src/zookeeper.c:1623 #6 0x000000000040e1d5 in do_completion (v=Variable "v" is not available. ) at src/mt_adaptor.c:332 #7 0x000000302b80610a in start_thread () from /lib64/tls/libpthread.so.0 #8 0x000000302afc6003 in clone () from /lib64/tls/libc.so.6 #9 0x0000000000000000 in ?? () I patched the patch to the c client source code version 3.2.2, not the working copy, I think this won't make any difference, right?
        Hide
        Mahadev konar added a comment -

        Qian,
        I can reproduce this as well on trunk. Yes, my patch does not fix the bug. I am still working on it.

        Show
        Mahadev konar added a comment - Qian, I can reproduce this as well on trunk. Yes, my patch does not fix the bug. I am still working on it.
        Hide
        Mahadev konar added a comment -

        a test case that qian actually reported that can reproduce the bug.

        Show
        Mahadev konar added a comment - a test case that qian actually reported that can reproduce the bug.
        Hide
        Patrick Hunt added a comment -

        This test case from qian, we plan to add this to the c unit tests right?

        Show
        Patrick Hunt added a comment - This test case from qian, we plan to add this to the c unit tests right?
        Hide
        Mahadev konar added a comment -

        i think we can .... am working on including it as soon as we figure out the fix.....

        Show
        Mahadev konar added a comment - i think we can .... am working on including it as soon as we figure out the fix.....
        Hide
        Mahadev konar added a comment -

        another patch for fixing this.

        Show
        Mahadev konar added a comment - another patch for fixing this.
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12438540/ZOOKEEPER-591.patch
        against trunk revision 921853.

        +1 @author. The patch does not contain any @author tags.

        -1 tests included. The patch doesn't appear to include any new or modified tests.
        Please justify why no tests are needed for this patch.

        +1 javadoc. The javadoc tool did not generate any warning messages.

        +1 javac. The applied patch does not increase the total number of javac compiler warnings.

        +1 findbugs. The patch does not introduce any new Findbugs warnings.

        +1 release audit. The applied patch does not increase the total number of release audit warnings.

        +1 core tests. The patch passed core unit tests.

        +1 contrib tests. The patch passed contrib unit tests.

        Test results: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h1.grid.sp2.yahoo.net/12/testReport/
        Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h1.grid.sp2.yahoo.net/12/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
        Console output: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h1.grid.sp2.yahoo.net/12/console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12438540/ZOOKEEPER-591.patch against trunk revision 921853. +1 @author. The patch does not contain any @author tags. -1 tests included. The patch doesn't appear to include any new or modified tests. Please justify why no tests are needed for this patch. +1 javadoc. The javadoc tool did not generate any warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 findbugs. The patch does not introduce any new Findbugs warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. +1 core tests. The patch passed core unit tests. +1 contrib tests. The patch passed contrib unit tests. Test results: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h1.grid.sp2.yahoo.net/12/testReport/ Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h1.grid.sp2.yahoo.net/12/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Console output: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h1.grid.sp2.yahoo.net/12/console This message is automatically generated.
        Hide
        Mahadev konar added a comment -

        this patch fixes the issue. I have added a test case as well which is on teh lines of the code posted by Qian.

        Qian, you can go ahead and try it. This should fix the bug.

        Show
        Mahadev konar added a comment - this patch fixes the issue. I have added a test case as well which is on teh lines of the code posted by Qian. Qian, you can go ahead and try it. This should fix the bug.
        Hide
        Benjamin Reed added a comment -

        +1 good job mahadev!

        Show
        Benjamin Reed added a comment - +1 good job mahadev!
        Hide
        Hadoop QA added a comment -

        +1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12438547/ZOOKEEPER-591.patch
        against trunk revision 921853.

        +1 @author. The patch does not contain any @author tags.

        +1 tests included. The patch appears to include 5 new or modified tests.

        +1 javadoc. The javadoc tool did not generate any warning messages.

        +1 javac. The applied patch does not increase the total number of javac compiler warnings.

        +1 findbugs. The patch does not introduce any new Findbugs warnings.

        +1 release audit. The applied patch does not increase the total number of release audit warnings.

        +1 core tests. The patch passed core unit tests.

        +1 contrib tests. The patch passed contrib unit tests.

        Test results: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h1.grid.sp2.yahoo.net/13/testReport/
        Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h1.grid.sp2.yahoo.net/13/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
        Console output: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h1.grid.sp2.yahoo.net/13/console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - +1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12438547/ZOOKEEPER-591.patch against trunk revision 921853. +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 5 new or modified tests. +1 javadoc. The javadoc tool did not generate any warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 findbugs. The patch does not introduce any new Findbugs warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. +1 core tests. The patch passed core unit tests. +1 contrib tests. The patch passed contrib unit tests. Test results: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h1.grid.sp2.yahoo.net/13/testReport/ Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h1.grid.sp2.yahoo.net/13/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Console output: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h1.grid.sp2.yahoo.net/13/console This message is automatically generated.
        Hide
        Qian Ye added a comment -

        This patch works for me, thx mahadev

        Show
        Qian Ye added a comment - This patch works for me, thx mahadev
        Hide
        Mahadev konar added a comment -

        patch that applies to the trunk.

        Show
        Mahadev konar added a comment - patch that applies to the trunk.
        Hide
        Mahadev konar added a comment -

        the last patch had a bug which is fixed in this patch.

        Show
        Mahadev konar added a comment - the last patch had a bug which is fixed in this patch.
        Hide
        Mahadev konar added a comment -

        the last patch had a bug which is fixed in this patch.

        Show
        Mahadev konar added a comment - the last patch had a bug which is fixed in this patch.
        Hide
        Mahadev konar added a comment -

        I just ran ant test and it passed. I committed this!

        Show
        Mahadev konar added a comment - I just ran ant test and it passed. I committed this!
        Hide
        Patrick Hunt added a comment -

        this occassionally hangs for me, had to ctrl-c to kill it:

        [exec] Zookeeper_simpleSystem::testAcl : elapsed 1022 : OK
        [exec] Zookeeper_simpleSystem::testChroot : elapsed 3166 : OK
        [exec] Zookeeper_simpleSystem::testAuth ZooKeeper server started : elapsed 25773 : OK
        [exec] make: *** wait: No child processes. Stop.
        [exec] make: *** Waiting for unfinished jobs....
        [exec] make: *** wait: No child processes. Stop.
        [exec] Zookeeper_simpleSystem::testHangingClient

        BUILD FAILED
        /home/phunt/dev/workspace/gitzk/build.xml:866: The following error occurred while executing this line:
        /home/phunt/dev/workspace/gitzk/build.xml:877: exec returned: 2

        Show
        Patrick Hunt added a comment - this occassionally hangs for me, had to ctrl-c to kill it: [exec] Zookeeper_simpleSystem::testAcl : elapsed 1022 : OK [exec] Zookeeper_simpleSystem::testChroot : elapsed 3166 : OK [exec] Zookeeper_simpleSystem::testAuth ZooKeeper server started : elapsed 25773 : OK [exec] make: *** wait: No child processes. Stop. [exec] make: *** Waiting for unfinished jobs.... [exec] make: *** wait: No child processes. Stop. [exec] Zookeeper_simpleSystem::testHangingClient BUILD FAILED /home/phunt/dev/workspace/gitzk/build.xml:866: The following error occurred while executing this line: /home/phunt/dev/workspace/gitzk/build.xml:877: exec returned: 2
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12438988/ZOOKEEPER-591_1.patch
        against trunk revision 924065.

        +1 @author. The patch does not contain any @author tags.

        +1 tests included. The patch appears to include 5 new or modified tests.

        +1 javadoc. The javadoc tool did not generate any warning messages.

        +1 javac. The applied patch does not increase the total number of javac compiler warnings.

        +1 findbugs. The patch does not introduce any new Findbugs warnings.

        +1 release audit. The applied patch does not increase the total number of release audit warnings.

        -1 core tests. The patch failed core unit tests.

        +1 contrib tests. The patch passed contrib unit tests.

        Test results: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h1.grid.sp2.yahoo.net/29/testReport/
        Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h1.grid.sp2.yahoo.net/29/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
        Console output: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h1.grid.sp2.yahoo.net/29/console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12438988/ZOOKEEPER-591_1.patch against trunk revision 924065. +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 5 new or modified tests. +1 javadoc. The javadoc tool did not generate any warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 findbugs. The patch does not introduce any new Findbugs warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. -1 core tests. The patch failed core unit tests. +1 contrib tests. The patch passed contrib unit tests. Test results: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h1.grid.sp2.yahoo.net/29/testReport/ Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h1.grid.sp2.yahoo.net/29/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Console output: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h1.grid.sp2.yahoo.net/29/console This message is automatically generated.
        Hide
        Hudson added a comment -

        Integrated in ZooKeeper-trunk #754 (See http://hudson.zones.apache.org/hudson/job/ZooKeeper-trunk/754/)
        . The C Client cannot exit properly in some situation (mahadev)

        Show
        Hudson added a comment - Integrated in ZooKeeper-trunk #754 (See http://hudson.zones.apache.org/hudson/job/ZooKeeper-trunk/754/ ) . The C Client cannot exit properly in some situation (mahadev)
        Hide
        Mahadev konar added a comment -

        this patch should fix the hang. The return code was wrong in queue_completions() which made calls hang!

        Show
        Mahadev konar added a comment - this patch should fix the hang. The return code was wrong in queue_completions() which made calls hang!
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12439082/ZOOKEEPER-591_2.patch
        against trunk revision 924147.

        +1 @author. The patch does not contain any @author tags.

        -1 tests included. The patch doesn't appear to include any new or modified tests.
        Please justify why no tests are needed for this patch.

        +1 javadoc. The javadoc tool did not generate any warning messages.

        +1 javac. The applied patch does not increase the total number of javac compiler warnings.

        +1 findbugs. The patch does not introduce any new Findbugs warnings.

        +1 release audit. The applied patch does not increase the total number of release audit warnings.

        +1 core tests. The patch passed core unit tests.

        +1 contrib tests. The patch passed contrib unit tests.

        Test results: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h1.grid.sp2.yahoo.net/30/testReport/
        Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h1.grid.sp2.yahoo.net/30/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
        Console output: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h1.grid.sp2.yahoo.net/30/console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12439082/ZOOKEEPER-591_2.patch against trunk revision 924147. +1 @author. The patch does not contain any @author tags. -1 tests included. The patch doesn't appear to include any new or modified tests. Please justify why no tests are needed for this patch. +1 javadoc. The javadoc tool did not generate any warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 findbugs. The patch does not introduce any new Findbugs warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. +1 core tests. The patch passed core unit tests. +1 contrib tests. The patch passed contrib unit tests. Test results: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h1.grid.sp2.yahoo.net/30/testReport/ Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h1.grid.sp2.yahoo.net/30/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Console output: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h1.grid.sp2.yahoo.net/30/console This message is automatically generated.
        Hide
        Hudson added a comment -

        Integrated in ZooKeeper-trunk #755 (See http://hudson.zones.apache.org/hudson/job/ZooKeeper-trunk/755/)
        . The C Client cannot exit properly in some situation

        Show
        Hudson added a comment - Integrated in ZooKeeper-trunk #755 (See http://hudson.zones.apache.org/hudson/job/ZooKeeper-trunk/755/ ) . The C Client cannot exit properly in some situation
        Hide
        Patrick Hunt added a comment -

        +1 on the latest patch. This seems to address the issue, no longer hanging on my machine, also not hanging on some other systems I tested (was hanging before). Great job Mahadev!

        Show
        Patrick Hunt added a comment - +1 on the latest patch. This seems to address the issue, no longer hanging on my machine, also not hanging on some other systems I tested (was hanging before). Great job Mahadev!

          People

          • Assignee:
            Mahadev konar
            Reporter:
            Qian Ye
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development