!420 fix asyncglog loss and crash

From: @crash888 
Reviewed-by: @kuenking111 
Signed-off-by: @kuenking111
This commit is contained in:
openeuler-ci-bot 2023-05-12 03:12:40 +00:00 committed by Gitee
commit c63fa1c450
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
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)) { _buffer_max_size(AsyncLogBufferSize / sizeof(AsyncLogMessage)) {
if (os::create_thread(this, os::asynclog_thread)) { if (os::create_thread(this, os::asynclog_thread)) {
_initialized = true; _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 // 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. // when its value is zero. It will be waken up when new messages are enqueued.
_sem.wait(); _sem.wait();
+ if (_should_terminate) { + if (_should_terminate) {
+ write();
+ terminate(); + terminate();
+ break; + break;
+ } + }
write(); 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); Thread::print_on(st);
st->cr(); st->cr();
} }

View File

@ -916,7 +916,7 @@ Provides: java-%{javaver}-%{origin}-accessibility%{?1} = %{epoch}:%{version}-%{r
Name: java-%{javaver}-%{origin} Name: java-%{javaver}-%{origin}
Version: %{javaver}.%{updatever}.%{buildver} Version: %{javaver}.%{updatever}.%{buildver}
Release: 0 Release: 1
# java-1.5.0-ibm from jpackage.org set Epoch to 1 for unknown reasons # 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 # 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 # also included the epoch in their virtual provides. This created a
@ -2334,6 +2334,9 @@ cjc.mainProgram(arg)
%endif %endif
%changelog %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 * 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 Add-ability-to-configure-third-port-for-remote-JMX.patch
- deleted 8287109-Distrust-failed-with-CertificateExpired.patch - deleted 8287109-Distrust-failed-with-CertificateExpired.patch