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 pxd
Recipients jcea, pxd
Date 2012-06-28.14:20:04
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
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?
Date User Action Args
2012-06-28 14:20:06pxdsetrecipients: + pxd, jcea
2012-06-28 14:20:06pxdsetmessageid: <>
2012-06-28 14:20:05pxdlinkissue15108 messages
2012-06-28 14:20:04pxdcreate