[ 
https://issues.apache.org/jira/browse/FLINK-18581?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17161312#comment-17161312
 ] 

Andrey Zagrebin commented on FLINK-18581:
-----------------------------------------

Reference.tryHandlePending was introduced somewhen before 8u202 (I have 8u172 
where it works).

I checked 8u40, it looks like JVM did not have the optimisation of triggering 
the GC phantom cleaner queue in direct memory reservation. They just tried one 
GC call which is quite suboptimal for us. Somewhere after 8u40, they factored 
out java.lang.ref.Reference#ReferenceHandler#run into static 
Reference#tryHandlePending to enable the optimisation.

java.lang.ref.Reference#ReferenceHandler#run is quite similar to 
Reference#tryHandlePending in 8u40. We could create an instance of 
ReferenceHandler, which is stateless, and call its run method, which uses the 
same static vars of Reference class.

Not sure that it is really worth the effort. So alternatively, I can 
binary-find the JVM version where they introduced the 
Reference#tryHandlePending and we can update the 1.11 release notes that we 
support Java 8 starting from that build.
cc [~trohrmann]

> Cannot find GC cleaner with java version previous 8u202
> -------------------------------------------------------
>
>                 Key: FLINK-18581
>                 URL: https://issues.apache.org/jira/browse/FLINK-18581
>             Project: Flink
>          Issue Type: Bug
>          Components: Runtime / Coordination
>    Affects Versions: 1.11.0
>            Reporter: Xintong Song
>            Priority: Critical
>             Fix For: 1.12.0, 1.11.2
>
>
> {{JavaGcCleanerWrapper}} is looking for the package-private method 
> {{Reference.tryHandlePending}} using reflection. However, the method is first 
> introduced in the version 8u202. Therefore, if an older version JDK is used, 
> the method cannot be found and Flink will fail.
> See also this [ML 
> thread|http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/Error-GC-Cleaner-Provider-Flink-1-11-0-td36565.html].



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to