50%-75% connection loss exceptions using zkpython
-------------------------------------------------

                 Key: ZOOKEEPER-676
                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-676
             Project: Zookeeper
          Issue Type: Bug
          Components: contrib, contrib-bindings
    Affects Versions: 3.2.2
         Environment: Mac OS X 10.5.8,   MacBook Air Intel Core 2 Duo @ 
1.86GHz, Python 2.5.1, ZooKeeper 3.2.2 Standalone
            Reporter: Josh Fraser


I get about 50-75% connection loss exceptions and about 10% Bus Error when 
using the contrib/zkpython zookeeper.so.  Below is the exception:

2010-02-21 
16:57:56,138:18481(0xb0081000):zoo_er...@handle_socket_error_msg@1359: Socket 
[fe80::1002:885:7f00:1:2181] zk retcode=-4, errno=47(Address family not 
supported by protocol family): connect() call failed
Traceback (most recent call last):
  File "./zksh.py", line 63, in <module>
2010-02-21 16:57:56,138:18481(0xb0081000):zoo_i...@check_events@1439: initiated 
connection to server [127.0.0.1:2181]
    zkcli.dispatch(cmd,*args)
  File "./zksh.py", line 56, in dispatch
    returned = run(*args)
  File "./zksh.py", line 48, in ls
    print "\n".join(self.cmd.listNode(node))
  File "/Users/josh/git/zktools/commands.py", line 22, in listNode
    for path in zookeeper.get_children(self.zk, node):
zookeeper.ConnectionLossException: connection loss

I've run this in gdb and have this backtrace:

#0  free_pywatcher (pw=0x0) at src/c/zookeeper.c:199
#1  0x0025ae09 in pyzoo_exists (self=0x0, args=0x0) at src/c/zookeeper.c:765
#2  0x0018f51e in PyEval_EvalFrameEx ()
#3  0x00191173 in PyEval_EvalCodeEx ()
#4  0x0013b488 in PyFunction_SetClosure ()
#5  0x00121505 in PyObject_Call ()
#6  0x0018fcd0 in PyEval_EvalFrameEx ()
#7  0x00191173 in PyEval_EvalCodeEx ()
#8  0x0013b488 in PyFunction_SetClosure ()
#9  0x00121505 in PyObject_Call ()
#10 0x0018fcd0 in PyEval_EvalFrameEx ()
#11 0x00191173 in PyEval_EvalCodeEx ()
#12 0x0018f79d in PyEval_EvalFrameEx ()
#13 0x00191173 in PyEval_EvalCodeEx ()
#14 0x00191260 in PyEval_EvalCode ()
#15 0x001a883c in PyErr_Display ()
#16 0x001aa4ab in PyRun_InteractiveOneFlags ()
#17 0x001aa5f9 in PyRun_InteractiveLoopFlags ()
#18 0x001aaa2b in PyRun_AnyFileExFlags ()
#19 0x001b5a57 in Py_Main ()
#20 0x00001fca in ?? ()

zookeeper.c @ line 199:

 void free_pywatcher( pywatcher_t *pw)
{
  Py_DECREF(pw->callback);
  free(pw);
}

That's as far as I've dug so far -- I ended up just writing a retry decorator 
to get around it for now.  On the same machine, the zkCli.sh test client works 
flawlessly.

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

Reply via email to