Community
Participate
Working Groups
Build Identifier: 20110218-0911 For a couple of days, I had spurious lock ups/hangs of the Eclipse UI while tests were running. In the CPU monitor, I could see something hog a CPU core for 100%. Using jps and jstat, I could nail it down to this stack trace: at java.util.regex.Pattern$Curly.match0(Pattern.java:3782) at java.util.regex.Pattern$Curly.match(Pattern.java:3744) at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3366) at java.util.regex.Pattern$Start.match(Pattern.java:3055) at java.util.regex.Matcher.search(Matcher.java:1105) at java.util.regex.Matcher.find(Matcher.java:561) at org.eclipse.ui.internal.console. ConsolePatternMatcher$MatchJob.run(ConsolePatternMatcher.java:127) Now my problem is: How can I find out *which* regexp causes this? I have the console output in a file, so I could run all the regexps against it to see which one causes the problem. Is there some command/script that I could write to get a list of all regexps? Also: Why is this locking up the UI? Can't the partitioning of the console content happen in the background? Maybe you should add timeouts to code that runs regexps because it's a known fact that some regexps need an surprising amount of CPU in some corner cases. Reproducible: Always
Created attachment 192821 [details] Thread dump while the UI hangs
Looks like a dupe of bug 175888. Aaron, what kind of console is the output going to (stacktrace, I/O, etc)? Are you outputting a lot of data to the console? Or really long lines of data? > Now my problem is: How can I find out *which* regexp causes this? I guess your best bet would be to profile it. You could also try running your tests on a vanilla Eclipse and see if the problem occurs - then you would know if the problem is in the platform or a plugin that contributes their own pattern matcher. > Is there some command/script that I could write to get a list of all regexps? Sadly, you would have to debug the class ConsoleManager from org.eclipse.ui.console and inspect the fPatternMatchListeners collection > Also: Why is this locking up the UI? Can't the partitioning of the console > content happen in the background? The matching, etc. is done in the background, but in certain cases - writing out large lines of text to the UI widgetry for example - can cause Eclipse to bog right down.
(In reply to comment #2) > Looks like a dupe of bug 175888. Probably. I've commented there and closed this bug as a duplicate. *** This bug has been marked as a duplicate of bug 175888 ***