RFR: 8267926: AsyncLogGtest.java fails on assert with: decorator was not part of the decorator set specified at creation. [v2]
Xin Liu
xliu at openjdk.java.net
Mon May 31 05:54:40 UTC 2021
On Mon, 31 May 2021 05:50:59 GMT, Xin Liu <xliu at openjdk.org> wrote:
>> 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.
>
> Xin Liu has updated the pull request incrementally with one additional commit since the last revision:
>
> 8267926: AsyncLogGtest.java fails on assert with: decorator was not part of the decorator set specified at creation.
src/hotspot/share/logging/logConfiguration.cpp line 272:
> 270: // After updating output's decorators, it's still safe to shrink all decorators of tagsets.
> 271: //
> 272: // There are 2 harzards in async logging. A flush operation guarantees to all pending messages in buffer are written
hazards...
I will update it in next revision.
-------------
PR: https://git.openjdk.java.net/jdk/pull/4257
More information about the hotspot-runtime-dev
mailing list