Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-14482

Crash when using libhdfs with bad classpath

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.3.0
    • Fix Version/s: 3.3.0
    • Component/s: None
    • Labels:
      None

      Description

      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

      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;
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                stakiar Sahil Takiar
                Reporter:
                tlipcon Todd Lipcon
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: