Community
Participate
Working Groups
Created attachment 173754 [details] bt The project description is unlocked before all the XML has been completely de-serialized. Listeners which hook off the loaded event, may fetch XMLStorageElements from the project description which will cause problems as the DOM tree is not thread-safe. Backtrace attached.
Xerxes DOM is not thread-safe for reads -- all access to the DOM need to be synchronized: http://xerces.apache.org/xerces2-j/faq-dom.html#faq-1 Our ICStorageElement tree is back by the XML, so it amazing we haven't seen more exceptions like the above...
Created attachment 173857 [details] patch 1 Simple patch which synchronizes XML-backed ICStorageElement DOM access on the backing Element's Document. Aims to make the tree thread-safe without perturbing the existing (de)-serialization locking flow. Tests continue to pass. Will stress test it here for a bit.
Created attachment 173863 [details] patch 2 Missed a couple places.
Fixed on HEAD. Daily regression tests that were hitting this issue here are working reliably now.
*** cdt cvs genie on behalf of jblackburn *** Bug 319245 - Thread safety issue reading .cproject XML [*] XmlStorageElement.java 1.3 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/all/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/xml/XmlStorageElement.java?root=Tools_Project&r1=1.2&r2=1.3 [*] XmlStorage.java 1.4 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/all/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/xml/XmlStorage.java?root=Tools_Project&r1=1.3&r2=1.4 [*] XmlProjectDescriptionStorage.java 1.10 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/all/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/xml/XmlProjectDescriptionStorage.java?root=Tools_Project&r1=1.9&r2=1.10 [*] XmlStorageElement.java 1.2.2.1 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/all/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/xml/XmlStorageElement.java?root=Tools_Project&r1=1.2&r2=1.2.2.1 [*] XmlStorage.java 1.3.2.1 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/all/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/xml/XmlStorage.java?root=Tools_Project&r1=1.3&r2=1.3.2.1 [*] XmlProjectDescriptionStorage.java 1.8.2.1 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/all/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/settings/model/xml/XmlProjectDescriptionStorage.java?root=Tools_Project&r1=1.8&r2=1.8.2.1