From lukas.stampf at bat.at Thu Jul 2 18:00:48 2020 From: lukas.stampf at bat.at (STAMPF Lukas) Date: Thu, 2 Jul 2020 18:00:48 +0000 Subject: JDK-8229011: Hints Message-ID: Hello, I hope I don't bother anyone with this. Out of curiosity I looked into this and it seems that the LambdaForms, MethodHandles, etc created by the DynamicLinker are nerver garbage collected. Before https://bugs.openjdk.java.net/browse/JDK-8141538 this wasn't so bad, because there was always just one static DynamicLinker, therefore the amount of leaking objects was limited. With this change, there is one DynamicLinker per Context(so on per ScriptEngine) creating a memory leak. This can be shown by adding if (linker == null) { linker = getLinker(scriptEngine); } setLinker(scriptEngine, linker); to the loop in the testcript linked in Jira. Set/getLinker are simply using reflection to get/set the final field of jdk.nashorn.internal.runtime.Context dynamicLinker. The question I can't answer yet is why the Objects created by the DynamicLinker are not garbage collected. JProfiler and Eclipse MAT seem to be unable to analyze these dynamic objects properly. Most of the objects are marked as unreachable but not collected. I would be grateful for every input on why it could be this way or what I could try to find out whats keeping these unreachable objects alive. Kind regards, Lukas From sundararajan.athijegannathan at oracle.com Wed Jul 15 15:58:14 2020 From: sundararajan.athijegannathan at oracle.com (sundararajan.athijegannathan at oracle.com) Date: Wed, 15 Jul 2020 21:28:14 +0530 Subject: RFR 8246113: re-visit javax/script test that still requires jdk.scripting.nashorn module Message-ID: <49174970-2ccd-af7a-8af4-16ef8343ce48@oracle.com> Hi, Please review - removing these tests. Bug: https://bugs.openjdk.java.net/browse/JDK-8246113 Webrev: http://cr.openjdk.java.net/~sundar/8246113/webrev.00/ Thanks -Sundar From james.laskey at oracle.com Wed Jul 15 16:04:19 2020 From: james.laskey at oracle.com (Jim Laskey) Date: Wed, 15 Jul 2020 13:04:19 -0300 Subject: RFR 8246113: re-visit javax/script test that still requires jdk.scripting.nashorn module In-Reply-To: <49174970-2ccd-af7a-8af4-16ef8343ce48@oracle.com> References: <49174970-2ccd-af7a-8af4-16ef8343ce48@oracle.com> Message-ID: <46FDFA20-8135-4B4C-A208-499B1A1097FA@oracle.com> +1 > On Jul 15, 2020, at 12:58 PM, Sundararajan.athijegannathan at oracle.com wrote: > > Hi, > > Please review - removing these tests. > > Bug: https://bugs.openjdk.java.net/browse/JDK-8246113 > > Webrev: http://cr.openjdk.java.net/~sundar/8246113/webrev.00/ > > Thanks > > -Sundar >