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

Timeout on Tycho 4/5 builds #2895

Closed
cdietrich opened this issue Jan 8, 2024 · 40 comments · Fixed by #2915
Closed

Timeout on Tycho 4/5 builds #2895

cdietrich opened this issue Jan 8, 2024 · 40 comments · Fixed by #2915

Comments

@cdietrich
Copy link
Member

Tycho 4/5 builds regularly get killed due to hanging tests it seems
needs to be investigated

cc @LorenzoBettini @szarnekow

https://ci.eclipse.org/xtext/job/xtext/job/cd_tycho40/
https://ci.eclipse.org/xtext/job/xtext/job/cd_tycho50/

@cdietrich
Copy link
Member Author

SeveralEditorsQueuedBuildTest seems to be one culprit, SaveWithReconciliationQueuedBuildDataTest another one

@LorenzoBettini
Copy link
Contributor

Only in Jenkins? Or also on GitHub Actions?

@cdietrich
Copy link
Member Author

does this run on actions daily at all. not to MY knowledge

@LorenzoBettini
Copy link
Contributor

I meant the workflows that ran the first time you pushed those branches.

@cdietrich
Copy link
Member Author

this branches are month old and updated quite seldom only.
but i usually dont check github action results for them

@cdietrich
Copy link
Member Author

wonder if there is an option to get a jstack / thread dump on timeout

@cdietrich
Copy link
Member Author

cdietrich added a commit that referenced this issue Jan 8, 2024
…ad dump

Signed-off-by: Christian Dietrich <christian.dietrich.opensource@gmail.com>
@cdietrich
Copy link
Member Author

we might also have to set a test timeout.
right now its the jenkins job that times out

cdietrich added a commit that referenced this issue Jan 8, 2024
…ad dump

Signed-off-by: Christian Dietrich <christian.dietrich.opensource@gmail.com>
@LorenzoBettini
Copy link
Contributor

I don't know if that's the case, but the last time I saw a stuck job on Xtext GitHub Actions, which I had to cancel, was due to a small bug I introduced in my fork that caused Xtend renaming, throwing an exception. Of course, I could reproduce the bug locally: everything was stuck due to the Eclipse dialog showing the uncaught exception. With that dialog on the way, the tests did not proceed at all...

@cdietrich
Copy link
Member Author

hang can be reproduced locally
@szarnekow any idea
a2.log
what are we waiting for there

@cdietrich
Copy link
Member Author

maybe
org.eclipse.xtend.ide.tests.builder.JavaEditorExtension.waitForElementChangedEvent(int, ()=>void)
should get a timeout.
but that would lead to flaky tests i guess

@szarnekow
Copy link
Contributor

I'm pretty sure there should be an event since we change the content of the editor.
Very surprising.

@LorenzoBettini
Copy link
Contributor

If I understand correctly this problem shows up only since Tycho 4, right?
And it is a race condition?
I wonder if in Tycho they introduce some default configuration for parallel tests that break these tests.

@cdietrich
Copy link
Member Author

saw it run as plugin test.

@LorenzoBettini
Copy link
Contributor

saw it run as plugin test.

What do you mean?
It runs fine when executed from Eclipse?

@cdietrich
Copy link
Member Author

No it hang on the 10th attempt or so

@LorenzoBettini
Copy link
Contributor

Maybe trying with org.eclipse.xtend.ide.tests.builder.JavaEditorExtension.VERBOSE set to true and see what happens? I cannot reproduce it locally.

By the way,

	def waitForElementChangedEvent(int eventMask, =>void producer) {
		if (VERBOSE) {
			println('''start waiting for an element changed event: «eventMask»''')
		}
		val changed = new AtomicBoolean(false)
		JavaCore.addElementChangedListener(
			[
				JavaCore.removeElementChangedListener(self)
				if (!changed.get) {
					changed.set(true)
					if (VERBOSE) {
						println(it)
					}
				}
			], eventMask)
		producer.apply
		while (!changed.get) {
			if (Display.getCurrent() !== null) {
				while (Display.getDefault().readAndDispatch()) {
					// process queued ui events
				}
			}
		}
		if (VERBOSE) {
			println('''end waiting for an element changed event: «eventMask»''')
		}
	}

maybe it should never be the case but if Display.getCurrent() is null we never exit that while loop.

@cdietrich
Copy link
Member Author

log says start waiting for an element changed event: 1
with verbose.
15th attempt this time
which tp do you use?

@cdietrich
Copy link
Member Author

grafik

@cdietrich
Copy link
Member Author

maybe in recent jdt something about reconciliation has changed that it never happens

@LorenzoBettini
Copy link
Contributor

which tp do you use?

The latest. Reloaded this morning.

@cdietrich
Copy link
Member Author

am also using latest

@LorenzoBettini
Copy link
Contributor

What does the screenshot want to show? Is the program stuck there?

@cdietrich
Copy link
Member Author

yes. so the event is never produced

@LorenzoBettini
Copy link
Contributor

I cannot reproduce it on macOS m1 nor on a slower laptop with Linux...

On the screenshot, the console shows that the event has been caught and printed on the screen.

Could you please try this?

		while (!changed.get && Display.getDefault().readAndDispatch()) {
			if (VERBOSE) {
				println("readAndDispatch")
			}
		}

@cdietrich
Copy link
Member Author

leads to test errors with

/*******************************************************************************
 * Copyright (c) 2024 itemis AG (http://www.itemis.eu) and others.
 * This program and the accompanying materials are made available under the
 * terms of the Eclipse Public License 2.0 which is available at
 * http://www.eclipse.org/legal/epl-2.0.
 * 
 * SPDX-License-Identifier: EPL-2.0
 *******************************************************************************/
package org.eclipse.xtend.ide.tests.builder;

import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.runners.Suite.SuiteClasses;

/**
 * @author dietrich - Initial contribution and API
 */
@RunWith(Suite.class)
@SuiteClasses({
	SeveralEditorsQueuedBuildTest.class,	
	SeveralEditorsQueuedBuildTest.class,	
	SeveralEditorsQueuedBuildTest.class,	
	SeveralEditorsQueuedBuildTest.class,	
	SeveralEditorsQueuedBuildTest.class,	
	SeveralEditorsQueuedBuildTest.class,	
	SeveralEditorsQueuedBuildTest.class,	
	SeveralEditorsQueuedBuildTest.class,	
	SeveralEditorsQueuedBuildTest.class,	
	SeveralEditorsQueuedBuildTest.class,	
	SeveralEditorsQueuedBuildTest.class,	
	SeveralEditorsQueuedBuildTest.class,	
	SeveralEditorsQueuedBuildTest.class,	
	SeveralEditorsQueuedBuildTest.class,	
	SeveralEditorsQueuedBuildTest.class,	
	SeveralEditorsQueuedBuildTest.class,	
	SeveralEditorsQueuedBuildTest.class,	
	SeveralEditorsQueuedBuildTest.class,	
	SeveralEditorsQueuedBuildTest.class,	
	SeveralEditorsQueuedBuildTest.class,	
	SeveralEditorsQueuedBuildTest.class,	
	SeveralEditorsQueuedBuildTest.class,	
	SeveralEditorsQueuedBuildTest.class,	
	SeveralEditorsQueuedBuildTest.class,	
	SeveralEditorsQueuedBuildTest.class,	
	SeveralEditorsQueuedBuildTest.class,	
	SeveralEditorsQueuedBuildTest.class,	
	SeveralEditorsQueuedBuildTest.class,	
	SeveralEditorsQueuedBuildTest.class,	
	SeveralEditorsQueuedBuildTest.class,	
	SeveralEditorsQueuedBuildTest.class,	
	SeveralEditorsQueuedBuildTest.class,	
	SeveralEditorsQueuedBuildTest.class,	
})
public class DullySuite {

}

@LorenzoBettini
Copy link
Contributor

Yes, on this line (assertThereAreNotDeltas)

		barEditor.save
		queuedBuildDataContribution.unconfirmedDeltas.assertThereAreDeltas("mypackage.Bar")
		queuedBuildData.andRemovePendingDeltas.assertThereAreNotDeltas

@LorenzoBettini
Copy link
Contributor

...but only sometimes on my computer (though I'm not using your suite)

cdietrich added a commit that referenced this issue Jan 31, 2024
…ad dump

Signed-off-by: Christian Dietrich <christian.dietrich.opensource@gmail.com>
cdietrich added a commit that referenced this issue Feb 18, 2024
…ad dump

Signed-off-by: Christian Dietrich <christian.dietrich.opensource@gmail.com>
cdietrich added a commit that referenced this issue Feb 20, 2024
…ad dump

Signed-off-by: Christian Dietrich <christian.dietrich.opensource@gmail.com>
cdietrich added a commit that referenced this issue Feb 25, 2024
…ad dump

Signed-off-by: Christian Dietrich <christian.dietrich.opensource@gmail.com>
cdietrich added a commit that referenced this issue Feb 27, 2024
…ad dump

Signed-off-by: Christian Dietrich <christian.dietrich.opensource@gmail.com>
cdietrich added a commit that referenced this issue Mar 7, 2024
…ad dump

Signed-off-by: Christian Dietrich <christian.dietrich.opensource@gmail.com>
LorenzoBettini pushed a commit that referenced this issue Mar 7, 2024
…ad dump

Signed-off-by: Christian Dietrich <christian.dietrich.opensource@gmail.com>
LorenzoBettini pushed a commit that referenced this issue Mar 7, 2024
…ad dump

Signed-off-by: Christian Dietrich <christian.dietrich.opensource@gmail.com>
cdietrich added a commit that referenced this issue Apr 4, 2024
…ad dump

Signed-off-by: Christian Dietrich <christian.dietrich.opensource@gmail.com>
cdietrich added a commit that referenced this issue Apr 16, 2024
…ad dump

Signed-off-by: Christian Dietrich <christian.dietrich.opensource@gmail.com>
cdietrich added a commit that referenced this issue Apr 22, 2024
…ad dump

Signed-off-by: Christian Dietrich <christian.dietrich.opensource@gmail.com>
cdietrich added a commit that referenced this issue Apr 25, 2024
…ad dump

Signed-off-by: Christian Dietrich <christian.dietrich.opensource@gmail.com>
cdietrich added a commit that referenced this issue May 8, 2024
…ad dump

Signed-off-by: Christian Dietrich <christian.dietrich.opensource@gmail.com>
cdietrich added a commit that referenced this issue May 16, 2024
…ad dump

Signed-off-by: Christian Dietrich <christian.dietrich.opensource@gmail.com>
cdietrich added a commit that referenced this issue May 21, 2024
…ad dump

Signed-off-by: Christian Dietrich <christian.dietrich.opensource@gmail.com>
cdietrich added a commit that referenced this issue May 21, 2024
…ad dump

Signed-off-by: Christian Dietrich <christian.dietrich.opensource@gmail.com>
cdietrich added a commit that referenced this issue May 26, 2024
…ad dump

Signed-off-by: Christian Dietrich <christian.dietrich.opensource@gmail.com>
cdietrich added a commit that referenced this issue Jun 6, 2024
…ad dump

Signed-off-by: Christian Dietrich <christian.dietrich.opensource@gmail.com>
cdietrich added a commit that referenced this issue Jun 8, 2024
…ad dump

Signed-off-by: Christian Dietrich <christian.dietrich.opensource@gmail.com>
cdietrich added a commit that referenced this issue Jun 11, 2024
…ad dump

Signed-off-by: Christian Dietrich <christian.dietrich.opensource@gmail.com>
cdietrich added a commit that referenced this issue Jun 13, 2024
…ad dump

Signed-off-by: Christian Dietrich <christian.dietrich.opensource@gmail.com>
cdietrich added a commit that referenced this issue Jun 13, 2024
…ad dump

Signed-off-by: Christian Dietrich <christian.dietrich.opensource@gmail.com>
cdietrich added a commit that referenced this issue Jun 13, 2024
…ad dump

Signed-off-by: Christian Dietrich <christian.dietrich.opensource@gmail.com>
cdietrich added a commit that referenced this issue Jun 17, 2024
…ad dump

Signed-off-by: Christian Dietrich <christian.dietrich.opensource@gmail.com>
cdietrich added a commit that referenced this issue Jun 26, 2024
…ad dump

Signed-off-by: Christian Dietrich <christian.dietrich.opensource@gmail.com>
cdietrich added a commit that referenced this issue Jun 26, 2024
Signed-off-by: Christian Dietrich <christian.dietrich@itemis.de>

[#2895] attempt to archive surefire reports in the hope to get a thread dump

Signed-off-by: Christian Dietrich <christian.dietrich.opensource@gmail.com>

in timeout see #3073

add another 10 mins

Signed-off-by: Christian Dietrich <christian.dietrich.opensource@gmail.com>
cdietrich added a commit that referenced this issue Jun 26, 2024
Signed-off-by: Christian Dietrich <christian.dietrich@itemis.de>

[#2895] attempt to archive surefire reports in the hope to get a thread dump

Signed-off-by: Christian Dietrich <christian.dietrich.opensource@gmail.com>

in timeout see #3073

add another 10 mins

Signed-off-by: Christian Dietrich <christian.dietrich.opensource@gmail.com>
cdietrich added a commit that referenced this issue Jun 26, 2024
Signed-off-by: Christian Dietrich <christian.dietrich@itemis.de>

[#2895] attempt to archive surefire reports in the hope to get a thread dump

Signed-off-by: Christian Dietrich <christian.dietrich.opensource@gmail.com>

in timeout see #3073

add another 10 mins

Signed-off-by: Christian Dietrich <christian.dietrich.opensource@gmail.com>
cdietrich added a commit that referenced this issue Jun 29, 2024
Signed-off-by: Christian Dietrich <christian.dietrich@itemis.de>

[#2895] attempt to archive surefire reports in the hope to get a thread dump

Signed-off-by: Christian Dietrich <christian.dietrich.opensource@gmail.com>

in timeout see #3073

add another 10 mins

Signed-off-by: Christian Dietrich <christian.dietrich.opensource@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants