[jira] [Comment Edited] (HDFS-14015) Improve error handling in hdfsThreadDestructor in native thread local storage

2018-11-14 Thread Pranay Singh (JIRA)


[ 
https://issues.apache.org/jira/browse/HDFS-14015?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16687362#comment-16687362
 ] 

Pranay Singh edited comment on HDFS-14015 at 11/15/18 1:31 AM:
---

Missing NULL check 

 cls = (*env)->FindClass(env, "java/lang/Thread");
if (cls == NULL) ==> missing

 mth = (*env)->GetStaticMethodID(env, cls, "currentThread",
 "()Ljava/lang/Thread;");
 mth = (*env)->GetMethodID(env, cls, "toString", "()Ljava/lang/String;");
 thr_name_str = (*env)->GetStringUTFChars(env, thr_name, NULL);
 
Return type on success could be JNI_OK

+ret = (*vm)->DetachCurrentThread(vm);
+
+if (ret != 0) {  


was (Author: pranay_singh):
Missing NULL check 

 cls = (*env)->FindClass(env, "java/lang/Thread");
 mth = (*env)->GetStaticMethodID(env, cls, "currentThread",
 "()Ljava/lang/Thread;");
 mth = (*env)->GetMethodID(env, cls, "toString", "()Ljava/lang/String;");
 thr_name_str = (*env)->GetStringUTFChars(env, thr_name, NULL);
 
Return type on success could be JNI_OK

+ret = (*vm)->DetachCurrentThread(vm);
+
+if (ret != 0) {  

> Improve error handling in hdfsThreadDestructor in native thread local storage
> -
>
> Key: HDFS-14015
> URL: https://issues.apache.org/jira/browse/HDFS-14015
> Project: Hadoop HDFS
>  Issue Type: Improvement
>  Components: native
>Affects Versions: 3.0.0
>Reporter: Daniel Templeton
>Assignee: Daniel Templeton
>Priority: Major
> Attachments: HDFS-14015.001.patch, HDFS-14015.002.patch, 
> HDFS-14015.003.patch, HDFS-14015.004.patch, HDFS-14015.005.patch, 
> HDFS-14015.006.patch, HDFS-14015.007.patch, HDFS-14015.008.patch, 
> HDFS-14015.009.patch, HDFS-14015.010.patch, HDFS-14015.011.patch
>
>
> In the hdfsThreadDestructor() function, we ignore the return value from the 
> DetachCurrentThread() call.  We are seeing cases where a native thread dies 
> while holding a JVM monitor, and it doesn't release the monitor.  We're 
> hoping that logging this error instead of ignoring it will shed some light on 
> the issue.  In any case, it's good programming practice.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org



[jira] [Comment Edited] (HDFS-14015) Improve error handling in hdfsThreadDestructor in native thread local storage

2018-10-24 Thread Pranay Singh (JIRA)


[ 
https://issues.apache.org/jira/browse/HDFS-14015?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16662686#comment-16662686
 ] 

Pranay Singh edited comment on HDFS-14015 at 10/24/18 7:03 PM:
---

The error in test_libhdfs_threaded_hdfs_static is because of an incorrect 
CLASSPATH, I ran the binary by setting CLASSPATH and it passes.

[exec]  1/39 Test  #1: test_test_libhdfs_threaded_hdfs_static 
.***Failed6.19 sec
 [exec] log4j:WARN No appenders could be found for logger 
(org.apache.hadoop.fs.FileSystem).
 [exec] hdfsOpenFile(/tlhData0002/file1): 
FileSystem#open((Lorg/apache/hadoop/fs/Path;I)Lorg/apache/hadoop/fs/FSDataInputStream;)
 error:
 [exec] (unable to get root cause for java.io.FileNotFoundException)
 [exec] (unable to get stack trace for java.io.FileNotFoundException)
 [exec] TEST_ERROR: failed on 
/testptch/hadoop/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfs-tests/test_libhdfs_threaded.c:180*
 with NULL* return return value (errno: 2): *expected substring: File does not 
exist*
 [exec] TEST_ERROR: failed on 
/testptch/hadoop/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfs-tests/test_libhdfs_threaded.c:336
 with return code -1 (errno: 2): got nonzero from doTestHdfsOperations(ti, fs, 
&paths)


was (Author: pranay_singh):
The error in test_libhdfs_threaded_hdfs_static is because of an incorrect 
CLASSPATH, I ran the binary by setting CLASSPATH and it passes.

[exec]  1/39 Test  #1: test_test_libhdfs_threaded_hdfs_static 
.***Failed6.19 sec
 [exec] log4j:WARN No appenders could be found for logger 
(org.apache.hadoop.fs.FileSystem).
 [exec] hdfsOpenFile(/tlhData0002/file1): 
FileSystem#open((Lorg/apache/hadoop/fs/Path;I)Lorg/apache/hadoop/fs/FSDataInputStream;)
 error:
 [exec] (unable to get root cause for java.io.FileNotFoundException)
 [exec] (unable to get stack trace for java.io.FileNotFoundException)
 [exec] TEST_ERROR: failed on 
/testptch/hadoop/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfs-tests/test_libhdfs_threaded.c:180
 with NULL return return value (errno: 2): expected substring: File does not 
exist
 [exec] TEST_ERROR: failed on 
/testptch/hadoop/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfs-tests/test_libhdfs_threaded.c:336
 with return code -1 (errno: 2): got nonzero from doTestHdfsOperations(ti, fs, 
&paths)

> Improve error handling in hdfsThreadDestructor in native thread local storage
> -
>
> Key: HDFS-14015
> URL: https://issues.apache.org/jira/browse/HDFS-14015
> Project: Hadoop HDFS
>  Issue Type: Improvement
>  Components: native
>Affects Versions: 3.0.0
>Reporter: Daniel Templeton
>Assignee: Daniel Templeton
>Priority: Major
> Attachments: HDFS-14015.001.patch, HDFS-14015.002.patch, 
> HDFS-14015.003.patch, HDFS-14015.004.patch, HDFS-14015.005.patch, 
> HDFS-14015.006.patch
>
>
> In the hdfsThreadDestructor() function, we ignore the return value from the 
> DetachCurrentThread() call.  We are seeing cases where a native thread dies 
> while holding a JVM monitor, and it doesn't release the monitor.  We're 
> hoping that logging this error instead of ignoring it will shed some light on 
> the issue.  In any case, it's good programming practice.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org



[jira] [Comment Edited] (HDFS-14015) Improve error handling in hdfsThreadDestructor in native thread local storage

2018-10-24 Thread Pranay Singh (JIRA)


[ 
https://issues.apache.org/jira/browse/HDFS-14015?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16662686#comment-16662686
 ] 

Pranay Singh edited comment on HDFS-14015 at 10/24/18 7:03 PM:
---

The error in test_libhdfs_threaded_hdfs_static is because of an incorrect 
CLASSPATH, I ran the binary by setting CLASSPATH and it passes.

[exec]  1/39 Test  #1: test_test_libhdfs_threaded_hdfs_static 
.***Failed6.19 sec
 [exec] log4j:WARN No appenders could be found for logger 
(org.apache.hadoop.fs.FileSystem).
 [exec] hdfsOpenFile(/tlhData0002/file1): 
FileSystem#open((Lorg/apache/hadoop/fs/Path;I)Lorg/apache/hadoop/fs/FSDataInputStream;)
 error:
 [exec] (unable to get root cause for java.io.FileNotFoundException)
 [exec] (unable to get stack trace for java.io.FileNotFoundException)
 [exec] TEST_ERROR: failed on 
/testptch/hadoop/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfs-tests/test_libhdfs_threaded.c:180**
 with NULL** return return value (errno: 2): *expected substring: File does not 
exist*
 [exec] TEST_ERROR: failed on 
/testptch/hadoop/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfs-tests/test_libhdfs_threaded.c:336
 with return code -1 (errno: 2): got nonzero from doTestHdfsOperations(ti, fs, 
&paths)


was (Author: pranay_singh):
The error in test_libhdfs_threaded_hdfs_static is because of an incorrect 
CLASSPATH, I ran the binary by setting CLASSPATH and it passes.

[exec]  1/39 Test  #1: test_test_libhdfs_threaded_hdfs_static 
.***Failed6.19 sec
 [exec] log4j:WARN No appenders could be found for logger 
(org.apache.hadoop.fs.FileSystem).
 [exec] hdfsOpenFile(/tlhData0002/file1): 
FileSystem#open((Lorg/apache/hadoop/fs/Path;I)Lorg/apache/hadoop/fs/FSDataInputStream;)
 error:
 [exec] (unable to get root cause for java.io.FileNotFoundException)
 [exec] (unable to get stack trace for java.io.FileNotFoundException)
 [exec] TEST_ERROR: failed on 
/testptch/hadoop/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfs-tests/test_libhdfs_threaded.c:180*
 with NULL* return return value (errno: 2): *expected substring: File does not 
exist*
 [exec] TEST_ERROR: failed on 
/testptch/hadoop/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfs-tests/test_libhdfs_threaded.c:336
 with return code -1 (errno: 2): got nonzero from doTestHdfsOperations(ti, fs, 
&paths)

> Improve error handling in hdfsThreadDestructor in native thread local storage
> -
>
> Key: HDFS-14015
> URL: https://issues.apache.org/jira/browse/HDFS-14015
> Project: Hadoop HDFS
>  Issue Type: Improvement
>  Components: native
>Affects Versions: 3.0.0
>Reporter: Daniel Templeton
>Assignee: Daniel Templeton
>Priority: Major
> Attachments: HDFS-14015.001.patch, HDFS-14015.002.patch, 
> HDFS-14015.003.patch, HDFS-14015.004.patch, HDFS-14015.005.patch, 
> HDFS-14015.006.patch
>
>
> In the hdfsThreadDestructor() function, we ignore the return value from the 
> DetachCurrentThread() call.  We are seeing cases where a native thread dies 
> while holding a JVM monitor, and it doesn't release the monitor.  We're 
> hoping that logging this error instead of ignoring it will shed some light on 
> the issue.  In any case, it's good programming practice.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org



[jira] [Comment Edited] (HDFS-14015) Improve error handling in hdfsThreadDestructor in native thread local storage

2018-10-23 Thread Daniel Templeton (JIRA)


[ 
https://issues.apache.org/jira/browse/HDFS-14015?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16661055#comment-16661055
 ] 

Daniel Templeton edited comment on HDFS-14015 at 10/23/18 5:54 PM:
---

I don't see why the tests are failing, but they're failing consistently.  I 
just posted a new patch that doesn't actually change anything important; it 
fixes a typo in a string.  I want to see what happens with a provably innocuous 
patch.


was (Author: templedf):
I don't see why the tests are failing, but they're failing consistently.  I 
just posted a new patch that doesn't actually change anything important; it 
fixes a typo in a string.  I want to see what happens when with a provably 
innocuous patch.

> Improve error handling in hdfsThreadDestructor in native thread local storage
> -
>
> Key: HDFS-14015
> URL: https://issues.apache.org/jira/browse/HDFS-14015
> Project: Hadoop HDFS
>  Issue Type: Improvement
>  Components: native
>Affects Versions: 3.0.0
>Reporter: Daniel Templeton
>Assignee: Daniel Templeton
>Priority: Major
> Attachments: HDFS-14015.001.patch, HDFS-14015.002.patch, 
> HDFS-14015.003.patch, HDFS-14015.004.patch, HDFS-14015.005.patch
>
>
> In the hdfsThreadDestructor() function, we ignore the return value from the 
> DetachCurrentThread() call.  We are seeing cases where a native thread dies 
> while holding a JVM monitor, and it doesn't release the monitor.  We're 
> hoping that logging this error instead of ignoring it will shed some light on 
> the issue.  In any case, it's good programming practice.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org