[jira] Commented: (ZOOKEEPER-591) The C Client cannot exit properly in some situation

2010-03-17 Thread Hudson (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-591?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12846624#action_12846624
 ] 

Hudson commented on ZOOKEEPER-591:
--

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


> The C Client cannot exit properly in some situation
> ---
>
> Key: ZOOKEEPER-591
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-591
> Project: Zookeeper
>  Issue Type: Bug
>  Components: c client
>Affects Versions: 3.2.1
> 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 
>Reporter: Qian Ye
>Assignee: Mahadev konar
>Priority: Blocker
> Fix For: 3.3.0
>
> Attachments: ZOOKEEPER-591.patch, ZOOKEEPER-591.patch, 
> ZOOKEEPER-591.patch, ZOOKEEPER-591.patch, ZOOKEEPER-591_1.patch, 
> ZOOKEEPER-591_1.patch, ZOOKEEPER-591_1.patch, ZOOKEEPER-591_2.patch, zootest.c
>
>
> 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, 3, 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  0x00302b806ffb in pthread_join () from /lib64/tls/libpthread.so.0
> #1  0x0040de3b in adaptor_finish (zh=0x515b60) at src/mt_adaptor.c:219
> #2  0x004060ba in zookeeper_close (zh=0x515b60) at 
> src/zookeeper.c:2100
> #3  0x0040220b 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  0x00302b8089aa 
> in pthread_cond_wait@@GLIBC_2.3.2 ()
>from /lib64/tls/libpthread.so.0
> (gdb) bt
> #0  0x00302b8089aa in pthread_cond_wait@@GLIBC_2.3.2 () from 
> /lib64/tls/libpthread.so.0
> #1  0x0040d88b in wait_sync_completion (sc=0x5167f0) at 
> src/mt_adaptor.c:82
> #2  0x004082c9 in zoo_wget_children (zh=0x515b60, path=0x40ebc0 
> "/mytest", watcher=0x401fd8 , watcherCtx=Variable 
> "watcherCtx" is not available.)
> at src/zookeeper.c:2884
> #3  0x00402037 in default_zoo_watcher ()
> #4  0x0040d664 in deliverWatchers (zh=0x515b60, type=4, state=3, 
> path=0x515100 "/mytest", list=0x5177d8) at src/zk_hashtable.c:274
> #5  0x00403861 in process_completions (zh=0x515b60) at 
> src/zookeeper.c:1631
> #6  0x0040e1b5 in do_completion (v=Variable "v" is not available.) at 
> src/mt_adaptor.c:333
> #7  0x00302b80610a in start_thread () from /lib64/tls/libpthread.so.0
> #8  0x00302afc6003 in clone () from /lib64/tls/libc.so.6
> #9  0x in ?? ()
> here, a deadlock presents.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (ZOOKEEPER-591) The C Client cannot exit properly in some situation

2010-03-17 Thread Hadoop QA (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-591?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12846607#action_12846607
 ] 

Hadoop QA commented on ZOOKEEPER-591:
-

-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.

> The C Client cannot exit properly in some situation
> ---
>
> Key: ZOOKEEPER-591
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-591
> Project: Zookeeper
>  Issue Type: Bug
>  Components: c client
>Affects Versions: 3.2.1
> 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 
>Reporter: Qian Ye
>Assignee: Mahadev konar
>Priority: Blocker
> Fix For: 3.3.0
>
> Attachments: ZOOKEEPER-591.patch, ZOOKEEPER-591.patch, 
> ZOOKEEPER-591.patch, ZOOKEEPER-591.patch, ZOOKEEPER-591_1.patch, 
> ZOOKEEPER-591_1.patch, ZOOKEEPER-591_1.patch, ZOOKEEPER-591_2.patch, zootest.c
>
>
> 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, 3, 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  0x00302b806ffb in pthread_join () from /lib64/tls/libpthread.so.0
> #1  0x0040de3b in adaptor_finish (zh=0x515b60) at src/mt_adaptor.c:219
> #2  0x004060ba in zookeeper_close (zh=0x515b60) at 
> src/zookeeper.c:2100
> #3  0x0040220b 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  0x00302b8089aa 
> in pthread_cond_wait@@GLIBC_2.3.2 ()
>from /lib64/tls/libpthread.so.0
> (gdb) bt
> #0  0x00302b8089aa in pthread_cond_wait@@GLIBC_2.3.2 () from 
> /lib64/tls/libpthread.so.0
> #1  0x0040d88b in wait_sync_completion (sc=0x5167f0) at 
> src/mt_adaptor.c:82
> #2  0x004082c9 in zoo_wget_children (zh=0x515b60, path=0x40ebc0 
> "/mytest", watcher=0x401fd8 , watcherCtx=Variable 
> "watcherCtx" is not available.)
> at src/zookeeper.c:

[jira] Commented: (ZOOKEEPER-591) The C Client cannot exit properly in some situation

2010-03-17 Thread Hudson (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-591?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12846376#action_12846376
 ] 

Hudson commented on ZOOKEEPER-591:
--

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)


> The C Client cannot exit properly in some situation
> ---
>
> Key: ZOOKEEPER-591
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-591
> Project: Zookeeper
>  Issue Type: Bug
>  Components: c client
>Affects Versions: 3.2.1
> 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 
>Reporter: Qian Ye
>Assignee: Mahadev konar
>Priority: Blocker
> Fix For: 3.3.0
>
> Attachments: ZOOKEEPER-591.patch, ZOOKEEPER-591.patch, 
> ZOOKEEPER-591.patch, ZOOKEEPER-591.patch, ZOOKEEPER-591_1.patch, 
> ZOOKEEPER-591_1.patch, ZOOKEEPER-591_1.patch, zootest.c
>
>
> 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, 3, 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  0x00302b806ffb in pthread_join () from /lib64/tls/libpthread.so.0
> #1  0x0040de3b in adaptor_finish (zh=0x515b60) at src/mt_adaptor.c:219
> #2  0x004060ba in zookeeper_close (zh=0x515b60) at 
> src/zookeeper.c:2100
> #3  0x0040220b 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  0x00302b8089aa 
> in pthread_cond_wait@@GLIBC_2.3.2 ()
>from /lib64/tls/libpthread.so.0
> (gdb) bt
> #0  0x00302b8089aa in pthread_cond_wait@@GLIBC_2.3.2 () from 
> /lib64/tls/libpthread.so.0
> #1  0x0040d88b in wait_sync_completion (sc=0x5167f0) at 
> src/mt_adaptor.c:82
> #2  0x004082c9 in zoo_wget_children (zh=0x515b60, path=0x40ebc0 
> "/mytest", watcher=0x401fd8 , watcherCtx=Variable 
> "watcherCtx" is not available.)
> at src/zookeeper.c:2884
> #3  0x00402037 in default_zoo_watcher ()
> #4  0x0040d664 in deliverWatchers (zh=0x515b60, type=4, state=3, 
> path=0x515100 "/mytest", list=0x5177d8) at src/zk_hashtable.c:274
> #5  0x00403861 in process_completions (zh=0x515b60) at 
> src/zookeeper.c:1631
> #6  0x0040e1b5 in do_completion (v=Variable "v" is not available.) at 
> src/mt_adaptor.c:333
> #7  0x00302b80610a in start_thread () from /lib64/tls/libpthread.so.0
> #8  0x00302afc6003 in clone () from /lib64/tls/libc.so.6
> #9  0x in ?? ()
> here, a deadlock presents.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (ZOOKEEPER-591) The C Client cannot exit properly in some situation

2010-03-17 Thread Hadoop QA (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-591?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12846324#action_12846324
 ] 

Hadoop QA commented on ZOOKEEPER-591:
-

-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.

> The C Client cannot exit properly in some situation
> ---
>
> Key: ZOOKEEPER-591
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-591
> Project: Zookeeper
>  Issue Type: Bug
>  Components: c client
>Affects Versions: 3.2.1
> 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 
>Reporter: Qian Ye
>Assignee: Mahadev konar
>Priority: Blocker
> Fix For: 3.3.0
>
> Attachments: ZOOKEEPER-591.patch, ZOOKEEPER-591.patch, 
> ZOOKEEPER-591.patch, ZOOKEEPER-591.patch, ZOOKEEPER-591_1.patch, 
> ZOOKEEPER-591_1.patch, ZOOKEEPER-591_1.patch, zootest.c
>
>
> 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, 3, 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  0x00302b806ffb in pthread_join () from /lib64/tls/libpthread.so.0
> #1  0x0040de3b in adaptor_finish (zh=0x515b60) at src/mt_adaptor.c:219
> #2  0x004060ba in zookeeper_close (zh=0x515b60) at 
> src/zookeeper.c:2100
> #3  0x0040220b 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  0x00302b8089aa 
> in pthread_cond_wait@@GLIBC_2.3.2 ()
>from /lib64/tls/libpthread.so.0
> (gdb) bt
> #0  0x00302b8089aa in pthread_cond_wait@@GLIBC_2.3.2 () from 
> /lib64/tls/libpthread.so.0
> #1  0x0040d88b in wait_sync_completion (sc=0x5167f0) at 
> src/mt_adaptor.c:82
> #2  0x004082c9 in zoo_wget_children (zh=0x515b60, path=0x40ebc0 
> "/mytest", watcher=0x401fd8 , watcherCtx=Variable 
> "watcherCtx" is not available.)
> at src/zookeeper.c:2884
> #3  0x00402037 in default_zoo_watcher ()
> #4  0x0040d664 in deliverWatchers (zh=0x515b60

[jira] Commented: (ZOOKEEPER-591) The C Client cannot exit properly in some situation

2010-03-11 Thread Qian Ye (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-591?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12844391#action_12844391
 ] 

Qian Ye commented on ZOOKEEPER-591:
---

This patch works for me, thx mahadev

> The C Client cannot exit properly in some situation
> ---
>
> Key: ZOOKEEPER-591
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-591
> Project: Zookeeper
>  Issue Type: Bug
>  Components: c client
>Affects Versions: 3.2.1
> 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 
>Reporter: Qian Ye
>Assignee: Mahadev konar
>Priority: Blocker
> Fix For: 3.3.0
>
> Attachments: ZOOKEEPER-591.patch, ZOOKEEPER-591.patch, 
> ZOOKEEPER-591.patch, ZOOKEEPER-591.patch, zootest.c
>
>
> 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, 3, 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  0x00302b806ffb in pthread_join () from /lib64/tls/libpthread.so.0
> #1  0x0040de3b in adaptor_finish (zh=0x515b60) at src/mt_adaptor.c:219
> #2  0x004060ba in zookeeper_close (zh=0x515b60) at 
> src/zookeeper.c:2100
> #3  0x0040220b 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  0x00302b8089aa 
> in pthread_cond_wait@@GLIBC_2.3.2 ()
>from /lib64/tls/libpthread.so.0
> (gdb) bt
> #0  0x00302b8089aa in pthread_cond_wait@@GLIBC_2.3.2 () from 
> /lib64/tls/libpthread.so.0
> #1  0x0040d88b in wait_sync_completion (sc=0x5167f0) at 
> src/mt_adaptor.c:82
> #2  0x004082c9 in zoo_wget_children (zh=0x515b60, path=0x40ebc0 
> "/mytest", watcher=0x401fd8 , watcherCtx=Variable 
> "watcherCtx" is not available.)
> at src/zookeeper.c:2884
> #3  0x00402037 in default_zoo_watcher ()
> #4  0x0040d664 in deliverWatchers (zh=0x515b60, type=4, state=3, 
> path=0x515100 "/mytest", list=0x5177d8) at src/zk_hashtable.c:274
> #5  0x00403861 in process_completions (zh=0x515b60) at 
> src/zookeeper.c:1631
> #6  0x0040e1b5 in do_completion (v=Variable "v" is not available.) at 
> src/mt_adaptor.c:333
> #7  0x00302b80610a in start_thread () from /lib64/tls/libpthread.so.0
> #8  0x00302afc6003 in clone () from /lib64/tls/libc.so.6
> #9  0x in ?? ()
> here, a deadlock presents.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (ZOOKEEPER-591) The C Client cannot exit properly in some situation

2010-03-11 Thread Hadoop QA (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-591?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12844263#action_12844263
 ] 

Hadoop QA commented on ZOOKEEPER-591:
-

+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.

> The C Client cannot exit properly in some situation
> ---
>
> Key: ZOOKEEPER-591
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-591
> Project: Zookeeper
>  Issue Type: Bug
>  Components: c client
>Affects Versions: 3.2.1
> 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 
>Reporter: Qian Ye
>Assignee: Mahadev konar
>Priority: Blocker
> Fix For: 3.3.0
>
> Attachments: ZOOKEEPER-591.patch, ZOOKEEPER-591.patch, 
> ZOOKEEPER-591.patch, ZOOKEEPER-591.patch, zootest.c
>
>
> 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, 3, 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  0x00302b806ffb in pthread_join () from /lib64/tls/libpthread.so.0
> #1  0x0040de3b in adaptor_finish (zh=0x515b60) at src/mt_adaptor.c:219
> #2  0x004060ba in zookeeper_close (zh=0x515b60) at 
> src/zookeeper.c:2100
> #3  0x0040220b 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  0x00302b8089aa 
> in pthread_cond_wait@@GLIBC_2.3.2 ()
>from /lib64/tls/libpthread.so.0
> (gdb) bt
> #0  0x00302b8089aa in pthread_cond_wait@@GLIBC_2.3.2 () from 
> /lib64/tls/libpthread.so.0
> #1  0x0040d88b in wait_sync_completion (sc=0x5167f0) at 
> src/mt_adaptor.c:82
> #2  0x004082c9 in zoo_wget_children (zh=0x515b60, path=0x40ebc0 
> "/mytest", watcher=0x401fd8 , watcherCtx=Variable 
> "watcherCtx" is not available.)
> at src/zookeeper.c:2884
> #3  0x00402037 in default_zoo_watcher ()
> #4  0x0040d664 in deliverWatchers (zh=0x515b60, type=4, state=3, 
> path=0x515100 "/mytest", list=0x5177d8) at src/zk_ha

[jira] Commented: (ZOOKEEPER-591) The C Client cannot exit properly in some situation

2010-03-11 Thread Hadoop QA (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-591?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12844245#action_12844245
 ] 

Hadoop QA commented on ZOOKEEPER-591:
-

-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.

> The C Client cannot exit properly in some situation
> ---
>
> Key: ZOOKEEPER-591
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-591
> Project: Zookeeper
>  Issue Type: Bug
>  Components: c client
>Affects Versions: 3.2.1
> 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 
>Reporter: Qian Ye
>Assignee: Mahadev konar
>Priority: Blocker
> Fix For: 3.3.0
>
> Attachments: ZOOKEEPER-591.patch, ZOOKEEPER-591.patch, 
> ZOOKEEPER-591.patch, zootest.c
>
>
> 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, 3, 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  0x00302b806ffb in pthread_join () from /lib64/tls/libpthread.so.0
> #1  0x0040de3b in adaptor_finish (zh=0x515b60) at src/mt_adaptor.c:219
> #2  0x004060ba in zookeeper_close (zh=0x515b60) at 
> src/zookeeper.c:2100
> #3  0x0040220b 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  0x00302b8089aa 
> in pthread_cond_wait@@GLIBC_2.3.2 ()
>from /lib64/tls/libpthread.so.0
> (gdb) bt
> #0  0x00302b8089aa in pthread_cond_wait@@GLIBC_2.3.2 () from 
> /lib64/tls/libpthread.so.0
> #1  0x0040d88b in wait_sync_completion (sc=0x5167f0) at 
> src/mt_adaptor.c:82
> #2  0x004082c9 in zoo_wget_children (zh=0x515b60, path=0x40ebc0 
> "/mytest", watcher=0x401fd8 , watcherCtx=Variable 
> "watcherCtx" is not available.)
> at src/zookeeper.c:2884
> #3  0x00402037 in default_zoo_watcher ()
> #4  0x0040d664 in deliverWatchers (zh=0x515b60, type

[jira] Commented: (ZOOKEEPER-591) The C Client cannot exit properly in some situation

2010-03-11 Thread Mahadev konar (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-591?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12844181#action_12844181
 ] 

Mahadev konar commented on ZOOKEEPER-591:
-

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

> The C Client cannot exit properly in some situation
> ---
>
> Key: ZOOKEEPER-591
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-591
> Project: Zookeeper
>  Issue Type: Bug
>  Components: c client
>Affects Versions: 3.2.1
> 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 
>Reporter: Qian Ye
>Assignee: Mahadev konar
>Priority: Blocker
> Fix For: 3.3.0
>
> Attachments: ZOOKEEPER-591.patch, ZOOKEEPER-591.patch, zootest.c
>
>
> 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, 3, 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  0x00302b806ffb in pthread_join () from /lib64/tls/libpthread.so.0
> #1  0x0040de3b in adaptor_finish (zh=0x515b60) at src/mt_adaptor.c:219
> #2  0x004060ba in zookeeper_close (zh=0x515b60) at 
> src/zookeeper.c:2100
> #3  0x0040220b 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  0x00302b8089aa 
> in pthread_cond_wait@@GLIBC_2.3.2 ()
>from /lib64/tls/libpthread.so.0
> (gdb) bt
> #0  0x00302b8089aa in pthread_cond_wait@@GLIBC_2.3.2 () from 
> /lib64/tls/libpthread.so.0
> #1  0x0040d88b in wait_sync_completion (sc=0x5167f0) at 
> src/mt_adaptor.c:82
> #2  0x004082c9 in zoo_wget_children (zh=0x515b60, path=0x40ebc0 
> "/mytest", watcher=0x401fd8 , watcherCtx=Variable 
> "watcherCtx" is not available.)
> at src/zookeeper.c:2884
> #3  0x00402037 in default_zoo_watcher ()
> #4  0x0040d664 in deliverWatchers (zh=0x515b60, type=4, state=3, 
> path=0x515100 "/mytest", list=0x5177d8) at src/zk_hashtable.c:274
> #5  0x00403861 in process_completions (zh=0x515b60) at 
> src/zookeeper.c:1631
> #6  0x0040e1b5 in do_completion (v=Variable "v" is not available.) at 
> src/mt_adaptor.c:333
> #7  0x00302b80610a in start_thread () from /lib64/tls/libpthread.so.0
> #8  0x00302afc6003 in clone () from /lib64/tls/libc.so.6
> #9  0x in ?? ()
> here, a deadlock presents.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (ZOOKEEPER-591) The C Client cannot exit properly in some situation

2010-03-11 Thread Patrick Hunt (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-591?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12844179#action_12844179
 ] 

Patrick Hunt commented on ZOOKEEPER-591:


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

> The C Client cannot exit properly in some situation
> ---
>
> Key: ZOOKEEPER-591
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-591
> Project: Zookeeper
>  Issue Type: Bug
>  Components: c client
>Affects Versions: 3.2.1
> 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 
>Reporter: Qian Ye
>Assignee: Mahadev konar
>Priority: Blocker
> Fix For: 3.3.0
>
> Attachments: ZOOKEEPER-591.patch, ZOOKEEPER-591.patch, zootest.c
>
>
> 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, 3, 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  0x00302b806ffb in pthread_join () from /lib64/tls/libpthread.so.0
> #1  0x0040de3b in adaptor_finish (zh=0x515b60) at src/mt_adaptor.c:219
> #2  0x004060ba in zookeeper_close (zh=0x515b60) at 
> src/zookeeper.c:2100
> #3  0x0040220b 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  0x00302b8089aa 
> in pthread_cond_wait@@GLIBC_2.3.2 ()
>from /lib64/tls/libpthread.so.0
> (gdb) bt
> #0  0x00302b8089aa in pthread_cond_wait@@GLIBC_2.3.2 () from 
> /lib64/tls/libpthread.so.0
> #1  0x0040d88b in wait_sync_completion (sc=0x5167f0) at 
> src/mt_adaptor.c:82
> #2  0x004082c9 in zoo_wget_children (zh=0x515b60, path=0x40ebc0 
> "/mytest", watcher=0x401fd8 , watcherCtx=Variable 
> "watcherCtx" is not available.)
> at src/zookeeper.c:2884
> #3  0x00402037 in default_zoo_watcher ()
> #4  0x0040d664 in deliverWatchers (zh=0x515b60, type=4, state=3, 
> path=0x515100 "/mytest", list=0x5177d8) at src/zk_hashtable.c:274
> #5  0x00403861 in process_completions (zh=0x515b60) at 
> src/zookeeper.c:1631
> #6  0x0040e1b5 in do_completion (v=Variable "v" is not available.) at 
> src/mt_adaptor.c:333
> #7  0x00302b80610a in start_thread () from /lib64/tls/libpthread.so.0
> #8  0x00302afc6003 in clone () from /lib64/tls/libc.so.6
> #9  0x in ?? ()
> here, a deadlock presents.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (ZOOKEEPER-591) The C Client cannot exit properly in some situation

2010-03-11 Thread Mahadev konar (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-591?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12844113#action_12844113
 ] 

Mahadev konar commented on ZOOKEEPER-591:
-

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



> The C Client cannot exit properly in some situation
> ---
>
> Key: ZOOKEEPER-591
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-591
> Project: Zookeeper
>  Issue Type: Bug
>  Components: c client
>Affects Versions: 3.2.1
> 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 
>Reporter: Qian Ye
>Assignee: Mahadev konar
>Priority: Blocker
> Fix For: 3.3.0
>
> Attachments: ZOOKEEPER-591.patch, ZOOKEEPER-591.patch
>
>
> 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, 3, 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  0x00302b806ffb in pthread_join () from /lib64/tls/libpthread.so.0
> #1  0x0040de3b in adaptor_finish (zh=0x515b60) at src/mt_adaptor.c:219
> #2  0x004060ba in zookeeper_close (zh=0x515b60) at 
> src/zookeeper.c:2100
> #3  0x0040220b 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  0x00302b8089aa 
> in pthread_cond_wait@@GLIBC_2.3.2 ()
>from /lib64/tls/libpthread.so.0
> (gdb) bt
> #0  0x00302b8089aa in pthread_cond_wait@@GLIBC_2.3.2 () from 
> /lib64/tls/libpthread.so.0
> #1  0x0040d88b in wait_sync_completion (sc=0x5167f0) at 
> src/mt_adaptor.c:82
> #2  0x004082c9 in zoo_wget_children (zh=0x515b60, path=0x40ebc0 
> "/mytest", watcher=0x401fd8 , watcherCtx=Variable 
> "watcherCtx" is not available.)
> at src/zookeeper.c:2884
> #3  0x00402037 in default_zoo_watcher ()
> #4  0x0040d664 in deliverWatchers (zh=0x515b60, type=4, state=3, 
> path=0x515100 "/mytest", list=0x5177d8) at src/zk_hashtable.c:274
> #5  0x00403861 in process_completions (zh=0x515b60) at 
> src/zookeeper.c:1631
> #6  0x0040e1b5 in do_completion (v=Variable "v" is not available.) at 
> src/mt_adaptor.c:333
> #7  0x00302b80610a in start_thread () from /lib64/tls/libpthread.so.0
> #8  0x00302afc6003 in clone () from /lib64/tls/libc.so.6
> #9  0x in ?? ()
> here, a deadlock presents.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (ZOOKEEPER-591) The C Client cannot exit properly in some situation

2010-03-10 Thread Qian Ye (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-591?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12843870#action_12843870
 ] 

Qian Ye commented on ZOOKEEPER-591:
---

 The process still hang there, Mahadev. 
(gdb) info thread
  2 Thread 1094719840 (LWP 31877)  0x00302b8089aa in 
pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/tls/libpthread.so.0
  1 Thread 182894113888 (LWP 31875)  0x00302b806ffb in pthread_join () from 
/lib64/tls/libpthread.so.0
(gdb) thread 1
[Switching to thread 1 (Thread 182894113888 (LWP 31875))]#0  0x00302b806ffb 
in pthread_join () from /lib64/tls/libpthread.so.0
(gdb) bt
#0  0x00302b806ffb in pthread_join () from /lib64/tls/libpthread.so.0
#1  0x0040de5b in adaptor_finish (zh=0x515b60) at src/mt_adaptor.c:218
#2  0x004060da in zookeeper_close (zh=0x515b60) at src/zookeeper.c:2109
#3  0x0040220b in main ()
(gdb) thread 2
[Switching to thread 2 (Thread 1094719840 (LWP 31877))]#0  0x00302b8089aa 
in pthread_cond_wait@@GLIBC_2.3.2 ()
   from /lib64/tls/libpthread.so.0
(gdb) bt
#0  0x00302b8089aa in pthread_cond_wait@@GLIBC_2.3.2 () from 
/lib64/tls/libpthread.so.0
#1  0x0040d8ab in wait_sync_completion (sc=0x5167f0) at 
src/mt_adaptor.c:82
#2  0x004082e9 in zoo_wget_children (zh=0x515b60, path=0x40ebe0 
"/mytest", watcher=0x401fd8 , watcherCtx=Variable 
"watcherCtx" is not available.
)
at src/zookeeper.c:2889
#3  0x00402037 in default_zoo_watcher ()
#4  0x0040d684 in deliverWatchers (zh=0x515b60, type=4, state=3, 
path=0x515100 "/mytest", list=0x2a95700b08) at src/zk_hashtable.c:271
#5  0x00403771 in process_completions (zh=0x515b60) at 
src/zookeeper.c:1623
#6  0x0040e1d5 in do_completion (v=Variable "v" is not available.
) at src/mt_adaptor.c:332
#7  0x00302b80610a in start_thread () from /lib64/tls/libpthread.so.0
#8  0x00302afc6003 in clone () from /lib64/tls/libc.so.6
#9  0x 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?

> The C Client cannot exit properly in some situation
> ---
>
> Key: ZOOKEEPER-591
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-591
> Project: Zookeeper
>  Issue Type: Bug
>  Components: c client
>Affects Versions: 3.2.1
> 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 
>Reporter: Qian Ye
>Assignee: Mahadev konar
>Priority: Blocker
> Fix For: 3.3.0
>
> Attachments: ZOOKEEPER-591.patch, ZOOKEEPER-591.patch
>
>
> 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, 3, 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  0x00302b806ffb in pthread_join () from /lib64/tls/libpthread.so.0
> #1  0x0040de3b in adaptor_finish (zh=0x515b60) at src/mt_adaptor.c:219
> #2  0x004060ba in zookeeper_close (zh=0x515b60) at 
> src/zookeeper.c:2100
> #3  0x0040220b 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  0x00302b8

[jira] Commented: (ZOOKEEPER-591) The C Client cannot exit properly in some situation

2010-03-10 Thread Hadoop QA (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-591?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12843789#action_12843789
 ] 

Hadoop QA commented on ZOOKEEPER-591:
-

-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.

> The C Client cannot exit properly in some situation
> ---
>
> Key: ZOOKEEPER-591
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-591
> Project: Zookeeper
>  Issue Type: Bug
>  Components: c client
>Affects Versions: 3.2.1
> 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 
>Reporter: Qian Ye
>Assignee: Mahadev konar
>Priority: Blocker
> Fix For: 3.3.0
>
> Attachments: ZOOKEEPER-591.patch, ZOOKEEPER-591.patch
>
>
> 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, 3, 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  0x00302b806ffb in pthread_join () from /lib64/tls/libpthread.so.0
> #1  0x0040de3b in adaptor_finish (zh=0x515b60) at src/mt_adaptor.c:219
> #2  0x004060ba in zookeeper_close (zh=0x515b60) at 
> src/zookeeper.c:2100
> #3  0x0040220b 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  0x00302b8089aa 
> in pthread_cond_wait@@GLIBC_2.3.2 ()
>from /lib64/tls/libpthread.so.0
> (gdb) bt
> #0  0x00302b8089aa in pthread_cond_wait@@GLIBC_2.3.2 () from 
> /lib64/tls/libpthread.so.0
> #1  0x0040d88b in wait_sync_completion (sc=0x5167f0) at 
> src/mt_adaptor.c:82
> #2  0x004082c9 in zoo_wget_children (zh=0x515b60, path=0x40ebc0 
> "/mytest", watcher=0x401fd8 , watcherCtx=Variable 
> "watcherCtx" is not available.)
> at src/zookeeper.c:2884
> #3  0x00402037 in default_zoo_watcher ()
> #4  0x0040d664 in deliverWatchers (zh=0x515b60, type=4, state=3, 
> path=0x515100 "/myt

[jira] Commented: (ZOOKEEPER-591) The C Client cannot exit properly in some situation

2010-03-09 Thread Qian Ye (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-591?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12843443#action_12843443
 ] 

Qian Ye commented on ZOOKEEPER-591:
---

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

(gdb) info thread
  2 Thread 1094719840 (LWP 13889)  0x00302b8089aa in 
pthread_cond_wait@@GLIBC_2.3.2 ()
   from /lib64/tls/libpthread.so.0
  1 Thread 182894113888 (LWP 13887)  0x00302b806ffb in pthread_join () from 
/lib64/tls/libpthread.so.0
(gdb) thread 1
[Switching to thread 1 (Thread 182894113888 (LWP 13887))]#0  0x00302b806ffb 
in pthread_join ()
   from /lib64/tls/libpthread.so.0
(gdb) bt
#0  0x00302b806ffb in pthread_join () from /lib64/tls/libpthread.so.0
#1  0x0040de2b in adaptor_finish (zh=0x515b60) at src/mt_adaptor.c:218
#2  0x004060aa in zookeeper_close (zh=0x515b60) at src/zookeeper.c:2086
#3  0x0040220b in main ()
(gdb) thread 2
[Switching to thread 2 (Thread 1094719840 (LWP 13889))]#0  0x00302b8089aa 
in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/tls/libpthread.so.0
(gdb) bt 
#0  0x00302b8089aa in pthread_cond_wait@@GLIBC_2.3.2 () from 
/lib64/tls/libpthread.so.0
#1  0x0040d87b in wait_sync_completion (sc=0x517850) at 
src/mt_adaptor.c:82
#2  0x004082b9 in zoo_wget_children (zh=0x515b60, path=0x40eba0 
"/mytest", 
watcher=0x401fd8 , watcherCtx=Variable "watcherCtx" is 
not available.
) at src/zookeeper.c:2866
#3  0x00402037 in default_zoo_watcher ()
#4  0x0040d654 in deliverWatchers (zh=0x515b60, type=4, state=3, 
path=0x516920 "/mytest", 
list=0x5177d8) at src/zk_hashtable.c:271
#5  0x00403871 in process_completions (zh=0x515b60) at 
src/zookeeper.c:1620
#6  0x0040e1a5 in do_completion (v=Variable "v" is not available.
) at src/mt_adaptor.c:332
#7  0x00302b80610a in start_thread () from /lib64/tls/libpthread.so.0
#8  0x00302afc6003 in clone () from /lib64/tls/libc.so.6
#9  0x in ?? ()


> The C Client cannot exit properly in some situation
> ---
>
> Key: ZOOKEEPER-591
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-591
> Project: Zookeeper
>  Issue Type: Bug
>  Components: c client
>Affects Versions: 3.2.1
> 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 
>Reporter: Qian Ye
>Assignee: Mahadev konar
>Priority: Critical
> Fix For: 3.3.0
>
> Attachments: ZOOKEEPER-591.patch
>
>
> 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, 3, 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  0x00302b806ffb in pthread_join () from /lib64/tls/libpthread.so.0
> #1  0x0040de3b in adaptor_finish (zh=0x515b60) at src/mt_adaptor.c:219
> #2  0x004060ba in zookeeper_close (zh=0x515b60) at 
> src/zookeeper.c:2100
> #3  0x0040220b 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  0x00302b8089aa 
> in pthread_cond_wait@@GLIBC_2.3.2 ()
>from /lib64/tls/libpthread.so.0
> (gdb) bt
> #0  0x00302b8089a

[jira] Commented: (ZOOKEEPER-591) The C Client cannot exit properly in some situation

2010-03-09 Thread Hadoop QA (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-591?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12843394#action_12843394
 ] 

Hadoop QA commented on ZOOKEEPER-591:
-

-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.

> The C Client cannot exit properly in some situation
> ---
>
> Key: ZOOKEEPER-591
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-591
> Project: Zookeeper
>  Issue Type: Bug
>  Components: c client
>Affects Versions: 3.2.1
> 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 
>Reporter: Qian Ye
>Assignee: Mahadev konar
>Priority: Critical
> Fix For: 3.3.0
>
> Attachments: ZOOKEEPER-591.patch
>
>
> 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, 3, 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  0x00302b806ffb in pthread_join () from /lib64/tls/libpthread.so.0
> #1  0x0040de3b in adaptor_finish (zh=0x515b60) at src/mt_adaptor.c:219
> #2  0x004060ba in zookeeper_close (zh=0x515b60) at 
> src/zookeeper.c:2100
> #3  0x0040220b 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  0x00302b8089aa 
> in pthread_cond_wait@@GLIBC_2.3.2 ()
>from /lib64/tls/libpthread.so.0
> (gdb) bt
> #0  0x00302b8089aa in pthread_cond_wait@@GLIBC_2.3.2 () from 
> /lib64/tls/libpthread.so.0
> #1  0x0040d88b in wait_sync_completion (sc=0x5167f0) at 
> src/mt_adaptor.c:82
> #2  0x004082c9 in zoo_wget_children (zh=0x515b60, path=0x40ebc0 
> "/mytest", watcher=0x401fd8 , watcherCtx=Variable 
> "watcherCtx" is not available.)
> at src/zookeeper.c:2884
> #3  0x00402037 in default_zoo_watcher ()
> #4  0x0040d664 in deliverWatchers (zh=0x515b60, type=4, state=3, 
> path=0x515100 "/mytest", list=0x5177d8) at

[jira] Commented: (ZOOKEEPER-591) The C Client cannot exit properly in some situation

2010-03-05 Thread Mahadev konar (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-591?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12841941#action_12841941
 ] 

Mahadev konar commented on ZOOKEEPER-591:
-

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

> The C Client cannot exit properly in some situation
> ---
>
> Key: ZOOKEEPER-591
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-591
> Project: Zookeeper
>  Issue Type: Bug
>  Components: c client
>Affects Versions: 3.2.1
> 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 
>Reporter: Qian Ye
>Assignee: Benjamin Reed
>Priority: Critical
> Fix For: 3.3.0
>
>
> 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, 3, 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  0x00302b806ffb in pthread_join () from /lib64/tls/libpthread.so.0
> #1  0x0040de3b in adaptor_finish (zh=0x515b60) at src/mt_adaptor.c:219
> #2  0x004060ba in zookeeper_close (zh=0x515b60) at 
> src/zookeeper.c:2100
> #3  0x0040220b 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  0x00302b8089aa 
> in pthread_cond_wait@@GLIBC_2.3.2 ()
>from /lib64/tls/libpthread.so.0
> (gdb) bt
> #0  0x00302b8089aa in pthread_cond_wait@@GLIBC_2.3.2 () from 
> /lib64/tls/libpthread.so.0
> #1  0x0040d88b in wait_sync_completion (sc=0x5167f0) at 
> src/mt_adaptor.c:82
> #2  0x004082c9 in zoo_wget_children (zh=0x515b60, path=0x40ebc0 
> "/mytest", watcher=0x401fd8 , watcherCtx=Variable 
> "watcherCtx" is not available.)
> at src/zookeeper.c:2884
> #3  0x00402037 in default_zoo_watcher ()
> #4  0x0040d664 in deliverWatchers (zh=0x515b60, type=4, state=3, 
> path=0x515100 "/mytest", list=0x5177d8) at src/zk_hashtable.c:274
> #5  0x00403861 in process_completions (zh=0x515b60) at 
> src/zookeeper.c:1631
> #6  0x0040e1b5 in do_completion (v=Variable "v" is not available.) at 
> src/mt_adaptor.c:333
> #7  0x00302b80610a in start_thread () from /lib64/tls/libpthread.so.0
> #8  0x00302afc6003 in clone () from /lib64/tls/libc.so.6
> #9  0x in ?? ()
> here, a deadlock presents.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (ZOOKEEPER-591) The C Client cannot exit properly in some situation

2010-01-17 Thread Qian Ye (JIRA)

[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-591?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12801661#action_12801661
 ] 

Qian Ye commented on ZOOKEEPER-591:
---

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?

> The C Client cannot exit properly in some situation
> ---
>
> Key: ZOOKEEPER-591
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-591
> Project: Zookeeper
>  Issue Type: Bug
>  Components: c client
>Affects Versions: 3.2.1
> 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 
>Reporter: Qian Ye
>
> 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, 3, 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  0x00302b806ffb in pthread_join () from /lib64/tls/libpthread.so.0
> #1  0x0040de3b in adaptor_finish (zh=0x515b60) at src/mt_adaptor.c:219
> #2  0x004060ba in zookeeper_close (zh=0x515b60) at 
> src/zookeeper.c:2100
> #3  0x0040220b 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  0x00302b8089aa 
> in pthread_cond_wait@@GLIBC_2.3.2 ()
>from /lib64/tls/libpthread.so.0
> (gdb) bt
> #0  0x00302b8089aa in pthread_cond_wait@@GLIBC_2.3.2 () from 
> /lib64/tls/libpthread.so.0
> #1  0x0040d88b in wait_sync_completion (sc=0x5167f0) at 
> src/mt_adaptor.c:82
> #2  0x004082c9 in zoo_wget_children (zh=0x515b60, path=0x40ebc0 
> "/mytest", watcher=0x401fd8 , watcherCtx=Variable 
> "watcherCtx" is not available.)
> at src/zookeeper.c:2884
> #3  0x00402037 in default_zoo_watcher ()
> #4  0x0040d664 in deliverWatchers (zh=0x515b60, type=4, state=3, 
> path=0x515100 "/mytest", list=0x5177d8) at src/zk_hashtable.c:274
> #5  0x00403861 in process_completions (zh=0x515b60) at 
> src/zookeeper.c:1631
> #6  0x0040e1b5 in do_completion (v=Variable "v" is not available.) at 
> src/mt_adaptor.c:333
> #7  0x00302b80610a in start_thread () from /lib64/tls/libpthread.so.0
> #8  0x00302afc6003 in clone () from /lib64/tls/libc.so.6
> #9  0x in ?? ()
> here, a deadlock presents.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.