Message8294

Author rchyla
Recipients rchyla
Date 2014-04-20.05:58:19
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1397973500.44.0.035661364693.issue2127@psf.upfronthosting.co.za>
In-reply-to
Content
Hi, I've started using Jython (from inside Java) and discovered a problem; when a weakref is imported (eg. by 'import logging') objects are not being recycled 

Please look at the attached unittest to reproduce the problem - I'm using jython2.7.b1

You will need to use http://labs.carrotsearch.com/randomizedtesting.html

This is what I'm seeing:


Apr 20, 2014 1:54:17 AM com.carrotsearch.randomizedtesting.ThreadLeakControl checkThreadLeaks
WARNING: Will linger awaiting termination of 1 leaked thread(s).
Apr 20, 2014 1:54:37 AM com.carrotsearch.randomizedtesting.ThreadLeakControl checkThreadLeaks
SEVERE: 1 thread leaked from SUITE scope at org.jython.monty.TestJythonWeakref: 
   1) Thread[id=13, name=weakref reaper, state=WAITING, group=TGRP-TestJythonWeakref]
        at java.lang.Object.wait(Native Method)
        at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:135)
        at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:151)
        at org.python.modules._weakref.GlobalRef$RefReaperThread.collect(GlobalRef.java:212)
        at org.python.modules._weakref.GlobalRef$RefReaperThread.run(GlobalRef.java:221)
Apr 20, 2014 1:54:37 AM com.carrotsearch.randomizedtesting.ThreadLeakControl tryToInterruptAll
INFO: Starting to interrupt leaked threads:
   1) Thread[id=13, name=weakref reaper, state=WAITING, group=TGRP-TestJythonWeakref]
Apr 20, 2014 1:54:40 AM com.carrotsearch.randomizedtesting.ThreadLeakControl tryToInterruptAll
SEVERE: There are still zombie threads that couldn't be terminated:
   1) Thread[id=13, name=weakref reaper, state=WAITING, group=TGRP-TestJythonWeakref]
        at java.lang.Object.wait(Native Method)
        at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:135)
        at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:151)
        at org.python.modules._weakref.GlobalRef$RefReaperThread.collect(GlobalRef.java:212)
        at org.python.modules._weakref.GlobalRef$RefReaperThread.run(GlobalRef.java:221)
History
Date User Action Args
2014-04-20 05:58:20rchylasetrecipients: + rchyla
2014-04-20 05:58:20rchylasetmessageid: <1397973500.44.0.035661364693.issue2127@psf.upfronthosting.co.za>
2014-04-20 05:58:20rchylalinkissue2127 messages
2014-04-20 05:58:19rchylacreate