Community
Participate
Working Groups
Created attachment 287830 [details] Screenshot from VisiualVM Looks like I've run into a MT issue in OverflowingLRUCache with changes to bug 576736. I see now ~20 jobs busy hanging in the privateRemoveEntry() method, and that never ends. This is not a deadlock, but seem to be a problem with the while loop inside the OverflowingLRUCache.privateRemoveEntry() method. The jobs seem to repeat same operation again and again, basically with same stack. There were already similar bugs reported, see bug 175531 and bug 128000, I believe the fix was not in the OverflowingLRUCache but in the clients, which makes me wonder if the fixes were done in the right place. "Worker-2547: Performing API Analysis" #8641 prio=5 os_prio=0 cpu=9594.08ms elapsed=289.01s tid=0x00007ffd74183000 nid=0x6a50 runnable [0x00007ffdbc8fb000] java.lang.Thread.State: RUNNABLE at java.util.Hashtable.get(java.base@11.0.10/Hashtable.java:379) - locked <0x0000000501900f90> (a java.util.Hashtable) at org.eclipse.jdt.internal.core.OverflowingLRUCache.privateRemoveEntry(OverflowingLRUCache.java:293) at org.eclipse.jdt.internal.core.OverflowingLRUCache.makeSpace(OverflowingLRUCache.java:190) at org.eclipse.jdt.internal.core.OverflowingLRUCache.put(OverflowingLRUCache.java:351) at org.eclipse.pde.api.tools.internal.model.ApiModelCache.cacheElementInfo(ApiModelCache.java:164) at org.eclipse.pde.api.tools.internal.model.AbstractApiTypeRoot.getStructure(AbstractApiTypeRoot.java:74) at org.eclipse.pde.api.tools.internal.provisional.comparator.ApiComparator$2.visit(ApiComparator.java:665) at org.eclipse.pde.api.tools.internal.model.ArchiveApiTypeContainer.accept(ArchiveApiTypeContainer.java:198) at org.eclipse.pde.api.tools.internal.provisional.comparator.ApiComparator.internalCompare(ApiComparator.java:659) at org.eclipse.pde.api.tools.internal.provisional.comparator.ApiComparator.compare(ApiComparator.java:289) at org.eclipse.pde.api.tools.internal.provisional.comparator.ApiComparator.compare(ApiComparator.java:315) at org.eclipse.pde.api.tools.internal.builder.BaseApiAnalyzer.checkCompatibility(BaseApiAnalyzer.java:1504) at org.eclipse.pde.api.tools.internal.builder.BaseApiAnalyzer.analyzeComponent(BaseApiAnalyzer.java:269) at org.eclipse.pde.api.tools.internal.builder.ApiAnalysisBuilder.buildAll(ApiAnalysisBuilder.java:923) at org.eclipse.pde.api.tools.internal.builder.ApiAnalysisBuilder.work(ApiAnalysisBuilder.java:427) at org.eclipse.pde.api.tools.internal.builder.ApiAnalysisBuilder$ApiAnalysisJob.run(ApiAnalysisBuilder.java:579) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Created attachment 287831 [details] VisualVM snapshot
OK, reading javadoc on the base class LRUCache one can see following: * <p>This implementation is NOT thread-safe. Synchronization wrappers would * have to be added to ensure atomic insertions and deletions from the cache. So the bug is in PDE that should make sure access of the cache is MT safe.
New Gerrit change created: https://git.eclipse.org/r/c/pde/eclipse.pde.ui/+/189606
Gerrit change https://git.eclipse.org/r/c/pde/eclipse.pde.ui/+/189606 was merged to [master]. Commit: http://git.eclipse.org/c/pde/eclipse.pde.ui.git/commit/?id=927154f68f0f244560305373893ce65f5d5dbff6
New Gerrit change created: https://git.eclipse.org/r/c/pde/eclipse.pde.ui/+/189627
Gerrit change https://git.eclipse.org/r/c/pde/eclipse.pde.ui/+/189627 was merged to [master]. Commit: http://git.eclipse.org/c/pde/eclipse.pde.ui.git/commit/?id=0915972446db20b00772facd409c2a2807a30a95
Seem to work now with I20220116-1800, I don't see API jobs hanging anymore.