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

David Holmes david.holmes at oracle.com
Tue Jun 1 01:27:58 UTC 2021


On 1/06/2021 10:26 am, Xin Liu wrote:
> On Mon, 31 May 2021 22:14:46 GMT, David Holmes <dholmes at openjdk.org> wrote:
> 
>>> Xin Liu has updated the pull request incrementally with one additional commit since the last revision:
>>>
>>>    Increase reader's counter before creating LogDecoration.
>>
>> src/hotspot/share/logging/logAsyncWriter.cpp line 105:
>>
>>> 103:
>>> 104:     if (*counter > 0) {
>>> 105:       LogDecorations decorations(LogLevel::Warning, none::tagset(), LogDecorators::All);
>>
>> This looks odd to use LogDecorators::All - what exactly will that produce?
> 
> This is the out-of-band message, it just shows that "xyz messages dropped due to async logging."
> 
> Unlike normal log messages, this ad-hoc message is enqueued when buffer is flushing. The synchronization I described in `LogConfiguration::configure_output` only protects enqueuing log messages.  This message is not under protection.Without LogDecorators::All, it will fail 'gtest:LogConfigurationTest.reconfigure_decorators_MT*' in async log mode.

I understand the need to not use the true decorators, but using All 
sounds like it will produce a log line with an excessive number of 
decorators applied:

Available log decorators:
  time (t), utctime (utc), uptime (u), timemillis (tm), uptimemillis 
(um), timenanos (tn), uptimenanos (un), hostname (hn), pid (p), tid 
(ti), level (l), tags (tg)

will all of those appear on this log line?

Thanks,
David

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


More information about the hotspot-runtime-dev mailing list