JDK-8258772 : Some runtime/cds tests fail with +LogCompilation or +StressX
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 16,17
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2020-12-21
  • Updated: 2021-01-14
  • Resolved: 2021-01-07
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 17
17 b05Fixed
Related Reports
Relates :  
Description
Some runtime/cds tests assume that the VM only outputs warnings to stderr as formatted by warning(const char* format, ...), and fail when flags are used that lead to ad hoc warning messages printed to stdout. For example:

$ make run-test TEST="test/hotspot/jtreg/runtime/cds/ServiceLoaderTest.java" CONF=linux-x86_64-server-fastdebug TEST_VM_OPTS="-XX:+LogCompilation"
(...)
TEST RESULT: Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: Mismatched line 0: "============================================================" vs "Warning: TraceDependencies results may be inflated by VerifyDependencies"

$ make run-test TEST="test/hotspot/jtreg/runtime/cds/appcds/dynamicArchive/DynamicArchiveRelocationTest.java" CONF=linux-x86_64-server-fastdebug TEST_VM_OPTS="-XX:+StressIGVN -XX:+UseParallelGC"
(...)
TEST RESULT: Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: The line 'Warning: set +LogCompilation to log the seed.' does not match pattern '.*Unmapping region #3 at base 0x.*(Bitmap)'

Assigned to the "compiler" subcomponent, as the offending warnings are related to the +LogCompilation and +StressX compiler flags.
Comments
Changeset: d8ad6301 Author: Roberto Casta��eda Lozano <rcastanedalo@openjdk.org> Committer: Vladimir Kozlov <kvn@openjdk.org> Date: 2021-01-07 18:57:58 +0000 URL: https://git.openjdk.java.net/jdk/commit/d8ad6301
07-01-2021

RemovingUnixDomainSocketTest.java is an example of a test that expects no VM warnings and fails on +LogCompilation or +StressX options (see discussion in JDK-8258057).
22-12-2020

There are a number of tests that aren't tolerant of unexpected output that can be produced by various flags. We use to hit this a lot with deprecation and obsoletion warnings. We fixed a lot of tests. We also added OutputAnalyzer support to ignore VM warnings. But some tests still assume/expect very specific output (or lack thereof) and can be tripped up by specific flags.
22-12-2020