RFR: 8267926: AsyncLogGtest.java fails on assert with: decorator was not part of the decorator set specified at creation.

Xin Liu xliu at openjdk.java.net
Fri May 28 22:30:46 UTC 2021


The root cause of the intermittent failure is that _decorators in LogDecorations 
may be inconsistent with LogOutput::_decorators. It could happen when gtest disables a
Log output via set_log_config(TestLogFileName, "all=off").

Since we copy the entire logDecorations, it's reasonable to copy _decorator as well. 
LogDecorator is a bitmask of uiint. It's even smaller than a reference on LP64 platforms.

Caveat: this patch doesn't fix the race condition of update_decorators. Theorically,
it may still cause an error if user dynamically enrich decorators for one log output. 
User can't do that via dcmd VM.log because one can't change the configuration of 
an established output via dcmd.

-------------

Commit messages:
 - 8267926: AsyncLogGtest.java fails on assert with: decorator was not part of the decorator set specified at creation.

Changes: https://git.openjdk.java.net/jdk/pull/4257/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=4257&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8267926
  Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod
  Patch: https://git.openjdk.java.net/jdk/pull/4257.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/4257/head:pull/4257

PR: https://git.openjdk.java.net/jdk/pull/4257


More information about the hotspot-runtime-dev mailing list