This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author mark.dickinson
Recipients benjamin.peterson, donmez, jnoller, mark.dickinson
Date 2008-08-07.21:10:55
SpamBayes Score 5.01897e-07
Marked as misclassified No
Message-id <>
Hmmm.  That last message wasn't too coherent;  I really shouldn't try to 
post at 2:30am.

Summary:  the refcounting logic in the Server class is flawed.  In 
Server.create(), the initial refcount of a newly-created shared object is 
set to None.  This is dangerous: the moment another thread gets a look-in, 
that refcount can be incremented to 1, then decremented to 0, at which 
point the shared object gets disposed of (by the code in Server.decref).   
And all this can happen before the Proxy object for the shared object gets 
initialized, at which point the KeyError occurs.

(Not much better.)

Can anyone suggest a way to fix this?  I can't see any easy fix.  
Nevertheless, I consider this a serious flaw that should be fixed before 
2.6 and 3.0 are released.

I've attached a minimal file that produces the incref error (on about 1 
run out of every 5) for me.
Date User Action Args
2008-08-07 21:10:57mark.dickinsonsetrecipients: + mark.dickinson, donmez, benjamin.peterson, jnoller
2008-08-07 21:10:57mark.dickinsonsetmessageid: <>
2008-08-07 21:10:56mark.dickinsonlinkissue3419 messages
2008-08-07 21:10:56mark.dickinsoncreate