-
Notifications
You must be signed in to change notification settings - Fork 148
8267952: async logging supports to dynamically change tags and decorators #130
Conversation
👋 Welcome back xliu! A progress list of the required criteria for merging this PR into |
Webrevs
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Xin,
Thank you for your patience and perseverance with this.
This looks good to me now. The flush token seems to work well and is preferable to potentially blocking the async log thread.
I have a number of comments below, but they are all about comments.
I'm running this through our tier 1-7 testing again.
I have one remaining concern, which is just something we need to keep an eye on, and that is the potential for delaying VM termination if the async log writer gets blocked/delayed.
Thanks,
David
Mailing list message from David Holmes on hotspot-runtime-dev: On 24/06/2021 10:55 am, David Holmes wrote:
The test passed in all tiers - which is good. One oddity is that the test log shows at the end: Warning: asynclog is OFF. and I have grepped the source code and the tests and cannot find where Thanks, |
1 similar comment
Mailing list message from David Holmes on hotspot-runtime-dev: On 24/06/2021 10:55 am, David Holmes wrote:
The test passed in all tiers - which is good. One oddity is that the test log shows at the end: Warning: asynclog is OFF. and I have grepped the source code and the tests and cannot find where Thanks, |
hi, David,
We discussed this before. Yes, if "write_blocking()" does block on I/O part, flush() is blocked. We have this issue before, and synchronous logging has this issue as well. I think Async logging is better than sync logging on this because at least JVM got stuck at termination instead of any safepoint if it did happen. It isn't perfect. Ideally, we can use flush_sem.wait(timeout) if Semaphore::wait supports timeout for all platforms.
We can have an assertion like this. It's because flush() must be synchronized. The reason I don't enforce it using a mutex or yet another semaphore is that current use cases have already been protected. If all flush() are synchronized, it means that there's one or none token at any time. therefore, the following assertion is right. Shall I put it back? If there's more than one token appears in the buffer, it will hit the assertion I place in write().
https://github.com/openjdk/jdk/blob/master/test/hotspot/gtest/logging/test_asynclog.cpp#L37 Thank you for you patience. TBH, I coundn't wrap around my head if you did tell me that handshake problem. thanks, |
Mailing list message from David Holmes on hotspot-runtime-dev: On 24/06/2021 2:33 pm, Xin Liu wrote:
I agree existing synchronous logging also has a (worse?) problem here.
Not sure where this assertion was. But that wasn't what I was asking about. I thought we had
Doh! I grepped in hotspot/jtreg by mistake. Thanks for clarifying. Cheers, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple of minor comment nits remain but otherwise this is fine.
Thanks,
David
@navyxliu This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 22 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. ➡️ To integrate this PR with the above commit message to the |
hi, @dcubed-ojdk |
Mailing list message from David Holmes on hotspot-runtime-dev: On 25/06/2021 10:37 am, Xin Liu wrote:
I already re-ran this through our tier 1-7 testing, running the gtests David |
1 similar comment
Mailing list message from David Holmes on hotspot-runtime-dev: On 25/06/2021 10:37 am, Xin Liu wrote:
I already re-ran this through our tier 1-7 testing, running the gtests David |
Hi, Reviewers, May I have another reviewer to take a look at this? This patch can fix the intermittent crashes for jdk17. thanks, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
/integrate |
Going to push as commit 09bb846.
Your commit was automatically rebased without conflicts. |
This patch fixed intermittent crashes of gtest/AsyncLogGtest.java. The root cause
is that previous flush() can't guarantee flush all pending messages in AsyncLog
buffer. This patch implements flush() using a synchronizaton token and waits for
completion. This approach isn't MT-safe but it can serialize all flush() calls in
a thread.
Two concurrent tests are appended to cover the hazard cases.
This patch also comments LogConfiguration::configure_output() MT-safety.
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk17 pull/130/head:pull/130
$ git checkout pull/130
Update a local copy of the PR:
$ git checkout pull/130
$ git pull https://git.openjdk.java.net/jdk17 pull/130/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 130
View PR using the GUI difftool:
$ git pr show -t 130
Using diff file
Download this PR as a diff file:
https://git.openjdk.java.net/jdk17/pull/130.diff