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

jdk8 java/nio/file/Files/probeContentType/Basic.java failed on test-docker-fedora34-x64-1 #2631

Closed
sophia-guo opened this issue Jun 22, 2022 · 17 comments

Comments

@sophia-guo
Copy link

sophia-guo commented Jun 22, 2022

jdk8 java/nio/file/Files/probeContentType/Basic.java failed on test-docker-fedora34-x64-1

  • test suite/name? jdk8 java/nio/file/Files/probeContentType/Basic.java
  • Is there an existing issue elsewhere covering this?
  • Which machine(s) does it work on? test-ibmcloud-ubuntu1604-x64-1
  • Which machine(s) does it fail on? test-docker-fedora34-x64-1
  • Do you have a link to a Grinder re-run if the test with the failure?

Any other details:
test-ibmcloud-ubuntu1604-x64-1 : https://ci.adoptopenjdk.net/view/Test_grinder/job/Grinder/5027/

test-docker-fedora34-x64-1: https://ci.adoptopenjdk.net/view/Test_grinder/job/Grinder/5026/
https://ci.adoptopenjdk.net/job/Test_openjdk8_hs_extended.openjdk_x86-64_linux_testList_2/45/

History show https://trss.adoptium.net/deepHistory?testId=62ae0eb4250c3c428c287b29

Stacktrace
Execution failed: `main' threw exception: java.lang.RuntimeException: Test failed!    
Standard Output
probe /tmp/foo7555592115402834250.html...
/home/jenkins/.mime.types does not exist
/etc/mime.types does not exist
probe /tmp/red2631690209915529139.grape...
    
Standard Error
Expected "text/html" but obtained "application/x-zerosize"
java.lang.RuntimeException: Test failed!
	at Basic.main(Basic.java:136)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
	at java.lang.Thread.run(Thread.java:750)

JavaTest Message: Test threw exception: java.lang.RuntimeException: Test failed!
JavaTest Message: shutting down test

STATUS:Failed.`main' threw exception: java.lang.RuntimeException: Test failed!
@Haroon-Khel
Copy link
Contributor

Initial suspicion is that this test will fail on docker containers

@Haroon-Khel
Copy link
Contributor

Haroon-Khel commented Jul 7, 2022

@Haroon-Khel
Copy link
Contributor

@Haroon-Khel
Copy link
Contributor

Haroon-Khel commented Jul 7, 2022

The tests continue to fail only on test-docker-fedora34-x64-1. Passes on the other dockerstatic containers.

The ipv6 issues are interesting. This is related, #1105, but I dont think the solution to that issue helps here. The dockerstatic containers do have ipv6 enabled; I added this to the /etc/docker/daemon.json file a while ago:

{ "ipv6": true, "fixed-cidr-v6": "fd00::/80" }

I will try creating another fedora container and see if the tests still fail on that one

@Haroon-Khel
Copy link
Contributor

Haroon-Khel commented Jul 7, 2022

Created a new fedora34 container test-docker-fedora34-x64-2

java/nio/file/Files/probeContentType/Basic.java
https://ci.adoptopenjdk.net/view/Test_grinder/job/Grinder/5133/console

java/net/Inet6Address/B6206527.java.B6206527
https://ci.adoptopenjdk.net/view/Test_grinder/job/Grinder/5135/console

java/net/ipv6tests/B6521014.java
https://ci.adoptopenjdk.net/view/Test_grinder/job/Grinder/5136/console

@Haroon-Khel
Copy link
Contributor

Fedora34 has reached end of life, so it is worth upgrading to fedora 36 anyway. I'm going to spin up a fedora36 container and run the tests on it

@Haroon-Khel
Copy link
Contributor

Rerunning the tests on our other fedora boxes:

test-docker-fedora35-x64-1 :

java/nio/file/Files/probeContentType/Basic.java
https://ci.adoptopenjdk.net/view/Test_grinder/job/Grinder/5201/console

java/net/Inet6Address/B6206527.java.B6206527
https://ci.adoptopenjdk.net/view/Test_grinder/job/Grinder/5202/console

java/net/ipv6tests/B6521014.java
https://ci.adoptopenjdk.net/view/Test_grinder/job/Grinder/5203/console

test-docker-fedora35-armv8l-1 :

java/nio/file/Files/probeContentType/Basic.java
https://ci.adoptopenjdk.net/view/Test_grinder/job/Grinder/5204/console

java/net/Inet6Address/B6206527.java.B6206527
https://ci.adoptopenjdk.net/view/Test_grinder/job/Grinder/5205/console

java/net/ipv6tests/B6521014.java
https://ci.adoptopenjdk.net/view/Test_grinder/job/Grinder/5206/console

@Haroon-Khel
Copy link
Contributor

@Haroon-Khel
Copy link
Contributor

The ipv6 tests pass on the f35 containers but fail on the f36 one. This may be due to the dockerhost of the f36 container, https://ci.adoptopenjdk.net/computer/docker-packet-ubuntu2004-amd-1/ while the former containers are on https://ci.adoptopenjdk.net/computer/docker-packet-ubuntu2004-intel-1/. I'm going to build an f36 container on the latter dockerhost to test

@Haroon-Khel
Copy link
Contributor

Created another f36 container https://ci.adoptopenjdk.net/computer/test-docker-fedora36-x64-2/, on https://ci.adoptopenjdk.net/computer/docker-packet-ubuntu2004-intel-1/

Rerunning tests, I expect Basic to still fail. Ive installed mailcap which creates the /etc/mime.types file which the test needs but I dont think this allows the test to pass:

java/nio/file/Files/probeContentType/Basic.java
https://ci.adoptopenjdk.net/view/Test_grinder/job/Grinder/5212/console

java/net/Inet6Address/B6206527.java.B6206527
https://ci.adoptopenjdk.net/view/Test_grinder/job/Grinder/5213/console

java/net/ipv6tests/B6521014.java
https://ci.adoptopenjdk.net/view/Test_grinder/job/Grinder/5214/console

@Haroon-Khel
Copy link
Contributor

Ipv6 test pass when the docker container is on https://ci.adoptopenjdk.net/computer/docker-packet-ubuntu2004-intel-1/, so theres a difference in docker ipv6 config between the two dockerhost machines

@Haroon-Khel
Copy link
Contributor

Haroon-Khel commented Jul 15, 2022

@Haroon-Khel
Copy link
Contributor

Haroon-Khel commented Jul 15, 2022

Cannot seem to get the Basic test to pass on Fedora. The following is a simple java file which zones in on what is causing this error, where foo.html is an html file.

import java.io.*;
import java.nio.file.*;

class Filetype {
  public static void main(String[] args) {
    try {
        System.out.println(Files.probeContentType(Paths.get("/home/jenkins/foo.html")));
    }
    catch(Exception e) {
      e.getStackTrace();
    }
  }
}

On fedora it returns application/x-zerosize. I tested it with a basic plain text file and it still returned application/x-zerosize. However on the same Fedora machine, if I use file to detect filetypes it returns:

[jenkins@24154f331d28 bin]$ file -b --mime-type /home/jenkins/foo.html 
text/html

Which is correct.

On a working machine, the above java file will return text/html

@Haroon-Khel
Copy link
Contributor

Haroon-Khel commented Jul 19, 2022

I think installing shared-mime-info seemed to do the trick, rerunning on test-docker-fedora36-x64-2 https://ci.adoptopenjdk.net/view/Test_grinder/job/Grinder/5224/console

@Haroon-Khel
Copy link
Contributor

Installing shared-mime-info allows the Basic test to pass

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants