Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 561967

Summary: [Tests] 3 tests failing on cen64-gtk3 since I20200406-0350
Product: [Eclipse Project] JDT Reporter: Sarika Sinha <sarika.sinha>
Component: DebugAssignee: Sarika Sinha <sarika.sinha>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: akurtakov, daniel_megert, loskutov, lshanmug, mikael.barbero, sravankumarl
Version: 4.16   
Target Milestone: 4.17 M3   
Hardware: Other   
OS: Linux   
See Also: https://bugs.eclipse.org/bugs/show_bug.cgi?id=562681
https://git.eclipse.org/r/163666
https://git.eclipse.org/c/jdt/eclipse.jdt.debug.git/commit/?id=9746b04bceedb83f12158e4e219054cb966815b5
https://git.eclipse.org/r/163729
https://git.eclipse.org/c/jdt/eclipse.jdt.debug.git/commit/?id=5e2ee41758355d9ed945a8ec9ba5be31396dac75
https://git.eclipse.org/r/165133
https://git.eclipse.org/c/jdt/eclipse.jdt.debug.git/commit/?id=9427c5d59338815d3d380b9d1be1e58f17c8085e
https://git.eclipse.org/r/165312
https://git.eclipse.org/c/jdt/eclipse.jdt.debug.git/commit/?id=28c7b4f050b9b4a090ddcb319add22f56def858b
https://git.eclipse.org/r/c/jdt/eclipse.jdt.debug/+/166988
https://git.eclipse.org/c/jdt/eclipse.jdt.debug.git/commit/?id=78383e99825a9a02e2b832326b78501e985d9de8
Whiteboard:
Bug Depends on:    
Bug Blocks: 561138, 562681    

Description Sarika Sinha CLA 2020-04-09 13:40:20 EDT
https://download.eclipse.org/eclipse/downloads/drops4/I20200409-0200/testResults.php
https://download.eclipse.org/eclipse/downloads/drops4/I20200406-0350/testResults.php

expected:<?/workspace/myProject/bin> but was:</home/jenkins/agent/workspace/ep416I-unit-cen64-gtk3-java8/workarea/I20200409-0200/eclipse-testing/test-eclipse/eclipse/?/workspace/myProject/bin>
Comment 1 Sarika Sinha CLA 2020-04-09 13:41:24 EDT
Machine needs a restart or some other issue?
Comment 2 Andrey Loskutov CLA 2020-04-09 13:53:00 EDT
(In reply to Sarika Sinha from comment #1)
> Machine needs a restart or some other issue?

This is still the problem from transition to the new JIRO infra, see bug 561138 comment 3.

I've given up on that.

Errors like this "Caused by: java.io.IOException: Cannot run program "java": error=2, No such file or directory" is a sign of wrong PATH etc.

JDT suffers from missing "lsof" in path:

https://download.eclipse.org/eclipse/downloads/drops4/I20200409-0200/testresults/html/org.eclipse.jdt.core.tests.builder_ep416I-unit-cen64-gtk3-java8_linux.gtk.x86_64_8.0.html

"Failed to read opened file descriptors"

UTF-8 encoding is not set:

https://download.eclipse.org/eclipse/downloads/drops4/I20200409-0200/testresults/html/org.eclipse.jdt.core.tests.model_ep416I-unit-cen64-gtk3-java8_linux.gtk.x86_64_8.0.html

unexpected default charset Unexpected encoding during test, encoding parameters are: -Dfile.encoding=ANSI_X3.4-1968 Charset.defaultCharset()=US-ASCII LANG=null expected:<UTF-8> but was:<US-ASCII>

etc.
Comment 3 Sravan Kumar Lakkimsetti CLA 2020-04-14 02:22:08 EDT
(In reply to Andrey Loskutov from comment #2)
> (In reply to Sarika Sinha from comment #1)
> > Machine needs a restart or some other issue?
> 
> This is still the problem from transition to the new JIRO infra, see bug
> 561138 comment 3.
> 
> I've given up on that.
> 
> Errors like this "Caused by: java.io.IOException: Cannot run program "java":
> error=2, No such file or directory" is a sign of wrong PATH etc.
> 
> JDT suffers from missing "lsof" in path:
> 
> https://download.eclipse.org/eclipse/downloads/drops4/I20200409-0200/
> testresults/html/org.eclipse.jdt.core.tests.builder_ep416I-unit-cen64-gtk3-
> java8_linux.gtk.x86_64_8.0.html
> 
> "Failed to read opened file descriptors"
> 
> UTF-8 encoding is not set:
> 
> https://download.eclipse.org/eclipse/downloads/drops4/I20200409-0200/
> testresults/html/org.eclipse.jdt.core.tests.model_ep416I-unit-cen64-gtk3-
> java8_linux.gtk.x86_64_8.0.html
> 
> unexpected default charset Unexpected encoding during test, encoding
> parameters are: -Dfile.encoding=ANSI_X3.4-1968
> Charset.defaultCharset()=US-ASCII LANG=null expected:<UTF-8> but
> was:<US-ASCII>
> 
> etc.

@andrey 

We are using docker image for our tests here is the docker file https://git.eclipse.org/c/platform/eclipse.platform.releng.aggregator.git/tree/cje-production/dockerfiles/centos-gtk3-metacity/7-gtk3/Dockerfile

Can you please let us know the commands to set the encoding? I will add them here.
Comment 4 Andrey Loskutov CLA 2020-04-14 17:44:39 EDT
(In reply to Sravan Kumar Lakkimsetti from comment #3)
> We are using docker image for our tests here is the docker file
> https://git.eclipse.org/c/platform/eclipse.platform.releng.aggregator.git/
> tree/cje-production/dockerfiles/centos-gtk3-metacity/7-gtk3/Dockerfile
> 
> Can you please let us know the commands to set the encoding? I will add them
> here.

export LANG=en_US.UTF-8

should do the trick.
Comment 5 Andrey Loskutov CLA 2020-04-14 17:46:57 EDT
(In reply to Andrey Loskutov from comment #4)
> export LANG=en_US.UTF-8
> 
> should do the trick.

On a *usual* shell, before starting Eclipse process. 

How this works with docker, have no idea (don't know if it inherits shell environment - probably not, so must be done inside the docker container environment but before starting Eclipse process).
Comment 6 Sravan Kumar Lakkimsetti CLA 2020-04-14 23:51:20 EDT
(In reply to Andrey Loskutov from comment #4)
> (In reply to Sravan Kumar Lakkimsetti from comment #3)
> > We are using docker image for our tests here is the docker file
> > https://git.eclipse.org/c/platform/eclipse.platform.releng.aggregator.git/
> > tree/cje-production/dockerfiles/centos-gtk3-metacity/7-gtk3/Dockerfile
> > 
> > Can you please let us know the commands to set the encoding? I will add them
> > here.
> 
> export LANG=en_US.UTF-8
> 
> should do the trick.

Ok I will add this command inside the shell before starting eclipse process.

Thanks
Sravan
Comment 7 Dani Megert CLA 2020-05-25 11:10:40 EDT
(In reply to Sravan Kumar Lakkimsetti from comment #6)
> (In reply to Andrey Loskutov from comment #4)
> > (In reply to Sravan Kumar Lakkimsetti from comment #3)
> > > We are using docker image for our tests here is the docker file
> > > https://git.eclipse.org/c/platform/eclipse.platform.releng.aggregator.git/
> > > tree/cje-production/dockerfiles/centos-gtk3-metacity/7-gtk3/Dockerfile
> > > 
> > > Can you please let us know the commands to set the encoding? I will add them
> > > here.
> > 
> > export LANG=en_US.UTF-8
> > 
> > should do the trick.
> 
> Ok I will add this command inside the shell before starting eclipse process.
> 
> Thanks
> Sravan
Sravan, please fix for RC1.
Comment 8 Eclipse Genie CLA 2020-05-27 05:19:17 EDT
New Gerrit change created: https://git.eclipse.org/r/163666
Comment 10 Sarika Sinha CLA 2020-05-27 05:51:38 EDT
(In reply to Eclipse Genie from comment #8)
> New Gerrit change created: https://git.eclipse.org/r/163666

Modified the test case as it looks like user.home System property is not available in the docker image.
Comment 11 Sarika Sinha CLA 2020-05-28 01:56:33 EDT
(In reply to Sarika Sinha from comment #10)
> (In reply to Eclipse Genie from comment #8)
> > New Gerrit change created: https://git.eclipse.org/r/163666
> 
> Modified the test case as it looks like user.home System property is not
> available in the docker image.

So this fixes the one test case failure. I can put a similar fix for failure of testClasspathOnlyJarUsedForLongClasspathOnJava8 but the other failure of  "Program did not suspend, launch terminated" needs to be taken up separately.
Comment 12 Eclipse Genie CLA 2020-05-28 02:00:38 EDT
New Gerrit change created: https://git.eclipse.org/r/163729
Comment 14 Sarika Sinha CLA 2020-06-02 09:53:18 EDT
(In reply to Eclipse Genie from comment #13)
> Gerrit change https://git.eclipse.org/r/163729 was merged to [master].
> Commit:
> http://git.eclipse.org/c/jdt/eclipse.jdt.debug.git/commit/
> ?id=5e2ee41758355d9ed945a8ec9ba5be31396dac75

3 test failures have been fixed by this, but one test is failing on 1 OS, so for time being org.eclipse.jdt.debug.tests.launching.LongModulePathTests.testVeryLongModulepathWithArgumentFile() has been disabled for all OS apart from Windows.
Comment 15 Sarika Sinha CLA 2020-06-17 00:25:59 EDT
@Sravan,
We still have 1 failing tests. I see these kind exceptions in the log -> What is missing int he setup?
!ENTRY org.eclipse.jdt.core 4 0 2020-06-16 17:23:29.217
!MESSAGE Unexpected internal error
!STACK 1
Java Model Exception: Java Model Status [<module:jdk.httpserver> is not on its project's build path]
	at org.eclipse.jdt.internal.core.JavaElement.newJavaModelException(JavaElement.java:583)
	at org.eclipse.jdt.internal.core.Openable.generateInfos(Openable.java:256)
	at 
!ENTRY org.eclipse.jdt.core 4 0 2020-06-16 17:23:29.316
!MESSAGE Unexpected internal error
!STACK 1
Java Model Exception: Java Model Status [<module:jdk.jartool> is not on its project's build path]
	at org.eclipse.jdt.internal.core.JavaElement.newJavaModelException(JavaElement.java:583)
	at org.eclipse.jdt.internal.core.Openable.generateInfos(Openable.java:256)
	at UBENTRY 1 org.eclipse.jdt.core 4 1006 2020-06-16 17:23:29.426
!MESSAGE <module:jdk.javadoc> is not on its project's build path

!ENTRY org.eclipse.jdt.core 4 0 2020-06-16 17:23:29.429
!MESSAGE Unexpected internal error
!STACK 1
Java Model Exception: Java Model Status [<module:jdk.jconsole> is not on its project's build path]
	at org.eclipse.jdt.internal.core.JavaElement.newJavaModelException(JavaElement.java:583)
	at org.eclipse.jdt.internal.core.Openable.generateInfos(Openable.java:256)
	at 
!SUBENTRY 1 org.eclipse.jdt.core 4 1006 2020-06-16 17:23:29.431
!MESSAGE <module:jdk.jconsole> is not on its project's build path

!ENTRY org.eclipse.jdt.core 4 0 2020-06-16 17:23:29.432
!MESSAGE Unexpected internal error
!STACK 1
Java Model Exception: Java Model Status [<module:jdk.jdi> is not on its project's build path]
	at org.eclipse.jdt.internal.core.JavaElement.newJavaModelException(JavaElement.java:583)
	at org.eclipse.jdt.internal.core.Openable.generateInfos(Openable.java:256)
	at org.eclipse.jdt.internal.core.JavaElement.openWhenClosed(JavaElement.java:596)
	at 
!SUBENTRY 1 org.eclipse.jdt.core 4 1006 2020-06-16 17:23:29.434
!MESSAGE <module:jdk.management> is not on its project's build path

!ENTRY org.eclipse.jdt.core 4 0 2020-06-16 17:23:29.435
!MESSAGE Unexpected internal error
!STACK 1
Java Model Exception: Java Model Status [<module:jdk.sctp> is not on its project's build path]
	at org.eclipse.jdt.internal.core.JavaElement.newJavaModelException(JavaElement.java:583)
	at org.eclipse.jdt.internal.core.Openable.generateInfos(Openable.java:256)
	at 
!SUBENTRY 1 org.eclipse.jdt.core 4 1006 2020-06-16 17:23:29.582
!MESSAGE <module:jdk.internal.ed> is not on its project's build path

!ENTRY org.eclipse.jdt.core 4 0 2020-06-16 17:23:29.584
!MESSAGE Unexpected internal error
!STACK 1
Java Model Exception: Java Model Status [<module:jdk.internal.le> is not on its project's build path]
	at org.eclipse.jdt.internal.core.JavaElement.newJavaModelException(JavaElement.java:583)
	at org.eclipse.jdt.internal.core.Openable.generateInfos(Openable.java:256)
Comment 16 Eclipse Genie CLA 2020-06-18 06:39:23 EDT
New Gerrit change created: https://git.eclipse.org/r/165133
Comment 18 Eclipse Genie CLA 2020-06-22 12:01:41 EDT
New Gerrit change created: https://git.eclipse.org/r/165312
Comment 20 Eclipse Genie CLA 2020-07-29 06:10:09 EDT
New Gerrit change created: https://git.eclipse.org/r/c/jdt/eclipse.jdt.debug/+/166988
Comment 22 Sarika Sinha CLA 2020-08-20 09:05:47 EDT
Don't see it failing any more.

Thanks sravan.