Community
Participate
Working Groups
build I20090317-1745 FullSourceWorkspaceModelTests#testInitJDTPlugin() seems to leak several DeltaProcessor and JavaModelManager. When testInitJDTPlugin() simulate restart then a new JavaModelManager in created but the old DeltaProcessor stored in DeltaProcessingState#deltaProcessors is not removed from the ThreadLocalMap of the main thread and this DeltaProcessor references the old JavaModelManager. As the JavaModelManager is a big object and testInitJDTPlugin() simulate restart 20 times , this test leaks around 100Mb.
Created attachment 129427 [details] Proposed fix This patch set null the DeltaProcessor of the main thread when the test simulates restart. The other DeltaProcessors will disappear when their thread will disappear. It should solve the leak in the performance test.
I released the fix in HEAD for 3.5. It fix only the problem in the performance test but the problem could also occur when jdtcore is restarted. Even if it is not a common case we should also fix it.
(In reply to comment #1) > Created an attachment (id=129427) [details] > Proposed fix > > This patch set null the DeltaProcessor of the main thread when the test > simulates restart. The other DeltaProcessors will disappear when their thread > will disappear. > > It should solve the leak in the performance test. > And also while running JDT/Core mode tests (see bug 260739)
Fix the problem in jdtcore would require too much modifications for an almost useless benefit because the restart of jdtcore never occurs. The fix for the tests is sufficient. I close this bug as FIXED.
Verified for 3.5M7 using I20090426-2000