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



[jira] Commented: (ZOOKEEPER-507) BookKeeper client re-write

2010-01-17 Thread Hadoop QA (JIRA)

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

Hadoop QA commented on ZOOKEEPER-507:
-

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

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

+1 tests included.  The patch appears to include 27 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-h8.grid.sp2.yahoo.net/107/testReport/
Findbugs warnings: 
http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h8.grid.sp2.yahoo.net/107/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Console output: 
http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h8.grid.sp2.yahoo.net/107/console

This message is automatically generated.

> BookKeeper client re-write
> --
>
> Key: ZOOKEEPER-507
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-507
> Project: Zookeeper
>  Issue Type: Improvement
>  Components: contrib-bookkeeper
>Reporter: Flavio Paiva Junqueira
>Assignee: Utkarsh Srivastava
> Attachments: BookieFailureTest-log-507.rtf, ZOOKEEPER-507.patch, 
> ZOOKEEPER-507.patch, ZOOKEEPER-507.patch, ZOOKEEPER-507.patch
>
>
> Error handling is far from ideal currently in the BookKeeper client.

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



[jira] Updated: (ZOOKEEPER-507) BookKeeper client re-write

2010-01-17 Thread Utkarsh Srivastava (JIRA)

 [ 
https://issues.apache.org/jira/browse/ZOOKEEPER-507?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Utkarsh Srivastava updated ZOOKEEPER-507:
-

Attachment: ZOOKEEPER-507.patch

> BookKeeper client re-write
> --
>
> Key: ZOOKEEPER-507
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-507
> Project: Zookeeper
>  Issue Type: Improvement
>  Components: contrib-bookkeeper
>Reporter: Flavio Paiva Junqueira
>Assignee: Utkarsh Srivastava
> Attachments: BookieFailureTest-log-507.rtf, ZOOKEEPER-507.patch, 
> ZOOKEEPER-507.patch, ZOOKEEPER-507.patch, ZOOKEEPER-507.patch
>
>
> Error handling is far from ideal currently in the BookKeeper client.

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



[jira] Updated: (ZOOKEEPER-507) BookKeeper client re-write

2010-01-17 Thread Utkarsh Srivastava (JIRA)

 [ 
https://issues.apache.org/jira/browse/ZOOKEEPER-507?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Utkarsh Srivastava updated ZOOKEEPER-507:
-

Status: Patch Available  (was: Open)

Added documentation to user-facing classes. Made all the remaining 
non-user-facing classes package public.

> BookKeeper client re-write
> --
>
> Key: ZOOKEEPER-507
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-507
> Project: Zookeeper
>  Issue Type: Improvement
>  Components: contrib-bookkeeper
>Reporter: Flavio Paiva Junqueira
>Assignee: Utkarsh Srivastava
> Attachments: BookieFailureTest-log-507.rtf, ZOOKEEPER-507.patch, 
> ZOOKEEPER-507.patch, ZOOKEEPER-507.patch
>
>
> Error handling is far from ideal currently in the BookKeeper client.

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



[jira] Commented: (ZOOKEEPER-612) Make Zookeeper C client can be compiled by gcc of early version

2010-01-17 Thread Mahadev konar (JIRA)

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

Mahadev konar commented on ZOOKEEPER-612:
-

sorry, I meant Qian :)

> Make Zookeeper C client can be compiled by gcc of early version
> ---
>
> Key: ZOOKEEPER-612
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-612
> Project: Zookeeper
>  Issue Type: Improvement
>  Components: c client
>Affects Versions: 3.2.1
> Environment: Linux
>Reporter: Qian Ye
>Assignee: Qian Ye
> Fix For: 3.3.0
>
> Attachments: patch, patch, ZOOKEEPER-612.patch
>
>
> The original C Client, Version 3.2.1, cannot be compiled successfully by the 
> gcc of early version, due some declaration restriction. To compile the source 
> code on the server with gcc of early version, I made some modification on the 
> original source. What's more, some extra codes are added to make the client 
> be compatible with the hosts list format: ip1:port1, ip2:port2... There is 
> often a space after this kind of comma.

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



[jira] Commented: (ZOOKEEPER-612) Make Zookeeper C client can be compiled by gcc of early version

2010-01-17 Thread Mahadev konar (JIRA)

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

Mahadev konar commented on ZOOKEEPER-612:
-

steven, 
 yes you are right. you will have to create a patch against trunk.

> Make Zookeeper C client can be compiled by gcc of early version
> ---
>
> Key: ZOOKEEPER-612
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-612
> Project: Zookeeper
>  Issue Type: Improvement
>  Components: c client
>Affects Versions: 3.2.1
> Environment: Linux
>Reporter: Qian Ye
>Assignee: Qian Ye
> Fix For: 3.3.0
>
> Attachments: patch, patch, ZOOKEEPER-612.patch
>
>
> The original C Client, Version 3.2.1, cannot be compiled successfully by the 
> gcc of early version, due some declaration restriction. To compile the source 
> code on the server with gcc of early version, I made some modification on the 
> original source. What's more, some extra codes are added to make the client 
> be compatible with the hosts list format: ip1:port1, ip2:port2... There is 
> often a space after this kind of comma.

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



[jira] Created: (ZOOKEEPER-649) testObserver timed out once on Hudson

2010-01-17 Thread Henry Robinson (JIRA)
testObserver timed out once on Hudson
-

 Key: ZOOKEEPER-649
 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-649
 Project: Zookeeper
  Issue Type: Bug
  Components: quorum
Affects Versions: 3.3.0
Reporter: Henry Robinson
Assignee: Henry Robinson
Priority: Minor
 Fix For: 3.3.0


See 
http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-h8.grid.sp2.yahoo.net/105/testReport/org.apache.zookeeper.test/ObserverTest/testObserver/
 - test has only failed once and is hard to reproduce, so am waiting for more 
data. 

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



[jira] Commented: (ZOOKEEPER-608) Receipt of ACK from observer should not be logged as ERROR

2010-01-17 Thread Henry Robinson (JIRA)

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

Henry Robinson commented on ZOOKEEPER-608:
--

Flavio - 

Observers send two ACKs each during the synchronisation protocol with the 
leader. These are legitimate responses so that the Leader can know that they're 
properly synced. We can potentially remove them, but it seems like more trouble 
than it's worth. 

I don't mind removing these debug messages, but I feel like they could be 
helpful if we do some Observers development in the future to verify any changes 
to the protocol. Happy to take them out though.

We can open a JIRA for the testObservers hang, and I will take a look. I can't 
reproduce the failure but if it happens again, it'll be good to have somewhere 
to track it. 

Henry


> Receipt of ACK from observer should not be logged as ERROR
> --
>
> Key: ZOOKEEPER-608
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-608
> Project: Zookeeper
>  Issue Type: Improvement
>Affects Versions: 3.3.0
>Reporter: Henry Robinson
>Assignee: Henry Robinson
>Priority: Critical
> Fix For: 3.3.0
>
> Attachments: ZOOKEEPER-608.patch
>
>
> Observers - in general - don't send ACKs. But a couple of times they need to. 
> Currently, these are all logged as an ERROR, which is wrong. They should at 
> most be WARN (and this would probably be confusing to the user). INFO might 
> be better. 

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



[jira] Created: (ZOOKEEPER-648) Fix releaseaudit warning count to zero

2010-01-17 Thread Giridharan Kesavan (JIRA)
Fix releaseaudit warning count to zero
--

 Key: ZOOKEEPER-648
 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-648
 Project: Zookeeper
  Issue Type: Improvement
  Components: build
Reporter: Giridharan Kesavan


ant releaseaudit -Dforrest.home=<> -Djava5.home=<>
200 unknown license should be updated with Apache License headers  

releaseaudit:
 [java]
 [java] *
 [java] Summary
 [java] ---
 [java] Notes: 57
 [java] Binaries: 95
 [java] Archives: 16
 [java] Standards: 954
 [java]
 [java] Apache Licensed: 610
 [java] Generated Documents: 144
 [java]
 [java] JavaDocs are generated and so license header is optional
 [java] Generated files do not required license headers
 [java]
 [java] 200 Unknown Licenses
 [java]
 [java] ***

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



Build failed in Hudson: ZooKeeper-trunk #669

2010-01-17 Thread Apache Hudson Server
See 

--
[...truncated 124687 lines...]
[junit] 2010-01-17 10:43:12,544 - INFO  [Snapshot 
Thread:filetxnsnap...@208] - Snapshotting: 20763
[junit] 2010-01-17 10:43:12,585 - INFO  [Snapshot 
Thread:filetxnsnap...@208] - Snapshotting: 2076d
[junit] 2010-01-17 10:43:12,755 - INFO  [Snapshot 
Thread:filetxnsnap...@208] - Snapshotting: 207a0
[junit] 2010-01-17 10:43:12,758 - INFO  [Snapshot 
Thread:filetxnsnap...@208] - Snapshotting: 207a1
[junit] 2010-01-17 10:43:12,776 - INFO  [Snapshot 
Thread:filetxnsnap...@208] - Snapshotting: 207a3
[junit] 2010-01-17 10:43:12,834 - INFO  [Snapshot 
Thread:filetxnsnap...@208] - Snapshotting: 207a6
[junit] 2010-01-17 10:43:12,959 - INFO  
[ProcessThread:-1:preprequestproces...@385] - Processed session termination for 
sessionid: 0x3263be0e079
[junit] 2010-01-17 10:43:12,962 - INFO  [main:zookee...@525] - Session: 
0x3263be0e079 closed
[junit] 2010-01-17 10:43:12,962 - INFO  [main:follo...@166] - shutdown 
called
[junit] java.lang.Exception: shutdown Follower
[junit] at 
org.apache.zookeeper.server.quorum.Follower.shutdown(Follower.java:166)
[junit] at 
org.apache.zookeeper.server.quorum.QuorumPeer.shutdown(QuorumPeer.java:668)
[junit] at 
org.apache.zookeeper.test.ZkDatabaseCorruptionTest.testCorruption(ZkDatabaseCorruptionTest.java:125)
[junit] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[junit] at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[junit] at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[junit] at java.lang.reflect.Method.invoke(Method.java:597)
[junit] at junit.framework.TestCase.runTest(TestCase.java:168)
[junit] at junit.framework.TestCase.runBare(TestCase.java:134)
[junit] at junit.framework.TestResult$1.protect(TestResult.java:110)
[junit] at junit.framework.TestResult.runProtected(TestResult.java:128)
[junit] at junit.framework.TestResult.run(TestResult.java:113)
[junit] at junit.framework.TestCase.run(TestCase.java:124)
[junit] at junit.framework.TestSuite.runTest(TestSuite.java:232)
[junit] at junit.framework.TestSuite.run(TestSuite.java:227)
[junit] at 
org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
[junit] at 
junit.framework.JUnit4TestAdapter.run(JUnit4TestAdapter.java:39)
[junit] at 
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:421)
[junit] at 
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:912)
[junit] at 
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:766)
[junit] 2010-01-17 10:43:12,963 - WARN  
[NIOServerCxn.Factory:11225:nioserverc...@581] - EndOfStreamException: Unable 
to read additional data from client sessionid 0x3263be0e079, likely client 
has closed socket
[junit] 2010-01-17 10:43:12,963 - INFO  
[CommitProcessor:1:commitproces...@148] - CommitProcessor exited loop!
[junit] 2010-01-17 10:43:12,963 - INFO  
[FollowerRequestProcessor:1:followerrequestproces...@93] - 
FollowerRequestProcessor exited loop!
[junit] 2010-01-17 10:43:12,963 - INFO  [main:finalrequestproces...@366] - 
shutdown of request processor complete
[junit] 2010-01-17 10:43:12,964 - INFO  
[NIOServerCxn.Factory:11225:nioserverc...@995] - Closed socket connection for 
client /127.0.0.1:56881 which had sessionid 0x3263be0e079
[junit] 2010-01-17 10:43:12,965 - INFO  
[SyncThread:1:syncrequestproces...@151] - SyncRequestProcessor exited!
[junit] 2010-01-17 10:43:12,965 - INFO  
[NIOServerCxn.Factory:11223:nioservercnxn$fact...@264] - NIOServerCnxn factory 
exited run method
[junit] 2010-01-17 10:43:12,965 - INFO  [main:follo...@166] - shutdown 
called
[junit] java.lang.Exception: shutdown Follower
[junit] at 
org.apache.zookeeper.server.quorum.Follower.shutdown(Follower.java:166)
[junit] at 
org.apache.zookeeper.server.quorum.QuorumPeer.shutdown(QuorumPeer.java:668)
[junit] at 
org.apache.zookeeper.test.ZkDatabaseCorruptionTest.testCorruption(ZkDatabaseCorruptionTest.java:126)
[junit] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[junit] at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[junit] at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[junit] at java.lang.reflect.Method.invoke(Method.java:597)
[junit] at junit.framework.TestCase.runTest(TestCase.java:168)
[junit] at junit.framework.TestCase.runBare(TestCase.java:134)
[junit] at junit.framework.TestResult$1.protect(TestResult.java:110)

[jira] Commented: (ZOOKEEPER-612) Make Zookeeper C client can be compiled by gcc of early version

2010-01-17 Thread Qian Ye (JIRA)

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

Qian Ye commented on ZOOKEEPER-612:
---

Is that because I didn't make the patch based on the latest svn chunk version? 
Should I make a new patch based on it?

> Make Zookeeper C client can be compiled by gcc of early version
> ---
>
> Key: ZOOKEEPER-612
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-612
> Project: Zookeeper
>  Issue Type: Improvement
>  Components: c client
>Affects Versions: 3.2.1
> Environment: Linux
>Reporter: Qian Ye
>Assignee: Qian Ye
> Fix For: 3.3.0
>
> Attachments: patch, patch, ZOOKEEPER-612.patch
>
>
> The original C Client, Version 3.2.1, cannot be compiled successfully by the 
> gcc of early version, due some declaration restriction. To compile the source 
> code on the server with gcc of early version, I made some modification on the 
> original source. What's more, some extra codes are added to make the client 
> be compatible with the hosts list format: ip1:port1, ip2:port2... There is 
> often a space after this kind of comma.

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