Title: Hangs in test.test_gc_jy under regrtest
Type: behaviour Severity: normal
Components: Core Versions: Jython 2.7
Status: open Resolution:
Dependencies: Superseder:
Assigned To: stefan.richthofer Nosy List: jeff.allen, stefan.richthofer
Priority: low Keywords: test failure causes

Created on 2016-09-04.07:31:58 by jeff.allen, last changed 2016-09-04.11:57:24 by stefan.richthofer.

msg10932 (view) Author: Jeff Allen (jeff.allen) Date: 2016-09-04.07:31:57
test.test_gc_jy used not to run under the regression test because it had no test_main() function. Now that is corrected, it reliably hangs the regression test in GCTests_Jy_Monitoring (either test).

I've skipped this test case for now so the test runs at the console, not under regrtest. (See

When hanging, the main thread dump (JVisualVM) looks like this:

"MainThread" prio=6 tid=0x0000000002513000 nid=0x133c in Object.wait() [0x000000000250b000]
   java.lang.Thread.State: WAITING (on object monitor)
	at java.lang.Object.wait(Native Method)
	- waiting on <0x00000000e0b18578> (a java.lang.Class for org.python.modules.gc$GCSentinel)
	at java.lang.Object.wait(
	at org.python.modules.gc.waitForFinalizers(
	- locked <0x00000000e0b18578> (a java.lang.Class for org.python.modules.gc$GCSentinel)
	at org.python.modules.gc.syncCollect(
	at org.python.modules.gc.collect_intern(
	at org.python.modules.gc.collect(
	at sun.reflect.GeneratedMethodAccessor107.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(
	at java.lang.reflect.Method.invoke(
	at org.python.core.PyReflectedFunction.__call__(
	at org.python.core.PyReflectedFunction.__call__(
	at org.python.core.PyObject.__call__(
	at org.python.core.PyObject.__call__(
	at test.test_gc_jy$py.test_monitor_status_after_delayed_finalization$122(~jython-trunk\dist\Lib\test\
	at test.test_gc_jy$py.call_function(~jython-trunk\dist\Lib\test\

   Locked ownable synchronizers:
	- None
msg10933 (view) Author: Stefan Richthofer (stefan.richthofer) Date: 2016-09-04.11:57:24
I guess this one is my responsibility. Thanks for sorting this out.
However this is probably a rarely used feature, so I put it to low priority for now, given that it is likely to be a tough one to fix.
(Feel free to complain if you have a crucial use-case for global gc-monitoring, then I'll reconsider.)
Date User Action Args
2016-09-04 11:57:24stefan.richthofersetpriority: low
assignee: stefan.richthofer
messages: + msg10933
2016-09-04 07:31:58jeff.allencreate