| Summary: | The performance test JavaMoveLineTest#test() and subsequent tests fails on Linux machine. | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Satyam Kandula <satyam.kandula> | ||||||
| Component: | Text | Assignee: | Deepak Azad <deepakazad> | ||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||
| Severity: | normal | ||||||||
| Priority: | P2 | CC: | daniel_megert | ||||||
| Version: | 3.7 | ||||||||
| Target Milestone: | 3.7 M6 | ||||||||
| Hardware: | PC | ||||||||
| OS: | Linux | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
|
Description
Satyam Kandula
Deepak, please take a look at this during our test pass when you're at the Linux machine. Looks good again in latest I-build. This failed again in N20101118-2000 build with the following call stack .. Reopening! ######### org.eclipse.core.runtime.AssertionFailedException: assertion failed: at org.eclipse.core.runtime.Assert.isTrue(Assert.java:110) at org.eclipse.core.runtime.Assert.isTrue(Assert.java:96) at org.eclipse.jface.text.Position.<init>(Position.java:63) at org.eclipse.jface.text.AbstractDocument.getPositions(AbstractDocument.java:1750) at org.eclipse.core.internal.filebuffers.SynchronizableDocument.getPositions(SynchronizableDocument.java:277) at org.eclipse.jface.text.source.AnnotationModel.getRegionAnnotationIterator(AnnotationModel.java:737) at org.eclipse.jface.text.source.AnnotationModel.getAnnotationIterator(AnnotationModel.java:699) at org.eclipse.jface.text.source.AnnotationRulerColumn.doPaint1(AnnotationRulerColumn.java:727) at org.eclipse.jface.text.source.AnnotationRulerColumn.doubleBufferPaint(AnnotationRulerColumn.java:541) at org.eclipse.jface.text.source.AnnotationRulerColumn.redraw(AnnotationRulerColumn.java:824) at org.eclipse.jface.text.source.AnnotationRulerColumn$InternalListener.viewportChanged(AnnotationRulerColumn.java:79) at org.eclipse.jface.text.TextViewer.updateViewportListeners(TextViewer.java:3112) at org.eclipse.jface.text.TextViewer$ViewportGuard.keyReleased(TextViewer.java:299) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:168) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1282) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1267) at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1294) at org.eclipse.swt.widgets.Widget.gtk_key_release_event(Widget.java:736) at org.eclipse.swt.widgets.Control.gtk_key_release_event(Control.java:2854) at org.eclipse.swt.widgets.Widget.windowProc(Widget.java:1744) at org.eclipse.swt.widgets.Control.windowProc(Control.java:4800) at org.eclipse.swt.widgets.Display.windowProc(Display.java:4359) at org.eclipse.swt.internal.gtk.OS._gtk_main_do_event(Native Method) at org.eclipse.swt.internal.gtk.OS.gtk_main_do_event(OS.java:8253) at org.eclipse.swt.widgets.Display.eventProc(Display.java:1239) at org.eclipse.swt.internal.gtk.OS._g_main_context_iteration(Native Method) at org.eclipse.swt.internal.gtk.OS.g_main_context_iteration(OS.java:2255) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3158) at org.eclipse.jdt.text.tests.performance.EditorTestHelper.runEventQueue(EditorTestHelper.java:196) at org.eclipse.jdt.text.tests.performance.EditorTestHelper.runEventQueue(EditorTestHelper.java:192) at org.eclipse.jdt.text.tests.performance.EditorTestHelper.runEventQueue(EditorTestHelper.java:184) at org.eclipse.jdt.text.tests.performance.MoveLineTest.measureMoveLine(MoveLineTest.java:95) at org.eclipse.jdt.text.tests.performance.MoveLineTest.test(MoveLineTest.java:65) at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24) at junit.extensions.TestSetup$1.protect(TestSetup.java:23) at junit.extensions.TestSetup.run(TestSetup.java:27) at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24) at junit.extensions.TestSetup$1.protect(TestSetup.java:23) at junit.extensions.TestSetup.run(TestSetup.java:27) at org.eclipse.test.EclipseTestRunner.run(EclipseTestRunner.java:377) at org.eclipse.test.EclipseTestRunner.run(EclipseTestRunner.java:210) at org.eclipse.test.UITestApplication$2.run(UITestApplication.java:197) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3514) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3163) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438) at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115) at org.eclipse.test.UITestApplication.runApplication(UITestApplication.java:140) at org.eclipse.test.UITestApplication.run(UITestApplication.java:62) at org.eclipse.test.UITestApplication.start(UITestApplication.java:212) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:621) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:576) at org.eclipse.equinox.launcher.Main.run(Main.java:1409) at org.eclipse.equinox.launcher.Main.main(Main.java:1385) at org.eclipse.core.launcher.Main.main(Main.java:34) ############## :-( There are four tests in question here - TextMoveLineTest - JavaMoveLineTest - JavaReplaceAllTest - JavaReplaceAllWithQuickDiffTest I was looking at the performance data with Satyam, and found that all these tests fail together quite often, but it is not so in all cases. For example, in some cases TextMoveLineTest passes but JavaMoveLineTest passes. In some cases one of JavaReplace* passes but JavaMoveLineTest fails. Plus the failures are intermittent, and quite difficult to reproduce. (In reply to comment #5) > There are four tests in question here > - TextMoveLineTest > - JavaMoveLineTest > - JavaReplaceAllTest > - JavaReplaceAllWithQuickDiffTest Filed bug 336514 for for JavaReplaceAllTest. This bug will deal with *MoveLineTests. (In reply to comment #6) > Filed bug 336514 for for JavaReplaceAllTest. This bug will deal with > *MoveLineTests. I think both these bugs are caused by Bug 323044. Created attachment 188881 [details]
proposed fix
Calling EditorTestHelper.runEventQueue() multiple times seems to be executing the same event multiple times on Linux (a bug ?). If I just call it just once, the test seems to be working, at least it does not fail on my Linux machine anymore. I have tested this fix on WinXP as well. Dani, ok to release this fix in HEAD ? (In reply to comment #9) > Calling EditorTestHelper.runEventQueue() multiple times seems to be executing > the same event multiple times on Linux (a bug ?). "seems" or "does"? If "does" then it's a bug. You should be able to check that using a display filter. (In reply to comment #11) > (In reply to comment #9) > > Calling EditorTestHelper.runEventQueue() multiple times seems to be executing > > the same event multiple times on Linux (a bug ?). > "seems" or "does"? If "does" then it's a bug. You should be able to check that > using a display filter. The display filter gets the same number of key events that we generate from our code. It could be an OS issue... (In reply to comment #10) > Dani, ok to release this fix in HEAD ? First - Verify that the changes don't affect the performance (if it does, we need to backport the fix. - Update the copyright date. - Get rid of remaining (old) warnings in that file. If that's done you can commit to HEAD. Created attachment 188894 [details]
final fix
Fixed in HEAD.
Performance numbers are not affected.
*Without patch*
Scenario 'org.eclipse.jdt.text.tests.performance.JavaMoveLineTest#test()' (average over 5 samples):
Used Java Heap: -9.65M (95% in [-33.69M, 14.4M]) Measurable effect: 34.64M (1.8 SDs) (required sample size for an effect of 5% of stdev: 6401)
Working Set: -1.25M (95% in [-2.68M, 174.51K]) Measurable effect: 2.05M (1.8 SDs) (required sample size for an effect of 5% of mean: 5356)
Committed: -1.29M (95% in [-2.63M, 44.48K]) Measurable effect: 1.93M (1.8 SDs) (required sample size for an effect of 5% of mean: 4435)
Working Set Peak: 0 (95% in [0, 0])
Elapsed Process: 2.01s (95% in [1.95s, 2.08s]) Measurable effect: 91ms (1.8 SDs)
Kernel time: 1.04s (95% in [929ms, 1.15s]) Measurable effect: 159ms (1.8 SDs) (required sample size for an effect of 5% of mean: 47)
Page Faults: 440 (95% in [-64, 945]) Measurable effect: 727 (1.8 SDs) (required sample size for an effect of 5% of mean: 5458)
CPU Time: 2.14s (95% in [1.84s, 2.43s]) Measurable effect: 420ms (1.8 SDs) (required sample size for an effect of 5% of mean: 78)
GDI Objects: 0 (95% in [0, 0])
*With patch*
Scenario 'org.eclipse.jdt.text.tests.performance.JavaMoveLineTest#test()' (average over 5 samples):
Used Java Heap: -13.68M (95% in [-15.82M, -11.54M]) Measurable effect: 3.08M (1.8 SDs) (required sample size for an effect of 5% of mean: 102)
Working Set: 1.43M (95% in [-2.97M, 5.84M]) Measurable effect: 6.34M (1.8 SDs) (required sample size for an effect of 5% of stdev: 6401)
Committed: 1.46M (95% in [-3.11M, 6.03M]) Measurable effect: 6.58M (1.8 SDs) (required sample size for an effect of 5% of stdev: 6401)
Working Set Peak: 0 (95% in [0, 0])
Elapsed Process: 1.9s (95% in [1.83s, 1.97s]) Measurable effect: 96ms (1.8 SDs) (required sample size for an effect of 5% of mean: 6)
Kernel time: 990ms (95% in [849ms, 1.13s]) Measurable effect: 203ms (1.8 SDs) (required sample size for an effect of 5% of mean: 85)
Page Faults: 1.2K (95% in [-419, 2.82K]) Measurable effect: 2.33K (1.8 SDs) (required sample size for an effect of 5% of stdev: 6401)
CPU Time: 2.15s (95% in [1.81s, 2.49s]) Measurable effect: 494ms (1.8 SDs) (required sample size for an effect of 5% of mean: 106)
GDI Objects: 0 (95% in [0, 0])
The test completed successfully on the latest I-Build http://download.eclipse.org/eclipse/downloads/drops/I20110215-0800/performance/eplnx2/Scenario114.html Deepak, Can you please release the fix on the baseline branch too? There is a huge regression on Linux. (In reply to comment #16) > Deepak, > Can you please release the fix on the baseline branch too? There is a huge > regression on Linux. This contradicts to comment 14: "Performance numbers are not affected." Details please. (In reply to comment #17) > This contradicts to comment 14: "Performance numbers are not affected." > > Details please. I think the numbers were taken on windows machine and there is no regression there. On Linux, the baseline shows 73ms and the 3.7 shows 975ms. There is no regression in the sense that the performance has NOT degraded, as can be seen on Windows. However the baseline for Linux isn't perfect, because the test was also not perfect. However the numbers on Linux after the fix are consistent and similar to the numbers on other platforms. (In reply to comment #19) > There is no regression in the sense that the performance has NOT degraded, as > can be seen on Windows. > > However the baseline for Linux isn't perfect, because the test was also not > perfect. However the numbers on Linux after the fix are consistent and similar > to the numbers on other platforms. Sounds good then. Please backport to 'perf_36x' and release it into the 'org.eclipse.releng' project from the same branch. Fix backported to 'perf_36x' and released. . |