eclipse / xtext

Eclipse Xtext™ is a language development framework
http://www.eclipse.org/Xtext
Eclipse Public License 2.0
767 stars 320 forks source link

Investigate if we can run on normal non 6gb image #2202

Open cdietrich opened 1 year ago

cdietrich commented 1 year ago

Investigate if we can run on normal non 6gb image on jenkins

LorenzoBettini commented 1 year ago

@cdietrich what would that imply? As far as I know, we only need Xvnc for UI and SWTBot tests

cdietrich commented 1 year ago

i assume we could have more than 2 parallel builds ... the question can the tests handle it or will we oom. dont know with which xmxes we start plugin tests and the build itself

LorenzoBettini commented 1 year ago

@cdietrich I think GitHub Actions provides 7Gb of RAM. Do you know how much RAM the normal JIRO images provide?

cdietrich commented 1 year ago

4 For Xtend we used therefore the 6gb image but I don’t know if this is really needed

LorenzoBettini commented 1 year ago

@cdietrich let's see what happens: https://github.com/eclipse/xtext/tree/lb_2202_centos-8

LorenzoBettini commented 1 year ago

first impressions: the job started immediately... UI tests are running... let's see what happens with Xtend...

LorenzoBettini commented 1 year ago

@cdietrich unfortunately, it didn't work:

org.eclipse.xtend.core.tests.build.XtendIncrementalBuilderPerformanceTest.testPerf51200(org.eclipse.xtend.core.tests.build.XtendIncrementalBuilderPerformanceTest)
19:47:53    Run 1: XtendIncrementalBuilderPerformanceTest.testPerf51200 » OutOfMemory Java heap s...
19:47:53    Run 2: XtendIncrementalBuilderPerformanceTest.testPerf51200 » OutOfMemory Java heap s...
19:47:53    Run 3: XtendIncrementalBuilderPerformanceTest.testPerf51200 » OutOfMemory Java heap s...
19:47:53    Run 4: XtendIncrementalBuilderPerformanceTest.testPerf51200 » OutOfMemory Java heap s...
19:47:53 
cdietrich commented 1 year ago

the question is: can and should we make the test smaller cc @szarnekow

LorenzoBettini commented 1 year ago

just an experiment, I tried commenting out testPerf51200, let's see how it goes...

LorenzoBettini commented 1 year ago

unfortunately, we then get another failure later:

Running org.eclipse.xtend.ide.tests.quickfix.AddJunitLibToClasspathQuickfixTest

With this reason

[ERROR] Failed to execute goal org.eclipse.tycho:tycho-surefire-plugin:2.7.5:test (default-test) on project org.eclipse.xtend.ide.tests: An unexpected error occurred while launching the test runtime (process returned error code 137(SIGKILL received?)). The process logfile /home/jenkins/agent/workspace/xtext_lb_2202_centos-8/org.eclipse.xtend.ide.tests/target/work/data/.metadata/.log might contain further details. Command-line used to launch the sub-process was /opt/tools/java/temurin/jdk-11/latest/bin/java -Dosgi.noShutdown=false -Dosgi.os=linux -Dosgi.ws=gtk -Dosgi.arch=x86_64 -Xmx1500m -Dosgi.clean=true -jar /home/jenkins/.m2/repository/p2/osgi/bundle/org.eclipse.equinox.launcher/1.6.400.v20210924-0641/org.eclipse.equinox.launcher-1.6.400.v20210924-0641.jar -data /home/jenkins/agent/workspace/xtext_lb_2202_centos-8/org.eclipse.xtend.ide.tests/target/work/data -install /home/jenkins/agent/workspace/xtext_lb_2202_centos-8/org.eclipse.xtend.ide.tests/target/work -configuration /home/jenkins/agent/workspace/xtext_lb_2202_centos-8/org.eclipse.xtend.ide.tests/target/work/configuration -application org.eclipse.tycho.surefire.osgibooter.uitest -testproperties /home/jenkins/agent/workspace/xtext_lb_2202_centos-8/org.eclipse.xtend.ide.tests/target/surefire.properties -pluginCustomization /home/jenkins/agent/workspace/xtext_lb_2202_centos-8/org.eclipse.xtend.ide.tests/../releng/org.eclipse.xtend.tycho.tests.parent/pluginCustomization.ini in working directory /home/jenkins/agent/workspace/xtext_lb_2202_centos-8/org.eclipse.xtend.ide.tests

and, as you might guess, error code 137 indicates that the container was terminated due to an out of memory issue.

cdietrich commented 1 year ago

yes i assume so. the question is what eats so much

LorenzoBettini commented 1 year ago

The archived log file does not seem to show any helpful trace from the first inspection. In any case, I'd say 4 Gb is too few in general...

cdietrich commented 1 year ago

@LorenzoBettini maybe we can experiment with something like https://gist.github.com/rednaxelafx/1513061 and archive the histogram maybe this gives an indication (e.g. too many open editors ...) am also no sure how much memory the host maven process takes. is it also 2gb. if yes do we need so much.

LorenzoBettini commented 1 year ago

@cdietrich I'm afraid I have no experience with memory dumps, profilers and the likes :( you might want to try to reduce the MAVEN_OPTS memory, or remove it completely. You can do that on top of the branch I pushed yesterday. In general, is there any way to beg... ehm... ask the Eclipse foundation to give us more memory or parallel jobs with 6Gb? O:)

cdietrich commented 1 year ago

i assume it wont be possible to have more machines. this would require a memory company to assign "their" budget to the project to my knowledge.

cdietrich commented 1 year ago

hmmm in test.parent we seem to set Xmx to 1500m anyway. so i wonder if the host maven then really eats too much und then the test eclipe actually starts to really allocate all of it

LorenzoBettini commented 1 year ago

Will you do some experiments? I'm experimenting with the toolchain stuff.

cdietrich commented 1 year ago

Will you do some experiments? yes

LorenzoBettini commented 1 year ago

by the way, I wonder if using a local virtual machine with only 4Gb would make experiments easier

cdietrich commented 1 year ago

yes but i dont have such a one. nor a usable docker setup. the images for cbi should be available there

LorenzoBettini commented 1 year ago

@cdietrich I saw that it once worked on Jenkins! Was it by chance?

cdietrich commented 1 year ago

its failing at random places. e.g. also the war plugin for the jetty example

cdietrich commented 1 year ago

this i also can see local if i run all project with 512m when i look into the war i at least see a ton of compile time deps like mwe and emf codegen

cdietrich commented 1 year ago

locall 1024 work fine (with no tests). will also try 768 @LorenzoBettini do we run maven surefire in fork mode or in the maven vm

LorenzoBettini commented 1 year ago

@cdietrich I don't think we touch the defaults under that respect. I wouldn't even know what would happen...

cdietrich commented 1 year ago

Of course on my local linux box it works perfectly fine with Xmx1G set in Maven Opts