Community
Participate
Working Groups
Build Identifier: 3.6.0 We encountered a serious multi threading issue in the usage of the DirectMap class. The ConfigurationElementMulti.getTranslatedAtIndex method checks if the DirectMap class contains a specific locale as key, and if not, resolves the value for that locale and tries to put it into the map. The direct map itself then checks in the put method if this key is already contained, and throws an IllegalArgumentException if so. In a multi-threaded environment, this might fail due to concurrent access of the ConfigurationElementMulti which does NOT synchronize on the DirectMap. (probably because the DirectMap itself has the synchronized keyword in the put method, which is not enough here, since 2 method calls on this class are performed). Note that this issue only occures when the -registryMultiLanguage environment variable has been set. Due to the nature of this issue, it doesnt occure always :-( Reproducible: Sometimes Steps to Reproduce: 1. Access the Extension Registry multi-threaded with the -registryMultiLanguage environment variable set 2. 3.
Created attachment 194706 [details] Stacktrace of the IllegalArgumentException
Thanks for the analysis. I agree, it looks like DirectMap is not being accessed in a thread safe way.
Created attachment 194726 [details] Patch v.0.1 Andreas, could you try this patch and see if it works for you? If it is, I'd release it into 3.8 and, after it gets a bit of mileage, into 3.7.1.
(In reply to comment #3) We patched the plugin and installed it within our RCP application. The QA department just told me they could not reproduce the problem any longer (it didn't occur all the time unfortunately). Therefore I would say, thank you and it works :-)
Oleg, reminder that 3.7.1 is getting close. You should release this to master now and 3.7.1 very soon.
(In reply to comment #5) > Oleg, reminder that 3.7.1 is getting close. You should release this to master > now and 3.7.1 very soon. Ops, sorry, totally skipped my mind. I am having problems with EGit and R3_7_maintenance branch which for some reason shows up as a tag in my workspace. Could you release the patch? I just re-tested it and it seems to be fine.
patch released to 3.7.1 and master.
*** Bug 368706 has been marked as a duplicate of this bug. ***