You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "Henry Robinson (JIRA)" <ji...@apache.org> on 2009/05/28 02:25:45 UTC
[jira] Created: (ZOOKEEPER-419) Reference counting bug in Python
bindings causes abort errors
Reference counting bug in Python bindings causes abort errors
-------------------------------------------------------------
Key: ZOOKEEPER-419
URL: https://issues.apache.org/jira/browse/ZOOKEEPER-419
Project: Zookeeper
Issue Type: Bug
Components: contrib-bindings
Reporter: Henry Robinson
Assignee: Henry Robinson
Priority: Critical
Fix For: 3.2.0
Attachments: ZOOKEEPER-419.patch
Due to reference counts being incremented incorrectly for stat-based calls, Python's GC occasionally aborts.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (ZOOKEEPER-419) Reference counting bug in Python
bindings causes abort errors
Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/ZOOKEEPER-419?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12713844#action_12713844 ]
Hadoop QA commented on ZOOKEEPER-419:
-------------------------------------
-1 overall. Here are the results of testing the latest attachment
http://issues.apache.org/jira/secure/attachment/12409226/ZOOKEEPER-419.patch
against trunk revision 777662.
+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-vesta.apache.org/93/testReport/
Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-vesta.apache.org/93/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Console output: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-vesta.apache.org/93/console
This message is automatically generated.
> Reference counting bug in Python bindings causes abort errors
> -------------------------------------------------------------
>
> Key: ZOOKEEPER-419
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-419
> Project: Zookeeper
> Issue Type: Bug
> Components: contrib-bindings
> Reporter: Henry Robinson
> Assignee: Henry Robinson
> Priority: Critical
> Fix For: 3.2.0
>
> Attachments: ZOOKEEPER-419.patch
>
>
> Due to reference counts being incremented incorrectly for stat-based calls, Python's GC occasionally aborts.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (ZOOKEEPER-419) Reference counting bug in Python
bindings causes abort errors
Posted by "Henry Robinson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/ZOOKEEPER-419?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12714070#action_12714070 ]
Henry Robinson commented on ZOOKEEPER-419:
------------------------------------------
> Is there test code currently that exercises the "stat and acl objects passed to Py_BuildValue." codepath?
Yes - there's a get-set test that will go through this code path. Every time an API call returns, it invokes Py_BuildValue to construct the python representation of the C data type.
> Reference counting bug in Python bindings causes abort errors
> -------------------------------------------------------------
>
> Key: ZOOKEEPER-419
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-419
> Project: Zookeeper
> Issue Type: Bug
> Components: contrib-bindings
> Reporter: Henry Robinson
> Assignee: Henry Robinson
> Priority: Critical
> Fix For: 3.2.0
>
> Attachments: ZOOKEEPER-419.patch
>
>
> Due to reference counts being incremented incorrectly for stat-based calls, Python's GC occasionally aborts.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (ZOOKEEPER-419) Reference counting bug in Python
bindings causes abort errors
Posted by "Patrick Hunt (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/ZOOKEEPER-419?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12714049#action_12714049 ]
Patrick Hunt commented on ZOOKEEPER-419:
----------------------------------------
Is there test code currently that exercises the "stat and acl objects passed to Py_BuildValue." codepath? If so then I'd say this is fine, otw
I'd suggest adding a test or two that exercise this codepath. Perhaps add a JIRA that documents we need to verify refcnt at some point?
Is there some facility/extn/addon for python that supports test/verification of refcnt correctness?
> Reference counting bug in Python bindings causes abort errors
> -------------------------------------------------------------
>
> Key: ZOOKEEPER-419
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-419
> Project: Zookeeper
> Issue Type: Bug
> Components: contrib-bindings
> Reporter: Henry Robinson
> Assignee: Henry Robinson
> Priority: Critical
> Fix For: 3.2.0
>
> Attachments: ZOOKEEPER-419.patch
>
>
> Due to reference counts being incremented incorrectly for stat-based calls, Python's GC occasionally aborts.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (ZOOKEEPER-419) Reference counting bug in Python
bindings causes abort errors
Posted by "Henry Robinson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/ZOOKEEPER-419?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Henry Robinson updated ZOOKEEPER-419:
-------------------------------------
Attachment: ZOOKEEPER-419.patch
Replace "O" with "N" for stat and acl objects passed to Py_BuildValue.
> Reference counting bug in Python bindings causes abort errors
> -------------------------------------------------------------
>
> Key: ZOOKEEPER-419
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-419
> Project: Zookeeper
> Issue Type: Bug
> Components: contrib-bindings
> Reporter: Henry Robinson
> Assignee: Henry Robinson
> Priority: Critical
> Fix For: 3.2.0
>
> Attachments: ZOOKEEPER-419.patch
>
>
> Due to reference counts being incremented incorrectly for stat-based calls, Python's GC occasionally aborts.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (ZOOKEEPER-419) Reference counting bug in Python
bindings causes abort errors
Posted by "Patrick Hunt (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/ZOOKEEPER-419?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12714056#action_12714056 ]
Patrick Hunt commented on ZOOKEEPER-419:
----------------------------------------
For future ref: I did a quick search and noticed the following which might be helpful at some point for testing ref cnts:
1) http://docs.python.org/library/gc.html
2) see class "TrackRefs"
http://cvs.zope.org/*checkout*/Zope3/test.py?rev=1.100&content-type=text/plain
> Reference counting bug in Python bindings causes abort errors
> -------------------------------------------------------------
>
> Key: ZOOKEEPER-419
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-419
> Project: Zookeeper
> Issue Type: Bug
> Components: contrib-bindings
> Reporter: Henry Robinson
> Assignee: Henry Robinson
> Priority: Critical
> Fix For: 3.2.0
>
> Attachments: ZOOKEEPER-419.patch
>
>
> Due to reference counts being incremented incorrectly for stat-based calls, Python's GC occasionally aborts.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (ZOOKEEPER-419) Reference counting bug in Python
bindings causes abort errors
Posted by "Henry Robinson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/ZOOKEEPER-419?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12714062#action_12714062 ]
Henry Robinson commented on ZOOKEEPER-419:
------------------------------------------
Thanks, those are good pointers. I need to expand the test coverage for the bindings beyond simply exercising the API. I'll set up another JIRA for that.
> Reference counting bug in Python bindings causes abort errors
> -------------------------------------------------------------
>
> Key: ZOOKEEPER-419
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-419
> Project: Zookeeper
> Issue Type: Bug
> Components: contrib-bindings
> Reporter: Henry Robinson
> Assignee: Henry Robinson
> Priority: Critical
> Fix For: 3.2.0
>
> Attachments: ZOOKEEPER-419.patch
>
>
> Due to reference counts being incremented incorrectly for stat-based calls, Python's GC occasionally aborts.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (ZOOKEEPER-419) Reference counting bug in Python
bindings causes abort errors
Posted by "Henry Robinson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/ZOOKEEPER-419?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12713979#action_12713979 ]
Henry Robinson commented on ZOOKEEPER-419:
------------------------------------------
This is hard to test for explicitly, as GC is non-deterministic and covering all the cases is difficult. I expect these kinds of error to shake out when I expand the test suite. Hudson wouldn't pick up any new Python tests anyhow. It's a simple change without any alterations to the logic of the bindings - just correcting the parameters to a Python C API call.
However, this bug is blocking progress on a project for me, and it would be helpful to have it committed asap, if committers have time and agree.
> Reference counting bug in Python bindings causes abort errors
> -------------------------------------------------------------
>
> Key: ZOOKEEPER-419
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-419
> Project: Zookeeper
> Issue Type: Bug
> Components: contrib-bindings
> Reporter: Henry Robinson
> Assignee: Henry Robinson
> Priority: Critical
> Fix For: 3.2.0
>
> Attachments: ZOOKEEPER-419.patch
>
>
> Due to reference counts being incremented incorrectly for stat-based calls, Python's GC occasionally aborts.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (ZOOKEEPER-419) Reference counting bug in Python
bindings causes abort errors
Posted by "Patrick Hunt (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/ZOOKEEPER-419?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Patrick Hunt updated ZOOKEEPER-419:
-----------------------------------
Resolution: Fixed
Hadoop Flags: [Reviewed]
Status: Resolved (was: Patch Available)
+1, thanks Henry
Committed revision 779716.
> Reference counting bug in Python bindings causes abort errors
> -------------------------------------------------------------
>
> Key: ZOOKEEPER-419
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-419
> Project: Zookeeper
> Issue Type: Bug
> Components: contrib-bindings
> Reporter: Henry Robinson
> Assignee: Henry Robinson
> Priority: Critical
> Fix For: 3.2.0
>
> Attachments: ZOOKEEPER-419.patch
>
>
> Due to reference counts being incremented incorrectly for stat-based calls, Python's GC occasionally aborts.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (ZOOKEEPER-419) Reference counting bug in Python
bindings causes abort errors
Posted by "Hudson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/ZOOKEEPER-419?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12714416#action_12714416 ]
Hudson commented on ZOOKEEPER-419:
----------------------------------
Integrated in ZooKeeper-trunk #329 (See [http://hudson.zones.apache.org/hudson/job/ZooKeeper-trunk/329/])
. Reference counting bug in Python bindings causes abort errors
> Reference counting bug in Python bindings causes abort errors
> -------------------------------------------------------------
>
> Key: ZOOKEEPER-419
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-419
> Project: Zookeeper
> Issue Type: Bug
> Components: contrib-bindings
> Reporter: Henry Robinson
> Assignee: Henry Robinson
> Priority: Critical
> Fix For: 3.2.0
>
> Attachments: ZOOKEEPER-419.patch
>
>
> Due to reference counts being incremented incorrectly for stat-based calls, Python's GC occasionally aborts.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (ZOOKEEPER-419) Reference counting bug in Python
bindings causes abort errors
Posted by "Henry Robinson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/ZOOKEEPER-419?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Henry Robinson updated ZOOKEEPER-419:
-------------------------------------
Status: Patch Available (was: Open)
> Reference counting bug in Python bindings causes abort errors
> -------------------------------------------------------------
>
> Key: ZOOKEEPER-419
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-419
> Project: Zookeeper
> Issue Type: Bug
> Components: contrib-bindings
> Reporter: Henry Robinson
> Assignee: Henry Robinson
> Priority: Critical
> Fix For: 3.2.0
>
> Attachments: ZOOKEEPER-419.patch
>
>
> Due to reference counts being incremented incorrectly for stat-based calls, Python's GC occasionally aborts.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.