Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple SWT/UI test failures on Windows since I20240923-0040 or I20240918-0950 #1486

Open
iloveeclipse opened this issue Sep 24, 2024 · 19 comments
Labels
bug Something isn't working help wanted Extra attention is needed regression Something that used to work Windows Happens on Windows OS

Comments

@iloveeclipse
Copy link
Member

See https://download.eclipse.org/eclipse/downloads/drops4/I20240923-1800/testresults/html/org.eclipse.swt.tests_ep434I-unit-win32-java17_win32.win32.x86_64_17.html

Last known good state: I20240917-1800.

After that we didn't had any Windows test executed.

They started to run again with I20240923-0040, showing 38 test failures in SWT and many Jface & platform UI tests.

Restarting Windows test machine didn't help so far: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/issues/4410

@iloveeclipse iloveeclipse added bug Something isn't working regression Something that used to work Windows Happens on Windows OS labels Sep 24, 2024
@deepika-u
Copy link
Contributor

From the recent results => https://download.eclipse.org/eclipse/downloads/drops4/I20240924-1810/testResults.php

We dont see any of these failures.

@iloveeclipse
Copy link
Member Author

We dont see any of these failures

Because we don't see Windows test results yet

@jukzi
Copy link
Contributor

jukzi commented Sep 27, 2024

in
https://download.eclipse.org/eclipse/downloads/drops4/I20240926-1800/testresults/consolelogs/ep434I-unit-win32-java17_win32.win32.x86_64_17_consolelog.txt
first exception is

     [echo] Running org.eclipse.ui.tests.UiTestSuite. Result file: C:\Users\genie.releng\workspace\AutomatedTests\ep434I-unit-win32-java17/workarea/I20240926-1800/eclipse-testing/results/ep434I-unit-win32-java17_win32.win32.x86_64_17/org.eclipse.ui.tests.UiTestSuite.xml
     [echo] timout property: 7200000
     [echo] frameworkvmargs:  -Xms256m -Xmx2048m  -Djava.security.manager=allow
     [echo] vmargs: 
     [echo] extraVMargs: 
     [echo] frameworkperfargs: 
     [echo] crash loglocationarg (if any): ${loglocationarg}
     [echo] crash loglocation (if not default): 
     [java] Sep 27, 2024 1:46:17 AM org.apache.aries.spifly.BaseActivator log
     [java] INFO: Registered provider org.slf4j.simple.SimpleServiceProvider of service org.slf4j.spi.SLF4JServiceProvider in bundle slf4j.simple
     [java] WARNING: Annotation classes from the 'javax.inject' or 'javax.annotation' package found.
     [java] It is recommended to migrate to the corresponding replacements in the jakarta namespace.
     [java] The Eclipse E4 Platform will remove support for those javax-annotations in a future release.
     [java] To suppress this warning, set the VM property: -Declipse.e4.inject.javax.warning=false
     [java] To disable processing of 'javax' annotations entirely, set the VM property: -Declipse.e4.inject.javax.disabled=true
     [java] 
     [java] INFO: timeoutScreenOutputDir: C:\Users\genie.releng\workspace\AutomatedTests\ep434I-unit-win32-java17\workarea\I20240926-1800\eclipse-testing\results\ep434I-unit-win32-java17_win32.win32.x86_64_17/timeoutScreens
     [java] INFO: timeout: 7200000
     [java] categoryChanged
     [java] OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended
     [java] Error while informing user about event loop exception:
     [java] org.eclipse.swt.SWTError: No more handles
     [java] 	at org.eclipse.swt.SWT.error(SWT.java:4948)
     [java] 	at org.eclipse.swt.SWT.error(SWT.java:4837)
     [java] 	at org.eclipse.swt.SWT.error(SWT.java:4808)
     [java] 	at org.eclipse.swt.widgets.Widget.error(Widget.java:500)
     [java] 	at org.eclipse.swt.widgets.Control.createHandle(Control.java:675)
     [java] 	at org.eclipse.swt.widgets.Scrollable.createHandle(Scrollable.java:146)
     [java] 	at org.eclipse.swt.widgets.Composite.createHandle(Composite.java:300)
     [java] 	at org.eclipse.swt.widgets.Decorations.createHandle(Decorations.java:366)
     [java] 	at org.eclipse.swt.widgets.Shell.createHandle(Shell.java:617)
     [java] 	at org.eclipse.swt.widgets.Control.createWidget(Control.java:701)
     [java] 	at org.eclipse.swt.widgets.Scrollable.createWidget(Scrollable.java:161)
     [java] 	at org.eclipse.swt.widgets.Decorations.createWidget(Decorations.java:375)
     [java] 	at org.eclipse.swt.widgets.Shell.<init>(Shell.java:313)
     [java] 	at org.eclipse.swt.widgets.Shell.<init>(Shell.java:392)
     [java] 	at org.eclipse.jface.window.Window.createShell(Window.java:487)
     [java] 	at org.eclipse.jface.window.Window.create(Window.java:430)
     [java] 	at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1092)
     [java] 	at org.eclipse.jface.window.Window.open(Window.java:788)
     [java] 	at org.eclipse.ui.internal.progress.BlockedJobsDialog$1.runInUIThread(BlockedJobsDialog.java:109)
     [java] 	at org.eclipse.ui.progress.UIJob.lambda$0(UIJob.java:148)
     [java] 	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:40)
     [java] 	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:132)
     [java] 	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4099)
     [java] 	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3715)
     [java] 	at org.eclipse.ui.internal.dialogs.EventLoopProgressMonitor.runEventLoop(EventLoopProgressMonitor.java:124)
     [java] 	at org.eclipse.ui.internal.dialogs.EventLoopProgressMonitor.isCanceled(EventLoopProgressMonitor.java:98)
     [java] 	at org.eclipse.core.internal.jobs.ThreadJob.isCanceled(ThreadJob.java:154)
     [java] 	at org.eclipse.core.internal.jobs.ThreadJob.waitForRun(ThreadJob.java:286)
     [java] 	at org.eclipse.core.internal.jobs.ThreadJob.joinRun(ThreadJob.java:214)
     [java] 	at org.eclipse.core.internal.jobs.ImplicitJobs.begin(ImplicitJobs.java:95)
     [java] 	at org.eclipse.core.internal.jobs.JobManager.beginRule(JobManager.java:343)
     [java] 	at org.eclipse.ui.tests.concurrency.NoFreezeWhileWaitingForRuleTest.lambda$1(NoFreezeWhileWaitingForRuleTest.java:146)
     [java] 	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:40)
     [java] 	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:132)
     [java] 	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4099)
     [java] 	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3715)
     [java] 	at org.eclipse.ui.tests.concurrency.NoFreezeWhileWaitingForRuleTest.testWaiting(NoFreezeWhileWaitingForRuleTest.java:88)

the same occured in https://download.eclipse.org/eclipse/downloads/drops4/I20240926-0020/testresults/consolelogs/ep434I-unit-win32-java17_win32.win32.x86_64_17_consolelog.txt

locally for me NoFreezeWhileWaitingForRuleTest runs fine.

@jukzi jukzi added the help wanted Extra attention is needed label Sep 27, 2024
@jukzi jukzi pinned this issue Sep 27, 2024
@iloveeclipse
Copy link
Member Author

I've reopened https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/issues/4410.
I assume something is wrong with the Azure Windows test instance.

@iloveeclipse
Copy link
Member Author

In SWT & JFace tests I see following error reported multiple times:

Error: Could not find or load main class org.eclipse.test.AwtScreenshot
Caused by: java.lang.ClassNotFoundException: org.eclipse.test.AwtScreenshot
AwtScreenshot VM finished with exit code 1.

See

Could it be, it is our (SDK) issue and not Windows machine problem?

@laeubi
Copy link
Contributor

laeubi commented Oct 7, 2024

Could it be, it is our (SDK) issue and not Windows machine problem?

Is there a full stack trace available?

@iloveeclipse
Copy link
Member Author

No

@jukzi
Copy link
Contributor

jukzi commented Oct 7, 2024

Error: Could not find or load main class org.eclipse.test.AwtScreenshot

that split package was recently moved from perfromance to eclipse.test @akurtakov

@akurtakov
Copy link
Member

There was only one o.e.test.AwtScreenshot (in o.e.test bundle) and it gets only additions after the split package removal eclipse-platform/eclipse.platform.releng.aggregator@6e6a136#diff-4234e8d1a72f1bd53d546bc92ce417bac8b765082c1728d2a9356a74ef507c7e . I fail to see a relation for now.

@jukzi
Copy link
Contributor

jukzi commented Oct 7, 2024

org.eclipse.test.performance had bundle shape jar, while org.eclipse.test has Eclipse-BundleShape: dir and may need the same fix as eclipse-jdt/eclipse.jdt.debug@11d1f99

jukzi pushed a commit to jukzi/eclipse.platform.releng.aggregator that referenced this issue Oct 7, 2024
for "Eclipse-BundleShape: dir" in MANIFEST.MF

fix "Error: Could not find or load main class
org.eclipse.test.AwtScreenshot"

eclipse-platform/eclipse.platform.swt#1486
jukzi pushed a commit to jukzi/eclipse.platform.releng.aggregator that referenced this issue Oct 7, 2024
for "Eclipse-BundleShape: dir" in MANIFEST.MF

fix "Error: Could not find or load main class
org.eclipse.test.AwtScreenshot"

eclipse-platform/eclipse.platform.swt#1486
jukzi pushed a commit to eclipse-platform/eclipse.platform.releng.aggregator that referenced this issue Oct 7, 2024
for "Eclipse-BundleShape: dir" in MANIFEST.MF

fix "Error: Could not find or load main class
org.eclipse.test.AwtScreenshot"

eclipse-platform/eclipse.platform.swt#1486
@jukzi
Copy link
Contributor

jukzi commented Oct 8, 2024

Error: Could not find or load main class org.eclipse.test.AwtScreenshot

was unrelated to the many fails- now its gone:

AWT screenshot saved to: C:\Users\genie.releng\workspace\AutomatedTests\ep434I-unit-win32-java17\workarea\I20241007-1800\eclipse-testing\results\ep434I-unit-win32-java17_win32.win32.x86_64_17\org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_Tree.test_Virtual.png
https://download.eclipse.org/eclipse/downloads/drops4/I20241007-1800/testresults/ep434I-unit-win32-java17_win32.win32.x86_64_17/org.eclipse.swt.tests.junit.AllNonBrowserTests.txt

The screenshots of the failed tests are now available for download:
image
https://download.eclipse.org/eclipse/downloads/drops4/I20241007-1800/logs.php#console

however they seem to be not helpfull (just black screen)

@basilevs
Copy link
Contributor

basilevs commented Oct 8, 2024

Black screen is a symptom that someone has logged in to the host via RDP and then disconnected normally. Ask to reboot the host and not to touch RDP.
Also, disable Screensaver, power saving, auto lock, enable auto login on boot, ensure to run build system agent as a logged in user (not as as a system service) . But those were probably already done.

I don't have time to look for a better source, so here is relevant instructional article for a random product.

https://docs.testarchitect.com/user-guide/support/frequently-asked-questions/disconnecting-from-remote-desktop-while-executing-automated-tests/
https://superuser.com/q/80334/28322

Note, that locked out GUI sessions skip (do not emit) a few types of system events like Paint, so tests done on "black screen" are invalid.

@HeikoKlare
Copy link
Contributor

Could it be, it is our (SDK) issue and not Windows machine problem?

That would mean that there was a causing change in the period of time in which the failures first occured (this is, after 17th September). Some test failures already occur in SWT tests (i.e., at the beginning of the dependency chain). In SWT itself, there was only a single change in the period of time in which tests started to fail, and it seems unlikely that this change has caused the problems. I am not sure if changes to the other projects/bundles may also affect the SWT tests in I-Builds, since even the SWT tests are run in an Equinox environment against all the SDK dependencies, aren't they?

in https://download.eclipse.org/eclipse/downloads/drops4/I20240926-1800/testresults/consolelogs/ep434I-unit-win32-java17_win32.win32.x86_64_17_consolelog.txt first exception is

     ...
     [java] Error while informing user about event loop exception:
     [java] org.eclipse.swt.SWTError: No more handles
     [java] 	at org.eclipse.swt.SWT.error(SWT.java:4948)

While those errors appeared together with the discussed test failures and thus there will probably be some relation, they do not seem to be an indicator for a root cause. Those error appear in the logs after several of the failing tests (in particular the SWT tests) have already been executed. The SWT tests run without any of those "no more handles" errors.

With respect to a potential cause in the infrastructure, no further actions seem to be taken according to the helpdesk issue: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/issues/4410, e.g., in response to the comments of Vasili (https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/issues/4410#note_2832799) or Jörg (https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/issues/4410#note_2829466).

In order to isolate the root cause (in particular SDK vs. infrastructure): would it be possible (with low effort) to temporarily (for testing purposes) move the Windows job on a different node? E.g., there is still the Windows 10 node (https://ci.eclipse.org/releng/computer/rs68g%2Dwin10/).

@jukzi
Copy link
Contributor

jukzi commented Oct 18, 2024

created https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/issues/5181

@iloveeclipse
Copy link
Member Author

Hurra, we don't have Windows test failures anymore... because tests don't run anymore on Windows...
see eclipse-platform/eclipse.platform.releng.aggregator#2468

@merks
Copy link
Contributor

merks commented Oct 21, 2024

Oh dear. That is one way to address the problem.

@jukzi
Copy link
Contributor

jukzi commented Oct 22, 2024 via email

@basilevs
Copy link
Contributor

basilevs commented Oct 22, 2024

for example by executing the failing test only.

I suggest to create a dedicated test that would fail only if no PAINT events are happening and run that in a loop. Verify that it fails on Windows, when the console running the test is locked.

checkswtpaintevent.zip are sources for a simple Eclipse application that opens and repeatedly resizes a window to receive paint events from OS. It exits with a non-zero exit code when paint events are not received as expected. So far I was unable to reproduce the missing events using Windows 11 VM on aarch64 on locked screen and on Windows 11 VM x86_64 by disconnecting RDP.
I assume that resize is not a complex enough operation for Windows to optimize-out without graphical context. Further effort is required.

Prebuilt:
checkswtpaintevent_dist.zip (6Mb)
Start with java --add-modules=ALL-SYSTEM -jar .\eclipse\plugins\org.eclipse.equinox.launcher_1.6.900.v20240613-2009.jar -consoleLog

@deepika-u
Copy link
Contributor

Apart from recent consistent 38 failures on windows, there is a new test failure for the test case test_OpenWindowListener_open_ChildPopup but its a case of timeout.
-> https://download.eclipse.org/eclipse/downloads/drops4/I20241024-1800/testresults/html/org.eclipse.swt.tests_ep434I-unit-win32-java17_win32.win32.x86_64_17.html#AllBrowserTests

Test timed out.

java.lang.AssertionError:
Test timed out.
at org.junit.Assert.fail(Assert.java:89)
at org.junit.Assert.assertTrue(Assert.java:42)
at org.eclipse.swt.tests.junit.Test_org_eclipse_swt_browser_Browser.test_OpenWindowListener_open_ChildPopup(Test_org_eclipse_swt_browser_Browser.java:814)
at java.base/java.lang.reflect.Method.invoke(Method.java:569)
at org.eclipse.test.TracingSuite.runChild(TracingSuite.java:287) 

I think this if reattempted/rerun should pass is my understanding. Am i correct?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed regression Something that used to work Windows Happens on Windows OS
Projects
None yet
Development

No branches or pull requests

8 participants