RFR: 8267926: AsyncLogGtest.java fails on assert with: decorator was not part of the decorator set specified at creation. [v3]
Xin Liu
xliu at openjdk.java.net
Mon May 31 19:56:20 UTC 2021
On Sun, 30 May 2021 02:44:11 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.
>
> As this is debug only this seems a reasonable workaround.
>
> Thanks,
> David
Hi, @dholmes-ora,
I recently realize how flexible unified logging is(JDK-8267952). By design, `LogConfiguration::configure_output` is MT-safe. Clearly, authors of unified logging put a lot of thoughts on it. I try to write down my understanding in the form of comments. Async logging support can be a natural extension of current synchronous logging. All we need to do is to eliminate two hazards I mentioned.
I also add a concurrent test to prove it works. By reasoning how it works and the test, I discover two places which could cause race condition. they are also fixed in this patch.
1) the creation of LogDecorations needs to increase reader counter first.
2) need a storestore barrier to guarantee it works on weak consistency machines.
Could you verify this patch in Tier4 tests?
Could you also review this patch again?
thanks,
--lx
-------------
PR: https://git.openjdk.java.net/jdk/pull/4257
More information about the hotspot-runtime-dev
mailing list