#I72F6P:fix asyncgclog loss and crash

This commit is contained in:
crash888 2023-05-11 20:36:04 +08:00
parent 946a7334db
commit ffefd59c7b
2 changed files with 7 additions and 3 deletions

View File

@ -46,18 +46,19 @@ index 750a23f..7722020 100644
_buffer_max_size(AsyncLogBufferSize / sizeof(AsyncLogMessage)) {
if (os::create_thread(this, os::asynclog_thread)) {
_initialized = true;
@@ -124,6 +124,10 @@ void AsyncLogWriter::run() {
@@ -124,6 +124,11 @@ void AsyncLogWriter::run() {
// The value of a semphore cannot be negative. Therefore, the current thread falls asleep
// when its value is zero. It will be waken up when new messages are enqueued.
_sem.wait();
+ if (_should_terminate) {
+ write();
+ terminate();
+ break;
+ }
write();
}
}
@@ -162,3 +166,32 @@ void AsyncLogWriter::print_on(outputStream* st) const{
@@ -162,3 +167,32 @@ void AsyncLogWriter::print_on(outputStream* st) const{
Thread::print_on(st);
st->cr();
}

View File

@ -916,7 +916,7 @@ Provides: java-%{javaver}-%{origin}-accessibility%{?1} = %{epoch}:%{version}-%{r
Name: java-%{javaver}-%{origin}
Version: %{javaver}.%{updatever}.%{buildver}
Release: 0
Release: 1
# java-1.5.0-ibm from jpackage.org set Epoch to 1 for unknown reasons
# and this change was brought into RHEL-4. java-1.5.0-ibm packages
# also included the epoch in their virtual provides. This created a
@ -2334,6 +2334,9 @@ cjc.mainProgram(arg)
%endif
%changelog
* Fri May 11 2023 crash888 <wangmengqi13@huawei.com> - 1:1.8.0.372-b07.1
- modified Fix-the-crash-that-occurs-when-the-process-exits-due.patch
* Fri May 6 2023 crash888 <wangmengqi13@huawei.com> - 1:1.8.0.372-b07.0
- deleted Add-ability-to-configure-third-port-for-remote-JMX.patch
- deleted 8287109-Distrust-failed-with-CertificateExpired.patch