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

Crash when using libhdfs with bad classpath

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.3.0
    • 3.3.0
    • None
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: