Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 330478

Summary: Asynchronous access to maps in RuntimeClasspathProviderDelegate
Product: [WebTools] WTP ServerTools Reporter: Krzysztof Kazmierczyk <kazm>
Component: jst.serverAssignee: Angel Vera <arvera>
Status: CLOSED DUPLICATE QA Contact: Angel Vera <arvera>
Severity: normal    
Priority: P3 CC: kazm
Version: 3.0.5   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
patch making hash maps synchronized none

Description Krzysztof Kazmierczyk CLA 2010-11-17 12:00:34 EST
Build Identifier: 

The problem happens when you are trying to reopen project in Eclipse based product (RAD).
I was found by javacore analyzis. We found the thread running for a long time in java/util/HashMap.rehash. This is a full stack trace of this thread (IBM JVM):
at java/util/HashMap.rehash(Bytecode PC:97(Compiled Code)) at           
java/util/HashMap.rehash(Bytecode PC:6(Compiled Code)) at               
java/util/HashMap.putImpl(Bytecode PC:6(Compiled Code)) at              
java/util/HashMap.put(Bytecode PC:3(Compiled Code)) at                  
org/eclipse/jst/server/core/RuntimeClasspathProviderDelegate.resolveClas
spathContainerImpl(Bytecode PC:294(Compiled Code)) at                   
org/eclipse/jst/server/core/internal/RuntimeClasspathProviderWrapper.res
olveClasspathContainerImpl(Bytecode PC:12) at                           
org/eclipse/jst/server/core/internal/RuntimeClasspathContainer.getClassp
athEntries(Bytecode PC:30) at                                           
org/eclipse/jdt/internal/core/JavaModelManager.containerPutIfInitializin
gWithSameEntries(Bytecode PC:69) at                                     
org/eclipse/jdt/internal/core/SetContainerOperation.executeOperation(Byt
ecode PC:48) at                                                         
org/eclipse/jdt/internal/core/JavaModelOperation.run(Bytecode           
PC:43(Compiled Code))                                                   


Reproducible: Couldn't Reproduce
Comment 1 Krzysztof Kazmierczyk CLA 2010-11-17 12:04:51 EST
Created attachment 183318 [details]
patch making hash maps synchronized

This is a patch which makes synchronization in hash maps used by org/eclipse/jst/server/core/RuntimeClasspathProviderDelegate.resolveClasspathContainerImpl
Comment 2 Krzysztof Kazmierczyk CLA 2010-11-18 02:46:48 EST
We also need a backport to 3.0.5
Comment 3 Angel Vera CLA 2010-11-24 10:56:05 EST
Thanks for the patch. The changes are very similar to bug 323375, also opened by you. I am marking this one as duplicated.

*** This bug has been marked as a duplicate of bug 323375 ***