eclipse-openj9 / openj9

Eclipse OpenJ9: A Java Virtual Machine for OpenJDK that's optimized for small footprint, fast start-up, and high throughput. Builds on Eclipse OMR (https://github.com/eclipse/omr) and combines with the Extensions for OpenJDK for OpenJ9 repo.
Other
3.29k stars 723 forks source link

jdk_security3_0_FAILED sun/security/util/Debug/DebugOptions.java StackOverflowError #19977

Closed JasonFengJ9 closed 1 day ago

JasonFengJ9 commented 3 months ago

Failure link

From an internal build(paix907):

java version "21.0.5-beta" 2024-10-15
IBM Semeru Runtime Certified Edition 21.0.5+1-202408031539 (build 21.0.5-beta+1-202408031539)
Eclipse OpenJ9 VM 21.0.5+1-202408031539 (build master-27dac39d2c, JRE 21 AIX ppc64-64-Bit Compressed References 20240803_229 (JIT enabled, AOT enabled)
OpenJ9   - 27dac39d2c
OMR      - 9ccff3cf2
JCL      - fbac205a7 based on jdk-21.0.5+1)

Rerun in Grinder - Change TARGET to run only the failed test targets.

Optional info

Failure output (captured from console output)

[2024-08-04T04:47:19.618Z] variation: Mode150
[2024-08-04T04:47:19.618Z] JVM_OPTIONS:  -XX:+UseCompressedOops -Xverbosegclog  -Dsemeru.fips=true -Dsemeru.customprofile=OpenJCEPlusFIPS

[2024-08-04T05:17:35.085Z] TEST: sun/security/util/Debug/DebugOptions.java

[2024-08-04T05:17:35.087Z] STARTED    DebugOptions::shouldContain '[12] all+thread, properties\[.*\|main.*((.*\R)*)keystore\[.*\|main.*java.*\]:, properties\[\d{4}-\d{2}-\d{2}.*\]:'
[2024-08-04T05:17:35.087Z] java.lang.StackOverflowError
[2024-08-04T05:17:35.087Z]  at java.base/java.util.regex.Pattern$LineEnding.match(Pattern.java:4074)
[2024-08-04T05:17:35.087Z]  at java.base/java.util.regex.Pattern$CharPropertyGreedy.match(Pattern.java:4470)
[2024-08-04T05:17:35.087Z]  at java.base/java.util.regex.Pattern$GroupHead.match(Pattern.java:4969)
[2024-08-04T05:17:35.087Z]  at java.base/java.util.regex.Pattern$Loop.match(Pattern.java:5078)
[2024-08-04T05:17:35.087Z]  at java.base/java.util.regex.Pattern$GroupTail.match(Pattern.java:5000)
[2024-08-04T05:17:35.087Z]  at java.base/java.util.regex.Pattern$LineEnding.match(Pattern.java:4074)
[2024-08-04T05:17:35.087Z]  at java.base/java.util.regex.Pattern$CharPropertyGreedy.match(Pattern.java:4470)

[2024-08-04T05:17:35.093Z]  at java.base/java.util.regex.Pattern$CharPropertyGreedy.match(Pattern.java:4470)
[2024-08-04T05:17:35.093Z]  at java.base/java.util.regex.Pattern$GroupHead.match(Pattern.java:4969)
[2024-08-04T05:17:35.093Z]  at java.base/java.util.regex.Pattern$Loop.matchInit(Pattern.java:5103)
[2024-08-04T05:17:35.093Z]  at java.base/java.util.regex.Pattern$Prolog.match(Pattern.java:5024)
[2024-08-04T05:17:35.093Z]  at java.base/java.util.regex.Pattern$GroupHead.match(Pattern.java:4969)
[2024-08-04T05:17:35.093Z]  at java.base/java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:4134)
[2024-08-04T05:17:35.093Z]  at java.base/java.util.regex.Pattern$CharPropertyGreedy.match(Pattern.java:4470)
[2024-08-04T05:17:35.093Z]  at java.base/java.util.regex.Pattern$Slice.match(Pattern.java:4268)
[2024-08-04T05:17:35.093Z]  at java.base/java.util.regex.Pattern$CharPropertyGreedy.match(Pattern.java:4470)
[2024-08-04T05:17:35.093Z]  at java.base/java.util.regex.Pattern$Slice.match(Pattern.java:4268)
[2024-08-04T05:17:35.093Z]  at java.base/java.util.regex.Pattern$CharPropertyGreedy.match(Pattern.java:4470)
[2024-08-04T05:17:35.093Z]  at java.base/java.util.regex.Pattern$BnM.match(Pattern.java:5719)
[2024-08-04T05:17:35.093Z]  at java.base/java.util.regex.Matcher.search(Matcher.java:1767)
[2024-08-04T05:17:35.093Z]  at java.base/java.util.regex.Matcher.find(Matcher.java:787)
[2024-08-04T05:17:35.093Z]  at jdk.test.lib.process.OutputAnalyzer.shouldMatch(OutputAnalyzer.java:348)
[2024-08-04T05:17:35.093Z]  at DebugOptions.shouldContain(DebugOptions.java:127)

[2024-08-04T05:24:45.866Z] Test results: passed: 452; failed: 1
[2024-08-04T05:24:56.848Z] Report written to /home/jenkins/workspace/Test_openjdk21_j9_extended.openjdk_ppc64_aix_fips140_3_openjceplusfips_testList_1/aqa-tests/TKG/output_17227457217064/jdk_security3_0/report/html/report.html
[2024-08-04T05:24:56.848Z] Results written to /home/jenkins/workspace/Test_openjdk21_j9_extended.openjdk_ppc64_aix_fips140_3_openjceplusfips_testList_1/aqa-tests/TKG/output_17227457217064/jdk_security3_0/work
[2024-08-04T05:24:56.848Z] Error: Some tests failed or other problems occurred.
[2024-08-04T05:24:56.848Z] -----------------------------------
[2024-08-04T05:24:56.848Z] jdk_security3_0_FAILED

50x internal grinder - all failed

Also seen at JDK17 ppc64_aix_fips140_3_openjceplusfips

pshipton commented 3 months ago

@jasonkatonica fyi this failure

taoliult commented 2 months ago

The test DebugOptions is for checking the security property information in java.security.debug output, for checking the expected output and non-expected output. The failures happen at DebugOptions.shouldContain(DebugOptions.java:127), when checking the expected output.

It has 16 subtests for checking the differentjava.security.debug settings. And the 4 failures happens from subtest 12 to 16 (Not sure which 4 failures from subtest 12 to 16 since the output exceeds the javatest.maxOutputSize100000). The subtest 12 to 16 as below.

                // turn on thread info for all components
                Arguments.of("all+thread",
                        "properties\\[.*\\|main.*((.*\\R)*)keystore\\[.*\\|main.*java.*\\]:",
                        "properties\\[" + DATE_REGEX + ".*\\]:"),
                // turn on thread info and timestamp for all components
                Arguments.of("all+thread+timestamp",
                        "properties\\[.*\\|main.*\\|" + DATE_REGEX +
                                ".*\\]((.*\\R)*)keystore\\[.*\\|main.*\\|" + DATE_REGEX + ".*\\]:",
                        "properties:"),
                // all decorator option should override other component options
                Arguments.of("all+thread+timestamp,properties",
                        "properties\\[.*\\|main.*\\|" + DATE_REGEX +
                                ".*\\]((.*\\R)*)keystore\\[.*\\|main.*\\|" + DATE_REGEX + ".*\\]:",
                        "properties:"),
                // thread details should only be printed for properties option
                Arguments.of("properties+thread,all",
                        "properties\\[.*\\|main\\|.*\\]:",
                        "keystore\\[.*\\|main\\|.*\\]:"),
                // thread details should be printed for all statements
                Arguments.of("properties,all+thread",
                        "properties\\[.*\\|main.*java" +
                                ".*\\]((.*\\R)*)keystore\\[.*\\|main.*java.*\\]:",
                        "properties:")

When running this test using the OpenJCEPlusFIPS profile. The security properties will be set using the security properties in OpenJCEPlusFIPS profile, which will be different with the security property settings in non-OpenJCEPlusFIPS mode. And that may caused the expected values (which defined in the test case for non-OpenJCEPlusFIPS mode) can’t be found from the output.

This test case is not designed for testing the security properties output for OpenJCEPlusFIPS profile. So, this test case should be added into the exclude/ignore list for OpenJCEPlusFIPS test.

taoliult commented 2 months ago

This test is added into the ignore list, by PR https://github.com/ibmruntimes/openj9-openjdk-jdk21/pull/197

jasonkatonica commented 1 day ago

@taoliult has added this test to the ignore list. This issue can now be closed.

github-actions[bot] commented 1 day ago

Issue Number: 19977 Status: Closed Actual Components: test failure, test excluded, comp:crypto Actual Assignees: No one :( PR Assignees: No one :(