Community
Participate
Working Groups
Build Identifier: 20110218-0911 Simultaneously opening many (100s) files with many (1000s) spelling problems causes Eclipse to take 100% of one or more CPUs of the machine it's running on. Sometimes the platform UI becomes non-responsive and eventually the platform crashes. This issue is caused by a race condition, and it has been reported to appear even in conditions of less files/spelling problems. However the scenario above is more likely to reproduce the issue. By using a debugger one notices that when the issue appears, some of the MonoReconciler threads acting on the opened files are stuck in a HashMap iteration. The HashMap in discussion is org.eclipse.ui.texteditor.spelling.SpellingReconcileStrategy.SpellingProblemCollector.fAddAnnotations which is created in org.eclipse.ui.texteditor.spelling.SpellingReconcileStrategy.SpellingProblemCollector.beginCollecting(). The root problem is that this HashMap instance is accessed from several threads at once (see http://mailinator.blogspot.com/2009/06/beautiful-race-condition.html for a concurrency p.o.v. explanation). Using a ConcurrentHashMap instead is a possible fix for the problem. Reproducible: Sometimes Steps to Reproduce: 1. In the Editors -> Text editors -> Spelling preference page set maximum number of problems reported per file to 9999 2. In a plain project, create many plain text files each containing many badly spelled words (or use the attached project) 3. Open all these files simultaneously
Created attachment 194504 [details] Testcase project
This is not a realistic scenario, especially when the limit that we added to avoid the performance problem gets increased by the user.
I just want to emphasize that due to its concurrency nature this issue might manifest during "regular" usage as well but with a very low reproducibility. A real-life use-case we've encountered: * user does not have a dictionary configured (all words in comments are considered spelling issues) * user runs a script that generate source files * project is refreshed * platform simultaneously performs spell-checking on all files that changed on disk Regards, Alex
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. If the bug is still relevant, please remove the "stalebug" whiteboard tag.