Message5812
Hi Matt,
Amazing coincidence that you are looking at this at the same time as me! Although I do see PythonPOSIXHandler duplication, here the main cause of the leak is repeated compilation of the same Jython code via BytecodeLoader, resulting in class_to_type having thousands of keys which are of the form org.python.proxies.foo$bar$<some int>. I'm not yet sure why compilation is happening repeatedly, nor why Jython takes this monotonically increasing integer approach.
Anyway, here we reached the same conclusion as you, and have in fact hacked PyType, PySystemState, and PythonInterpreter, to track these PyTypes when they are added to this map, and then remove them during PythonInterpreter.cleanup(). This seems to work OK, as long as you remember to invoke that method after every usage of PythonInterpreter!
Maybe doing this from PythonInterpreter.finalize() would be even better. |
|
Date |
User |
Action |
Args |
2010-06-15 23:20:55 | adam.spiers | set | messageid: <1276644055.19.0.358187859921.issue1522@psf.upfronthosting.co.za> |
2010-06-15 23:20:55 | adam.spiers | set | recipients:
+ adam.spiers, pjenvey, matt_brinkley, bpedman, rkurin |
2010-06-15 23:20:55 | adam.spiers | link | issue1522 messages |
2010-06-15 23:20:54 | adam.spiers | create | |
|