This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 146410 - IDEValidation.testGCDocuments failures
Summary: IDEValidation.testGCDocuments failures
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Navigation (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Tomas Zezula
URL: http://deadlock.netbeans.org/hudson/j...
Keywords: RANDOM, TEST
Depends on:
Blocks:
 
Reported: 2008-09-06 15:33 UTC by Jesse Glick
Modified: 2008-09-12 17:32 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2008-09-06 15:33:01 UTC
This test is failing frequently in the past few NB-Core-Build jobs.

junit.framework.AssertionFailedError: Are all documents GCed? TextDocument:
private static org.netbeans.modules.java.navigation.CaretListeningFactory
org.netbeans.modules.java.navigation.CaretListeningFactory.INSATNCE->
org.netbeans.modules.java.navigation.CaretListeningFactory@83b7b-file2JS->
java.util.HashMap@91ada9-table->
[Ljava.util.HashMap$Entry;@9a7458-[1]->
java.util.HashMap$Entry@192343b-value->
org.netbeans.api.java.source.JavaSource@17b6f14-positions->
java.util.Collections$SynchronizedList@b6fb81-list->
java.util.LinkedList@c21e36-header->
java.util.LinkedList$Entry@1dc5a89-next->
java.util.LinkedList$Entry@f38844-element->
org.netbeans.modules.java.source.usages.Pair@94860-first->
org.netbeans.api.java.source.JavaSource$DocPositionRegion@1b1593f-doc->
org.netbeans.modules.editor.java.JavaDocument@1405f35
	at org.netbeans.junit.NbTestCase.assertGC(NbTestCase.java:1232)
	at org.netbeans.junit.NbTestCase.assertGC(NbTestCase.java:1171)
	at org.netbeans.junit.Log$InstancesHandler.assertGC(Log.java:421)
	at org.netbeans.junit.Log.assertInstances(Log.java:239)
	at org.netbeans.test.ide.WatchProjects.assertTextDocuments(WatchProjects.java:161)
	at org.netbeans.test.ide.IDEValidation.testGCDocuments(IDEValidation.java:1428)
Comment 1 Jesse Glick 2008-09-06 15:48:07 UTC
Failing maybe 50% of the time, needs to be addressed.

BTW note typo: "INSATNCE"

I can see that there were various changes made by you on Thursday in java.source and java.navigation which might be related.
Comment 2 Tomas Zezula 2008-09-08 12:42:12 UTC
java.source changes are not related at all.
The java.navigation change may cause leaking of Document, when the assertGC happens before the request processor performed the task or the tasks was 
performed in different order.
Comment 3 Tomas Zezula 2008-09-08 17:30:54 UTC
The failure is not caused by any of my two changes in the java.source, java.navigator.
I simply rolled them back and I am able to get the same failure while running MemoryValidationTest.
I will evaluate why is it happening, seems that the factory is not getting some events.


Comment 4 Jesse Glick 2008-09-08 18:51:53 UTC
Failed in trunk #3696 as well.
Comment 5 Tomas Zezula 2008-09-08 20:05:01 UTC
I found a case under which one of my fix increases the probability of failure of this test, I have already a local fix I will integrate tomorrow.
But I can reproduce the failure even without these fixes with lower probability, but it's hard to say why the event is not delivered.
Comment 6 Tomas Zezula 2008-09-09 11:16:15 UTC
http://hg.netbeans.org/main/rev/26ac14812e32

Comment 7 Quality Engineering 2008-09-09 17:33:12 UTC
Integrated into 'main-golden', will be available in build *200809091401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/26ac14812e32
User: Tomas Zezula <tzezula@netbeans.org>
Log: #146410:IDEValidation.testGCDocuments failures
Comment 9 Tomas Zezula 2008-09-11 09:24:30 UTC
The fix which caused the failures (original cause of this issue)was rolled back, so it cannot cause it anymore.
But as I mentioned before the test itself is unstable and fails randomly.

Comment 10 Jesse Glick 2008-09-11 16:14:41 UTC
If the test cannot be soon made to pass reliably, it would be better to remove it from the C/V test config for now -
assuming that the failures are a reflection of the test, rather than a real memory leak which users might encounter.
Comment 11 Tomas Zezula 2008-09-11 16:36:14 UTC
The test is and was failing with rate something about 1:15 on my workstation, it seems as a problem of last active component.
I am changing the JavaSource.DocPosRegion to hold the Document weakly, which seems to be promising (30 successful runs of this test).
All the JavaSource tests are passing but I have to look how it affects a partial reparse. I don't want to harm a feature which makes the IDE competitive
to other java IDEs because of  an artificial test which was never deterministic anyway.

Comment 12 Tomas Zezula 2008-09-12 08:26:18 UTC
http://hg.netbeans.org/main/rev/74a875fd8400
Comment 13 Quality Engineering 2008-09-12 17:32:25 UTC
Integrated into 'main-golden', will be available in build *200809121401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/74a875fd8400
User: Tomas Zezula <tzezula@netbeans.org>
Log: #146410:IDEValidation.testGCDocuments failures