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 2009/09/30 08:00:33 UTC

[jira] Created: (ZOOKEEPER-538) zookeeper.async causes python to segfault

zookeeper.async causes python to segfault
-----------------------------------------

                 Key: ZOOKEEPER-538
                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-538
             Project: Zookeeper
          Issue Type: Bug
          Components: contrib-bindings
    Affects Versions: 3.2.1
            Reporter: Patrick Hunt
            Assignee: Henry Robinson
            Priority: Critical


calling 


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


[jira] Commented: (ZOOKEEPER-538) zookeeper.async causes python to segfault

Posted by "Patrick Hunt (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-538?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12761033#action_12761033 ] 

Patrick Hunt commented on ZOOKEEPER-538:
----------------------------------------

while jira was down I said:
---------
That patch makes things better, but the script still fails, now on the third async rather than the first.

Can you give this a try? Thanks.

phunt@valhalla:~/dev/workspace/zk-smoketest[master]$ PYTHONPATH=lib.linux-i686-2.6 LD_LIBRARY_PATH=lib.linux-i686-2.6 ./zk-smoketest.py
Connecting to localhost:2181
Connected, handle is  0
Node /zk-smoketest already exists, attempting reuse
Connecting to localhost:2181
Connected, handle is  1
ASYNC
ASYNCDONE
ASYNC
got watch in watcher, count 1
ASYNCDONE
Connecting to localhost:2181
Connected, handle is  2
ASYNC
Segmentation fault 

Henry said:
------------
Ok, I'll take a look


> zookeeper.async causes python to segfault
> -----------------------------------------
>
>                 Key: ZOOKEEPER-538
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-538
>             Project: Zookeeper
>          Issue Type: Bug
>          Components: contrib-bindings
>    Affects Versions: 3.2.1
>            Reporter: Patrick Hunt
>            Assignee: Henry Robinson
>            Priority: Critical
>         Attachments: callback.patch
>
>
> Henry, can you take a look at this, am I doing it right?
> calling 
>         zookeeper.async(self.handle, path)
> causes python to segfault.
> see: http://github.com/phunt/zk-smoketest/blob/master/zk-smoketest.py

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


[jira] Updated: (ZOOKEEPER-538) zookeeper.async causes python to segfault

Posted by "Patrick Hunt (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-538?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Patrick Hunt updated ZOOKEEPER-538:
-----------------------------------

    Description: 
Henry, can you take a look at this, am I doing it right?

calling 
        zookeeper.async(self.handle, path)
causes python to segfault.

see: http://github.com/phunt/zk-smoketest/blob/master/zk-smoketest.py



  was:
calling 



> zookeeper.async causes python to segfault
> -----------------------------------------
>
>                 Key: ZOOKEEPER-538
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-538
>             Project: Zookeeper
>          Issue Type: Bug
>          Components: contrib-bindings
>    Affects Versions: 3.2.1
>            Reporter: Patrick Hunt
>            Assignee: Henry Robinson
>            Priority: Critical
>
> Henry, can you take a look at this, am I doing it right?
> calling 
>         zookeeper.async(self.handle, path)
> causes python to segfault.
> see: http://github.com/phunt/zk-smoketest/blob/master/zk-smoketest.py

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


[jira] Commented: (ZOOKEEPER-538) zookeeper.async causes python to segfault

Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-538?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12761377#action_12761377 ] 

Hadoop QA commented on ZOOKEEPER-538:
-------------------------------------

+1 overall.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12421073/callback.patch
  against trunk revision 820808.

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

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

This message is automatically generated.

> zookeeper.async causes python to segfault
> -----------------------------------------
>
>                 Key: ZOOKEEPER-538
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-538
>             Project: Zookeeper
>          Issue Type: Bug
>          Components: contrib-bindings
>    Affects Versions: 3.2.1
>            Reporter: Patrick Hunt
>            Assignee: Henry Robinson
>            Priority: Critical
>         Attachments: callback.patch, callback.patch
>
>
> Henry, can you take a look at this, am I doing it right?
> calling 
>         zookeeper.async(self.handle, path)
> causes python to segfault.
> see: http://github.com/phunt/zk-smoketest/blob/master/zk-smoketest.py

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


[jira] Updated: (ZOOKEEPER-538) zookeeper.async causes python to segfault

Posted by "Patrick Hunt (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-538?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Patrick Hunt updated ZOOKEEPER-538:
-----------------------------------

    Status: Patch Available  (was: Open)

> zookeeper.async causes python to segfault
> -----------------------------------------
>
>                 Key: ZOOKEEPER-538
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-538
>             Project: Zookeeper
>          Issue Type: Bug
>          Components: contrib-bindings
>    Affects Versions: 3.2.1
>            Reporter: Patrick Hunt
>            Assignee: Henry Robinson
>            Priority: Critical
>         Attachments: callback.patch, callback.patch
>
>
> Henry, can you take a look at this, am I doing it right?
> calling 
>         zookeeper.async(self.handle, path)
> causes python to segfault.
> see: http://github.com/phunt/zk-smoketest/blob/master/zk-smoketest.py

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


[jira] Updated: (ZOOKEEPER-538) zookeeper.async causes python to segfault

Posted by "Patrick Hunt (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-538?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Patrick Hunt updated ZOOKEEPER-538:
-----------------------------------

    Fix Version/s: 3.2.2

> zookeeper.async causes python to segfault
> -----------------------------------------
>
>                 Key: ZOOKEEPER-538
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-538
>             Project: Zookeeper
>          Issue Type: Bug
>          Components: contrib-bindings
>    Affects Versions: 3.2.1
>            Reporter: Patrick Hunt
>            Assignee: Henry Robinson
>            Priority: Critical
>             Fix For: 3.2.2, 3.3.0
>
>         Attachments: callback.patch, callback.patch
>
>
> Henry, can you take a look at this, am I doing it right?
> calling 
>         zookeeper.async(self.handle, path)
> causes python to segfault.
> see: http://github.com/phunt/zk-smoketest/blob/master/zk-smoketest.py

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


[jira] Updated: (ZOOKEEPER-538) zookeeper.async causes python to segfault

Posted by "Henry Robinson (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-538?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Henry Robinson updated ZOOKEEPER-538:
-------------------------------------

    Attachment: callback.patch

This should fix the problem - if a completion callback wasn't specified for async functions, the C zookeeper library would try and call NULL. 

Fixed by adding a callback to every async call which exits if no callback has been supplied by the user.

I haven't added any new tests for this yet - Patrick, the smoketest is already better than what zkpython currently has I think. When it's finished, will you commit that?



> zookeeper.async causes python to segfault
> -----------------------------------------
>
>                 Key: ZOOKEEPER-538
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-538
>             Project: Zookeeper
>          Issue Type: Bug
>          Components: contrib-bindings
>    Affects Versions: 3.2.1
>            Reporter: Patrick Hunt
>            Assignee: Henry Robinson
>            Priority: Critical
>         Attachments: callback.patch
>
>
> Henry, can you take a look at this, am I doing it right?
> calling 
>         zookeeper.async(self.handle, path)
> causes python to segfault.
> see: http://github.com/phunt/zk-smoketest/blob/master/zk-smoketest.py

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


[jira] Updated: (ZOOKEEPER-538) zookeeper.async causes python to segfault

Posted by "Patrick Hunt (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-538?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Patrick Hunt updated ZOOKEEPER-538:
-----------------------------------

    Attachment: callback.patch

same as previous patch except added async test.

> zookeeper.async causes python to segfault
> -----------------------------------------
>
>                 Key: ZOOKEEPER-538
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-538
>             Project: Zookeeper
>          Issue Type: Bug
>          Components: contrib-bindings
>    Affects Versions: 3.2.1
>            Reporter: Patrick Hunt
>            Assignee: Henry Robinson
>            Priority: Critical
>         Attachments: callback.patch, callback.patch
>
>
> Henry, can you take a look at this, am I doing it right?
> calling 
>         zookeeper.async(self.handle, path)
> causes python to segfault.
> see: http://github.com/phunt/zk-smoketest/blob/master/zk-smoketest.py

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


[jira] Commented: (ZOOKEEPER-538) zookeeper.async causes python to segfault

Posted by "Patrick Hunt (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-538?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12761362#action_12761362 ] 

Patrick Hunt commented on ZOOKEEPER-538:
----------------------------------------

Disregard my last comment - the patch Henry provided does fix this problem.

turns out I was closing a handle and then later re-using it (in an async call).

I've entered a jira on zkpython to handle this more gracefully:
ZOOKEEPER-540


> zookeeper.async causes python to segfault
> -----------------------------------------
>
>                 Key: ZOOKEEPER-538
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-538
>             Project: Zookeeper
>          Issue Type: Bug
>          Components: contrib-bindings
>    Affects Versions: 3.2.1
>            Reporter: Patrick Hunt
>            Assignee: Henry Robinson
>            Priority: Critical
>         Attachments: callback.patch
>
>
> Henry, can you take a look at this, am I doing it right?
> calling 
>         zookeeper.async(self.handle, path)
> causes python to segfault.
> see: http://github.com/phunt/zk-smoketest/blob/master/zk-smoketest.py

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


[jira] Commented: (ZOOKEEPER-538) zookeeper.async causes python to segfault

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-538?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12761537#action_12761537 ] 

Hudson commented on ZOOKEEPER-538:
----------------------------------

Integrated in ZooKeeper-trunk #485 (See [http://hudson.zones.apache.org/hudson/job/ZooKeeper-trunk/485/])
    . zookeeper.async causes python to segfault


> zookeeper.async causes python to segfault
> -----------------------------------------
>
>                 Key: ZOOKEEPER-538
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-538
>             Project: Zookeeper
>          Issue Type: Bug
>          Components: contrib-bindings
>    Affects Versions: 3.2.1
>            Reporter: Patrick Hunt
>            Assignee: Henry Robinson
>            Priority: Critical
>             Fix For: 3.3.0
>
>         Attachments: callback.patch, callback.patch
>
>
> Henry, can you take a look at this, am I doing it right?
> calling 
>         zookeeper.async(self.handle, path)
> causes python to segfault.
> see: http://github.com/phunt/zk-smoketest/blob/master/zk-smoketest.py

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


[jira] Updated: (ZOOKEEPER-538) zookeeper.async causes python to segfault

Posted by "Patrick Hunt (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-538?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Patrick Hunt updated ZOOKEEPER-538:
-----------------------------------

       Resolution: Fixed
    Fix Version/s: 3.3.0
     Hadoop Flags: [Reviewed]
           Status: Resolved  (was: Patch Available)

+1 looks good, thanks Henry!

> zookeeper.async causes python to segfault
> -----------------------------------------
>
>                 Key: ZOOKEEPER-538
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-538
>             Project: Zookeeper
>          Issue Type: Bug
>          Components: contrib-bindings
>    Affects Versions: 3.2.1
>            Reporter: Patrick Hunt
>            Assignee: Henry Robinson
>            Priority: Critical
>             Fix For: 3.3.0
>
>         Attachments: callback.patch, callback.patch
>
>
> Henry, can you take a look at this, am I doing it right?
> calling 
>         zookeeper.async(self.handle, path)
> causes python to segfault.
> see: http://github.com/phunt/zk-smoketest/blob/master/zk-smoketest.py

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