[
https://issues.apache.org/jira/browse/HDFS-14321?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16778763#comment-16778763
]
Sahil Takiar commented on HDFS-14321:
-------------------------------------
When running the existing tests with {{-Xcheck:jni}} I only see one error:
{{FATAL ERROR in native method: Invalid global JNI handle passed to
DeleteGlobalRef}}, which seems to be caused by {{hadoopRzOptionsFree}} calling
{{DeleteGlobalRef}} on {{opts->byteBufferPool}} which is not a global ref. It's
not clear to me how big an issue this is, since {{opts->byteBufferPool}} should
be a local ref that is automatically deleted when the native method exits.
There are a bunch of warnings of the form {{WARNING in native method: JNI call
made without checking exceptions when required to from ...}} - after debugging
these warnings, most of them seem to be caused by the JVM itself (e.g. internal
JDK code). So they would have to fixed within the JDK itself.
> Fix -Xcheck:jni issues in libhdfs, run ctest with -Xcheck:jni enabled
> ---------------------------------------------------------------------
>
> Key: HDFS-14321
> URL: https://issues.apache.org/jira/browse/HDFS-14321
> Project: Hadoop HDFS
> Issue Type: Improvement
> Components: hdfs-client, libhdfs, native
> Reporter: Sahil Takiar
> Assignee: Sahil Takiar
> Priority: Major
>
> The JVM exposes an option called {{-Xcheck:jni}} which runs various checks
> against JNI usage by applications. Further explanation of this JVM option can
> be found in:
> [https://docs.oracle.com/javase/8/docs/technotes/guides/troubleshoot/clopts002.html]
> and
> [https://www.ibm.com/support/knowledgecenter/en/SSYKE2_8.0.0/com.ibm.java.vm.80.doc/docs/jni_debug.html].
> When run with this option, the JVM will print out any warnings or errors it
> encounters with the JNI.
> We should run the libhdfs tests with {{-Xcheck:jni}} (can be added to
> {{LIBHDFS_OPTS}}) and fix any warnings / errors. We should add this option to
> our ctest runs as well to ensure no regressions are introduced to libhdfs.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]