Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
8270869: G1ServiceThread may not terminate
Reviewed-by: ayang, tschatzl
  • Loading branch information
Kim Barrett committed Jul 20, 2021
1 parent c3519c3 commit 7f35e5b
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/hotspot/share/gc/g1/g1ServiceThread.cpp
Expand Up @@ -112,12 +112,10 @@ void G1ServiceThread::notify() {
}

void G1ServiceThread::sleep_before_next_cycle() {
MonitorLocker ml(&_monitor, Mutex::_no_safepoint_check_flag);
if (should_terminate()) {
return;
}

MonitorLocker ml(&_monitor, Mutex::_no_safepoint_check_flag);
if (_task_queue.is_empty()) {
} else if (_task_queue.is_empty()) {
// Sleep until new task is registered if no tasks available.
log_trace(gc, task)("G1 Service Thread (wait for new tasks)");
ml.wait(0);
Expand Down

3 comments on commit 7f35e5b

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@GoeLin
Copy link
Member

@GoeLin GoeLin commented on 7f35e5b Apr 17, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/backport jdk17u-dev

@openjdk
Copy link

@openjdk openjdk bot commented on 7f35e5b Apr 17, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@GoeLin the backport was successfully created on the branch GoeLin-backport-7f35e5ba in my personal fork of openjdk/jdk17u-dev. To create a pull request with this backport targeting openjdk/jdk17u-dev:master, just click the following link:

➡️ Create pull request

The title of the pull request is automatically filled in correctly and below you find a suggestion for the pull request body:

Hi all,

This pull request contains a backport of commit 7f35e5ba from the openjdk/jdk repository.

The commit being backported was authored by Kim Barrett on 20 Jul 2021 and was reviewed by Albert Mingkun Yang and Thomas Schatzl.

Thanks!

If you need to update the source branch of the pull then run the following commands in a local clone of your personal fork of openjdk/jdk17u-dev:

$ git fetch https://github.com/openjdk-bots/jdk17u-dev.git GoeLin-backport-7f35e5ba:GoeLin-backport-7f35e5ba
$ git checkout GoeLin-backport-7f35e5ba
# make changes
$ git add paths/to/changed/files
$ git commit --message 'Describe additional changes made'
$ git push https://github.com/openjdk-bots/jdk17u-dev.git GoeLin-backport-7f35e5ba

Please sign in to comment.