You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-issues@hadoop.apache.org by "Todd Lipcon (JIRA)" <ji...@apache.org> on 2019/05/09 04:51:00 UTC
[jira] [Commented] (HDFS-14482) Crash when using libhdfs with bad
classpath
[ https://issues.apache.org/jira/browse/HDFS-14482?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16836076#comment-16836076 ]
Todd Lipcon commented on HDFS-14482:
------------------------------------
Seems the 'if (!state->env)' check just needs to be moved up above the call to initCachedClasses here
> Crash when using libhdfs with bad classpath
> -------------------------------------------
>
> Key: HDFS-14482
> URL: https://issues.apache.org/jira/browse/HDFS-14482
> Project: Hadoop HDFS
> Issue Type: Bug
> Reporter: Todd Lipcon
> Assignee: Sahil Takiar
> Priority: Major
>
> HDFS-14304 added a call to initCachedClasses in getJNIEnv after creating the env but before checking whether it's null. In the case that getJNIEnv() fails to create an env, it returns NULL, and then we crash when calling initCachedClasses() on line 555
> {code}
> 551 state->env = getGlobalJNIEnv();
> 552 mutexUnlock(&jvmMutex);
> 553
> 554 jthrowable jthr = NULL;
> 555 jthr = initCachedClasses(state->env);
> 556 if (jthr) {
> 557 printExceptionAndFree(state->env, jthr, PRINT_EXC_ALL,
> 558 "initCachedClasses failed");
> 559 goto fail;
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org