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

Failing jdk_time test on MacOS x64 JDK18+36 release triage #3498

Closed
Haroon-Khel opened this issue Mar 24, 2022 · 24 comments
Closed

Failing jdk_time test on MacOS x64 JDK18+36 release triage #3498

Haroon-Khel opened this issue Mar 24, 2022 · 24 comments

Comments

@Haroon-Khel
Copy link
Contributor

java/time/test/java/time/format/TestZoneTextPrinterParser.java.TestZoneTextPrinterParser from jdk_time in the extended openjdk test suite is failing on MacOS

[2022-03-23T12:40:00.263Z] java.time.format.DateTimeParseException: Text '2021-11-07 01:30:00.000 EST' could not be parsed at index 24
[2022-03-23T12:40:00.263Z] 	at java.base/java.time.format.DateTimeFormatter.parseResolved0(DateTimeFormatter.java:2056)
[2022-03-23T12:40:00.263Z] 	at java.base/java.time.format.DateTimeFormatter.parse(DateTimeFormatter.java:1958)

Test job link https://ci.adoptopenjdk.net/job/Test_openjdk18_hs_extended.openjdk_x86-64_mac_testList_1/26/testReport/
Trss link https://trss.adoptium.net/output/test?id=623b273c72761a4c5cf83036

I reran the job on test-macstadium-macos1014-x64-4, https://ci.adoptopenjdk.net/job/Grinder/3917/console, it still failed. I am rerunning it on a build machine to double check https://ci.adoptopenjdk.net/job/Grinder/3932/console

@Haroon-Khel
Copy link
Contributor Author

Many upstream bugs concerning timeout failures can be found, but none with this error

@smlambert
Copy link
Contributor

Adding the jtr file (from the test output archive) for reference: TestZoneTextPrinterParser.jtr.txt

@smlambert
Copy link
Contributor

Also noting that this test consistently passes in jdk17 (https://ci.adoptopenjdk.net/job/Test_openjdk17_hs_extended.openjdk_x86-64_mac_testList_1/38/testReport/java_time_test_java_time_format_TestZoneTextPrinterParser/).

Run against Oracle's jdk18 build here: https://ci.adoptopenjdk.net/job/Grinder/3937/
also fails in same way. We will need to dig into test code and understand what is being tested and why its failing. Likely will not block as also failing against Oracle build.

@smlambert
Copy link
Contributor

We should also double-check that there is no 'test skew'... that the test material we are using, matches up with the source build tag being tested. (believe this to be the case, but will confirm).

@smlambert
Copy link
Contributor

@sophia-guo - you mentioned this test case, DateTimeParseException is also failing on win32?

@sophia-guo
Copy link
Contributor

sophia-guo commented Mar 25, 2022

Not the same tests, the underlying failure is the same java.time.format.DateTimeParseException. Test : test.java.time.format.TestUnicodeExtension.java

@sophia-guo
Copy link
Contributor

test.java.time.format.TestUnicodeExtension.java against azul on win32 got the same failure https://ci.adoptopenjdk.net/view/Test_grinder/job/Grinder/3962/consoleFull

@smlambert
Copy link
Contributor

Ok, so we are going to treat it as 'non-blocking', but I'd like to figure out if this is a test case that needs to be improved, or a product problem that should be fixed (or skew/mismatch of test material).

@sophia-guo
Copy link
Contributor

sophia-guo commented Mar 25, 2022

This should not be skew/mismatch of test material. Test builds are using commit 0f2113cee79b9645105b4753c7d7eacb83b872c2, which is exactly same as jdk-18+36

12:04:32       [echo] git clone --depth 1 -q -b jdk-18+36 https://github.com/adoptium/jdk18u.git openjdktemp
12:05:17       [exec] Note: switching to '0f2113cee79b9645105b4753c7d7eacb83b872c2'.

https://github.com/adoptium/jdk18u/releases/tag/jdk-18%2B36

@sophia-guo
Copy link
Contributor

sophia-guo commented Mar 25, 2022

test.java.time.format.TestUnicodeExtension has not been updated for two years.

java/time/test/java/time/format/TestZoneTextPrinterParser.java did have updated recently with jdk source code update. Also it is related with ZonedDateTime parse

adoptium/jdk18u@a363b7b.

adoptium/jdk18u@064ee6a
Need to take a look at those changes.

or https://bugs.openjdk.java.net/browse/JDK-8177819

Also https://bugs.openjdk.java.net/browse/JDK-8177819 only delivered to jdk18, no backport to jdk17, which explains why tests passed on jdk17.

@sophia-guo
Copy link
Contributor

@jiekang , @andrew-m-leonard Based on #3498 (comment) it might be helpful to open a JBS issue?

@jiekang
Copy link
Contributor

jiekang commented Mar 28, 2022

@sophia-guo to clarify, you suspect changes from JDK-8177819 are causing the failure in 18, and since it's not backported to 17, it's still passing there. Is that right?

@sophia-guo
Copy link
Contributor

Yes, correct. @jiekang

@jiekang
Copy link
Contributor

jiekang commented Mar 28, 2022

Just noting, the test that fails in TestZoneTextPrinterParser didn't exist in 17, it was added by https://bugs.openjdk.java.net/browse/JDK-8177819 (openjdk/jdk@a363b7b#diff-d4fb442a77ecfe0a5c7ab7dbc30acdeb8aee1d001f4f0555b5e0d50bfd5c9047R261)

@andrew-m-leonard
Copy link
Contributor

andrew-m-leonard commented Mar 29, 2022

22:28:09  test test.java.time.format.TestZoneTextPrinterParser.test_roundTripAtOverlap("yyyy-MM-dd HH:mm:ss.SSS z", "2021-11-07 01:30:00.000 EST"): failure
22:28:09  java.time.format.DateTimeParseException: Text '2021-11-07 01:30:00.000 EST' could not be parsed at index 24
22:28:09  	at java.base/java.time.format.DateTimeFormatter.parseResolved0(DateTimeFormatter.java:2056)
22:28:09  	at java.base/java.time.format.DateTimeFormatter.parse(DateTimeFormatter.java:1958)
22:28:09  	at java.base/java.time.ZonedDateTime.parse(ZonedDateTime.java:600)
22:28:09  	at test.java.time.format.TestZoneTextPrinterParser.test_roundTripAtOverlap(TestZoneTextPrinterParser.java:266)

@andrew-m-leonard
Copy link
Contributor

This is the same problem as https://bugs.openjdk.java.net/browse/JDK-8282023
needs same fix in this testcase here: https://github.com/openjdk/jdk18u/blob/1ab6f9395f784293deb37ea0186db59d1166ae40/test/jdk/java/time/test/java/time/format/TestZoneTextPrinterParser.java#L266

To recreate:

        String pattern = "yyyy-MM-dd HH:mm:ss.SSS z";
        String input = "2021-11-07 01:30:00.000 EST";

        var dtf = DateTimeFormatter.ofPattern(pattern);
        String parsed = dtf.format(ZonedDateTime.parse(input, dtf));

Exception in thread "main" java.time.format.DateTimeParseException: Text '2021-11-07 01:30:00.000 EST' could not be parsed at index 24
	at java.base/java.time.format.DateTimeFormatter.parseResolved0(DateTimeFormatter.java:2056)
	at java.base/java.time.format.DateTimeFormatter.parse(DateTimeFormatter.java:1958)
	at java.base/java.time.ZonedDateTime.parse(ZonedDateTime.java:600)
	at datetime.main(datetime.java:13)

Using Locale.ROOT fix:

        String pattern = "yyyy-MM-dd HH:mm:ss.SSS z";
        String input = "2021-11-07 01:30:00.000 EST";

        var dtf = DateTimeFormatter.ofPattern(pattern, Locale.ROOT);
        String parsed = dtf.format(ZonedDateTime.parse(input, dtf));

Parsed = 2021-11-07 01:30:00.000 EST

@andrew-m-leonard
Copy link
Contributor

Opened JBS bug: https://bugs.openjdk.java.net/browse/JDK-8283842

@sophia-guo
Copy link
Contributor

@andrew-m-leonard #3494 has same issue, which is on win32. Noticed https://bugs.openjdk.java.net/browse/JDK-8283842 only mentioned Macos.

@jiekang
Copy link
Contributor

jiekang commented Mar 29, 2022

@sophia-guo I added a comment on seeing it on win32.

@andrew-m-leonard
Copy link
Contributor

Fixed upstream: openjdk/jdk@a41550b

@sophia-guo
Copy link
Contributor

Any plan to back port to jdk18? @andrew-m-leonard

@andrew-m-leonard
Copy link
Contributor

I've asked upstream..

@jiekang
Copy link
Contributor

jiekang commented Mar 1, 2023

I don't expect this to be backported to 18, but I don't think it matters to us. @sophia-guo can this issue be closed?

@sophia-guo
Copy link
Contributor

Yes, no need to backport to 18 any more. Close it.

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

No branches or pull requests

5 participants