RFR: 8267926: AsyncLogGtest.java fails on assert with: decorator was not part of the decorator set specified at creation. [v6]
Xin Liu
xliu at openjdk.java.net
Thu Jun 3 06:16:37 UTC 2021
On Thu, 3 Jun 2021 05:48:55 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 uint. It's even smaller than a reference on LP64 platforms.
>>
>> This patch not only fixes intermittent crash in JDK-8267926, but also fixes JDK-8267952.
>> Two hazards of async logging in `LogConfiguration::configure_output` are eliminated.
>> This patch also adds a storestore barrier to make sure it's safe on weak consistency machines.
>
> Xin Liu has updated the pull request incrementally with one additional commit since the last revision:
>
> Safeguard _stream is NULL due to rotation.
src/hotspot/share/logging/logConfiguration.cpp line 282:
> 280: if (!enabled) {
> 281: for (LogTagSet* ts = LogTagSet::first(); ts != NULL; ts = ts->next()) {
> 282: assert(!ts->has_output(output), "The node of output should been removed in ts->set_output_level.");
should be removed by ts->set_output_level()
test/hotspot/gtest/logging/test_logConfiguration.cpp line 305:
> 303: }
> 304:
> 305: // Take turn logging with different decorators, either None or All.
This comment is wrong. I turn on/off the tagset logging here.
-------------
PR: https://git.openjdk.java.net/jdk/pull/4257
More information about the hotspot-runtime-dev
mailing list