Bug 178027 - Thread-unsafe manipulation of UserLibraryManager#listener within UserLibraryManager#internalSetUserLibrary
Summary: Thread-unsafe manipulation of UserLibraryManager#listener within UserLibraryM...
Status: VERIFIED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.2.2   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: 3.6 M1   Edit
Assignee: Srikanth Sankaran CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-03-19 06:26 EDT by Maxime Daniel CLA
Modified: 2009-08-04 07:13 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Maxime Daniel CLA 2007-03-19 06:26:50 EDT
Source based, R3_2_maintenance stream.

This is a fup on bug 154984. internalSetUserLibrary removes then re-adds a listener from the property changes listeners, potentially missing some changes in the interim. Except if another mechanism strikes that would tell the caller that the library needs to be refreshed, this is due to lead to wrong library contents in some cases. 
A potential path for a solution would be to tell the listener to queue the change events for a while, then pick up any changes when the work that needs the listener not to interfere is done. (Caveats: change events may be destroyed in  the interim, hence the listener should copy the information it needs from them; multiple threads may ask the listener to suspend real changes, which introduces a contention - the ultimate solution may hence be quite different than what I suggest here).
Comment 1 Olivier Thomann CLA 2009-06-25 15:20:00 EDT
Srikanth, please investigate if this is still accurate.
If not, close as WORKSFORME.
Thanks.
Comment 2 Srikanth Sankaran CLA 2009-07-06 05:08:14 EDT
The piece of code identified by comment#0 no longer exists.
(went away with the rewrite referred to by bug# 183117 
comment# 17)

Closing this as WORKSFORME (rather than as DUPLICATE, since
bug# 183117 appears to be a rewrite larger in scope than just
the issue identified here)

Comment 3 Frederic Fusier CLA 2009-08-04 07:13:58 EDT
Verified for 3.6M1