Author pxd
Recipients jcea, pxd
Date 2012-06-28.14:20:04
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1340893206.43.0.115104577328.issue15108@psf.upfronthosting.co.za>
In-reply-to
Content
I believe I have found the root-cause for this issue.   

It  is occurring due to the use of the garbage collector in another “memMonitor” thread (we run it periodically to get stats on objects, track mem leaks, etc).  Since _pysqlite_fetch_one_row() releases the GIL before calling PyTuple_SetItem(),  if the  memMonitor is scheduled to run and, say, calls gc.get_objects(), it increments the refcount on all tracked objects (via append_objects()->PyList_Append()->app1()->PY_INCREF()).    I have stack traces to confirm.   This seems to rule out the use of gc methods (such as get_objects(), get_referrers/referents()) in multi-threaded programs or have them handle SystemError arising from such usage.  Agree?
History
Date User Action Args
2012-06-28 14:20:06pxdsetrecipients: + pxd, jcea
2012-06-28 14:20:06pxdsetmessageid: <1340893206.43.0.115104577328.issue15108@psf.upfronthosting.co.za>
2012-06-28 14:20:05pxdlinkissue15108 messages
2012-06-28 14:20:04pxdcreate