Skip to content
Permalink
Browse files
8276819: javax/print/PrintServiceLookup/FlushCustomClassLoader.java f…
…ails to free

Reviewed-by: psadhukhan, aivanov
  • Loading branch information
mrserb committed Dec 12, 2021
1 parent db68a0c commit 7c2c58587d4eda5523331eae45e7d897252dc097
Showing with 5 additions and 6 deletions.
  1. +5 −6 test/jdk/javax/print/PrintServiceLookup/FlushCustomClassLoader.java
@@ -34,6 +34,9 @@
* @test
* @bug 8273831
* @summary Tests custom class loader cleanup
* @library /javax/swing/regtesthelpers
* @build Util
* @run main/timeout=60/othervm -mx32m FlushCustomClassLoader
*/
public final class FlushCustomClassLoader {

@@ -42,12 +45,8 @@ public static void main(String[] args) throws Exception {

int attempt = 0;
while (loader.get() != null) {
if (++attempt > 10) {
throw new RuntimeException("Too many attempts: " + attempt);
}
System.gc();
Thread.sleep(1000);
System.out.println("Not freed, attempt: " + attempt);
Util.generateOOME();
System.out.println("Not freed, attempt: " + attempt++);
}
}

3 comments on commit 7c2c585

@openjdk-notifier
Copy link

@openjdk-notifier openjdk-notifier bot commented on 7c2c585 Dec 12, 2021

Choose a reason for hiding this comment

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

@mrserb
Copy link
Member Author

@mrserb mrserb commented on 7c2c585 Feb 12, 2022

Choose a reason for hiding this comment

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

/backport jdk18u

@openjdk
Copy link

@openjdk openjdk bot commented on 7c2c585 Feb 12, 2022

Choose a reason for hiding this comment

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

@mrserb the backport was successfully created on the branch mrserb-backport-7c2c5858 in my personal fork of openjdk/jdk18u. To create a pull request with this backport targeting openjdk/jdk18u: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 7c2c5858 from the openjdk/jdk repository.

The commit being backported was authored by Sergey Bylokhov on 12 Dec 2021 and was reviewed by Prasanta Sadhukhan and Alexey Ivanov.

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/jdk18u:

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

Please sign in to comment.