RFR: 8229517: Support for optional asynchronous/buffered logging [v21]

Liu, Xin xxinliu at amazon.com
Tue May 25 07:48:49 UTC 2021


hi, David,

I thought of your concern. now I think your concern is valid.

If the underlying filesystem or socket is defunct, this line is may be
blocking. _io_sem is now zero. As a result, we can't finish aborting if
we do invoke AsyncLogWriter::flush() in aborting process.

e->output()->write_blocking(e->decorations(), msg);

Technically speaking, termination has the same issue.
We have to take the risk in termination, or the log files are not
integral. I think lost logs are acceptable in abortion scenario.

Thanks,
--lx


On 5/24/21 11:52 PM, David Holmes wrote:
> CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you can confirm the sender and know the content is safe.
> 
> 
> 
> On 25/05/2021 3:23 pm, Xin Liu wrote:
>>> This patch provides a buffer to store asynchrounous messages and flush them to
>>> underlying files periodically.
>>
>> Xin Liu has updated the pull request incrementally with two additional commits since the last revision:
>>
>>   - Remove AsyncLogWriter::flush() from os::shutdown().
> 
> You should have waited till there was further discussion on this as
> there needs to be a consensus on what is needed here.
> 
> David
> -----
> 
>>     When jvm aborts, it won't invoke AsyncLogWriter::flush() and guarantee
>>     not to hinder the aborting process.
>>
>>     Run all unified logging tests in async mode.
>>   - Biased to the thread which is taking buffer lock.
>>
>> -------------
>>
>> Changes:
>>    - all: https://git.openjdk.java.net/jdk/pull/3135/files
>>    - new: https://git.openjdk.java.net/jdk/pull/3135/files/9800a8cc..2ffc33fe
>>
>> Webrevs:
>>   - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=3135&range=20
>>   - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=3135&range=19-20
>>
>>    Stats: 32 lines in 5 files changed: 7 ins; 15 del; 10 mod
>>    Patch: https://git.openjdk.java.net/jdk/pull/3135.diff
>>    Fetch: git fetch https://git.openjdk.java.net/jdk pull/3135/head:pull/3135
>>
>> PR: https://git.openjdk.java.net/jdk/pull/3135
>>


More information about the hotspot-dev mailing list