You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "Patrick Hunt (JIRA)" <ji...@apache.org> on 2013/02/03 08:32:13 UTC

[jira] [Commented] (ZOOKEEPER-1637) Intermittent Segfault with zkpython in pyzoo_exists

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

Patrick Hunt commented on ZOOKEEPER-1637:
-----------------------------------------

Hi Robert, looking at the trace it looks like "path" is parsed in pyzoo_exists

bq.   if (!PyArg_ParseTuple(args, "is|O", &zkhid, &path, &watcherfn)) {

and then passed down to prepend_string untouched, where prepend_string finally runs strlen(path), which blows up with null deref.

Any chance your script is somehow passing a null path? What's odd though is that the parse format string is "is|O", meaning the path is a required parameter. I don't see how path could be null per this parse spec.

Perhaps you can check the args passed by your script when this error occurs? Is path specified and what's it's value? Possible to use GDB to examine the parameters in the call to "pyzoo_exists" when it fails?

                
> Intermittent Segfault with zkpython in pyzoo_exists  
> -----------------------------------------------------
>
>                 Key: ZOOKEEPER-1637
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1637
>             Project: ZooKeeper
>          Issue Type: Bug
>    Affects Versions: 3.4.3, 3.4.4, 3.4.5
>            Reporter: Robert Schultheis
>
> We are getting an intermittent segfault.  This is OSX, zookeeper compiled using brew.  I've tried 3.4.3 - 3.4.5.
> I used GDB to get the following backtrace:
> {code}
> Program received signal EXC_BAD_ACCESS, Could not access memory. 
> Reason: 13 at address: 0x0000000000000000 
> [Switching to process 10366 thread 0x1d03] 
> 0x00007fff8e0984f0 in strlen () 
> (gdb) backtrace 
> #0 0x00007fff8e0984f0 in strlen () 
> #1 0x00000001004983cc in prepend_string () 
> #2 0x0000000100498451 in Request_path_init () 
> #3 0x0000000100499e94 in zoo_awexists () 
> #4 0x000000010049a036 in zoo_wexists () 
> #5 0x000000010048170b in pyzoo_exists () 
> #6 0x000000010008c5d8 in PyEval_EvalFrameEx () 
> #7 0x000000010008ecd8 in PyEval_EvalCodeEx () 
> #8 0x000000010008ee6c in PyEval_EvalCode () 
> #9 0x000000010008be0a in PyEval_EvalFrameEx () 
> #10 0x000000010008ecd8 in PyEval_EvalCodeEx () 
> #11 0x000000010008ee6c in PyEval_EvalCode () 
> #12 0x000000010008be0a in PyEval_EvalFrameEx () 
> #13 0x000000010008ecd8 in PyEval_EvalCodeEx () 
> #14 0x000000010002cabf in PyClassMethod_New () 
> #15 0x000000010000bd32 in PyObject_Call () 
> #16 0x000000010008c5ec in PyEval_EvalFrameEx () 
> #17 0x000000010008ecd8 in PyEval_EvalCodeEx () 
> #18 0x000000010002cabf in PyClassMethod_New () 
> #19 0x000000010000bd32 in PyObject_Call () 
> #20 0x000000010001a6e9 in PyInstance_New () 
> #21 0x000000010000bd32 in PyObject_Call () 
> #22 0x0000000100055c5d in _PyObject_SlotCompare () 
> #23 0x000000010000bd32 in PyObject_Call () 
> #24 0x000000010008bf63 in PyEval_EvalFrameEx () 
> #25 0x000000010008ecd8 in PyEval_EvalCodeEx () 
> #26 0x000000010008ee6c in PyEval_EvalCode () 
> #27 0x000000010008be0a in PyEval_EvalFrameEx () 
> #28 0x000000010008edf7 in PyEval_EvalCode () 
> #29 0x000000010008be0a in PyEval_EvalFrameEx () 
> #30 0x000000010008ecd8 in PyEval_EvalCodeEx () 
> #31 0x000000010002cabf in PyClassMethod_New () 
> #32 0x000000010000bd32 in PyObject_Call () 
> #33 0x000000010001a6e9 in PyInstance_New () 
> #34 0x000000010000bd32 in PyObject_Call () 
> #35 0x0000000100087c40 in PyEval_CallObjectWithKeywords () 
> #36 0x00000001000b940d in initthread () 
> #37 0x00007fff8e0448bf in _pthread_start () 
> #38 0x00007fff8e047b75 in thread_start () 
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira