Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.0.1-alpha
-
None
-
Reviewed
Description
libhdfs does not consistently handle exceptions. Sometimes we don't free the memory associated with them (memory leak). Sometimes we invoke JNI functions that are not supposed to be invoked when an exception is active.
Running a libhdfs test program with -Xcheck:jni shows the latter problem clearly:
WARNING in native method: JNI call made with exception pending WARNING in native method: JNI call made with exception pending WARNING in native method: JNI call made with exception pending WARNING in native method: JNI call made with exception pending WARNING in native method: JNI call made with exception pending Exception in thread "main" java.io.IOException: ...
Attachments
Attachments
Issue Links
- is duplicated by
-
HDFS-1154 libhdfs::hdfsExists should return different value in case of 1. error and 2. file does not exist
- Resolved
- is related to
-
HDFS-465 in branch-1, libhdfs makes jni lib calls after setting errno in some places
- Resolved
-
HDFS-3710 libhdfs misuses O_RDONLY/WRONLY/RDWR
- Closed
-
HDFS-3742 libhdfs symbol visibility issues
- Closed
- relates to
-
HDFS-4467 Segmentation fault in libhdfs while connecting to HDFS, in an application populating Hive Tables
- Open