Hadoop HDFS
  1. Hadoop HDFS
  2. HDFS-4384

test_libhdfs_threaded gets SEGV if JNIEnv cannot be initialized

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0.3-alpha
    • Fix Version/s: 2.0.3-alpha
    • Component/s: libhdfs
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      test_libhdfs_threaded gets a SEGV if JNIEnv cannot be initialized. This is incorrect; it should instead exit with a nice error message in this case.

      1. HDFS-4384.001.patch
        0.6 kB
        Colin Patrick McCabe

        Activity

        Hide
        Eli Collins added a comment -

        Given that the error case also returns null (and free(cl) is safe when cl is null), the DeleteLocalRefs are causing the segv? If so should they be guarded instead since other error cases would hit the same?

        Show
        Eli Collins added a comment - Given that the error case also returns null (and free(cl) is safe when cl is null), the DeleteLocalRefs are causing the segv? If so should they be guarded instead since other error cases would hit the same?
        Hide
        Colin Patrick McCabe added a comment -

        It's simpler than that. (*env)->DeleteLocalRefs(...) fails because env is NULL. The other error cases don't have this problem.

        Show
        Colin Patrick McCabe added a comment - It's simpler than that. (*env)->DeleteLocalRefs(...) fails because env is NULL . The other error cases don't have this problem.
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12564290/HDFS-4384.001.patch
        against trunk revision .

        +1 @author. The patch does not contain any @author tags.

        -1 tests included. The patch doesn't appear to include any new or modified tests.
        Please justify why no new tests are needed for this patch.
        Also please list what manual steps were performed to verify this patch.

        +1 javac. The applied patch does not increase the total number of javac compiler warnings.

        +1 javadoc. The javadoc tool did not generate any warning messages.

        +1 eclipse:eclipse. The patch built with eclipse:eclipse.

        +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings.

        +1 release audit. The applied patch does not increase the total number of release audit warnings.

        +1 core tests. The patch passed unit tests in hadoop-hdfs-project/hadoop-hdfs.

        +1 contrib tests. The patch passed contrib unit tests.

        Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/3818//testReport/
        Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/3818//console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - -1 overall . Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12564290/HDFS-4384.001.patch against trunk revision . +1 @author . The patch does not contain any @author tags. -1 tests included . The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. +1 javac . The applied patch does not increase the total number of javac compiler warnings. +1 javadoc . The javadoc tool did not generate any warning messages. +1 eclipse:eclipse . The patch built with eclipse:eclipse. +1 findbugs . The patch does not introduce any new Findbugs (version 1.3.9) warnings. +1 release audit . The applied patch does not increase the total number of release audit warnings. +1 core tests . The patch passed unit tests in hadoop-hdfs-project/hadoop-hdfs. +1 contrib tests . The patch passed contrib unit tests. Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/3818//testReport/ Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/3818//console This message is automatically generated.
        Hide
        Eli Collins added a comment -

        Makes sense. +1

        Show
        Eli Collins added a comment - Makes sense. +1
        Hide
        Eli Collins added a comment -

        I've committed this and merged to branch-2. Thanks Colin!

        Show
        Eli Collins added a comment - I've committed this and merged to branch-2. Thanks Colin!
        Hide
        Hudson added a comment -

        Integrated in Hadoop-trunk-Commit #3219 (See https://builds.apache.org/job/Hadoop-trunk-Commit/3219/)
        HDFS-4384. test_libhdfs_threaded gets SEGV if JNIEnv cannot be initialized. Contributed by Colin Patrick McCabe (Revision 1432221)

        Result = SUCCESS
        eli : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1432221
        Files :

        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/native/libhdfs/native_mini_dfs.c
        Show
        Hudson added a comment - Integrated in Hadoop-trunk-Commit #3219 (See https://builds.apache.org/job/Hadoop-trunk-Commit/3219/ ) HDFS-4384 . test_libhdfs_threaded gets SEGV if JNIEnv cannot be initialized. Contributed by Colin Patrick McCabe (Revision 1432221) Result = SUCCESS eli : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1432221 Files : /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/native/libhdfs/native_mini_dfs.c
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Yarn-trunk #94 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/94/)
        HDFS-4384. test_libhdfs_threaded gets SEGV if JNIEnv cannot be initialized. Contributed by Colin Patrick McCabe (Revision 1432221)

        Result = SUCCESS
        eli : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1432221
        Files :

        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/native/libhdfs/native_mini_dfs.c
        Show
        Hudson added a comment - Integrated in Hadoop-Yarn-trunk #94 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/94/ ) HDFS-4384 . test_libhdfs_threaded gets SEGV if JNIEnv cannot be initialized. Contributed by Colin Patrick McCabe (Revision 1432221) Result = SUCCESS eli : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1432221 Files : /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/native/libhdfs/native_mini_dfs.c
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Hdfs-trunk #1283 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/1283/)
        HDFS-4384. test_libhdfs_threaded gets SEGV if JNIEnv cannot be initialized. Contributed by Colin Patrick McCabe (Revision 1432221)

        Result = FAILURE
        eli : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1432221
        Files :

        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/native/libhdfs/native_mini_dfs.c
        Show
        Hudson added a comment - Integrated in Hadoop-Hdfs-trunk #1283 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/1283/ ) HDFS-4384 . test_libhdfs_threaded gets SEGV if JNIEnv cannot be initialized. Contributed by Colin Patrick McCabe (Revision 1432221) Result = FAILURE eli : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1432221 Files : /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/native/libhdfs/native_mini_dfs.c
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Mapreduce-trunk #1311 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1311/)
        HDFS-4384. test_libhdfs_threaded gets SEGV if JNIEnv cannot be initialized. Contributed by Colin Patrick McCabe (Revision 1432221)

        Result = FAILURE
        eli : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1432221
        Files :

        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/native/libhdfs/native_mini_dfs.c
        Show
        Hudson added a comment - Integrated in Hadoop-Mapreduce-trunk #1311 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1311/ ) HDFS-4384 . test_libhdfs_threaded gets SEGV if JNIEnv cannot be initialized. Contributed by Colin Patrick McCabe (Revision 1432221) Result = FAILURE eli : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1432221 Files : /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/native/libhdfs/native_mini_dfs.c

          People

          • Assignee:
            Colin Patrick McCabe
            Reporter:
            Colin Patrick McCabe
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development