Message9931

Author jmadden
Recipients jmadden
Date 2015-04-23.15:13:31
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1429802011.65.0.590663915104.issue2336@psf.upfronthosting.co.za>
In-reply-to
Content
I came across this while running the `zodbshootout` to get an idea of Jython's performance under ZODB with high-concurrency. There had been 4 threads running, although when the error occurred there was only a single thread running (a cleanup phase of the benchmark). That cleanup phase has a loop that calls `gc.collect` and one of those calls threw this:

    java.lang.NullPointerException
	at org.python.modules.gc$WeakReferenceGC.equals(gc.java:709)
	at java.util.HashMap.removeNode(HashMap.java:819)
	at java.util.HashMap.remove(HashMap.java:798)
	at java.util.HashSet.remove(HashSet.java:235)
	at org.python.modules.gc.syncCollect(gc.java:1859)
	at org.python.modules.gc.collect_intern(gc.java:1789)
	at org.python.modules.gc.collect(gc.java:1721)

ZODB (or more specifically, persistent) does use the `gc.monitorObject` API as well as `weakref.WeakValueDictionary`: the values in the dictionary are monitored because we need a more deterministic cleanup of them then standard Java GC semantics offer.
History
Date User Action Args
2015-04-23 15:13:31jmaddensetrecipients: + jmadden
2015-04-23 15:13:31jmaddensetmessageid: <1429802011.65.0.590663915104.issue2336@psf.upfronthosting.co.za>
2015-04-23 15:13:31jmaddenlinkissue2336 messages
2015-04-23 15:13:31jmaddencreate