[ 
https://issues.apache.org/jira/browse/HBASE-7086?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ted Yu updated HBASE-7086:
--------------------------

    Attachment: 7086-trunk-v3.txt

Trunk patch v3 illustrates how the stack trace is logged.
Here is sample from test output:
{code}
2012-11-02 15:46:35,429 INFO  [main] hbase.ResourceChecker(147): before: 
master.cleaner.TestHFileCleaner#testTTLCleaner Thread=43, 
OpenFileDescriptor=145, MaxFileDescriptor=10240, ConnectionCount=0
2012-11-02 15:46:35,671 DEBUG [main] cleaner.TimeToLiveHFileCleaner(68): 
Life:106, ttl:100, current:1351896395669, from: 1351896395563
2012-11-02 15:46:35,673 INFO  [main] hbase.ResourceChecker(171): after: 
master.cleaner.TestHFileCleaner#testTTLCleaner Thread=44 (was 43)
Potentially hanging thread: LeaseChecker
  java.lang.Thread.sleep(Native Method)
  org.apache.hadoop.hdfs.DFSClient$LeaseChecker.run(DFSClient.java:1485)
  java.lang.Thread.run(Thread.java:680)
 - Thread LEAK? -, OpenFileDescriptor=145 (was 145), MaxFileDescriptor=10240 
(was 10240), ConnectionCount=0 (was 0)
2012-11-02 15:46:35,674 INFO  [main] hbase.ResourceChecker(147): before: 
master.cleaner.TestHFileCleaner#testHFileCleaning Thread=44, 
OpenFileDescriptor=145, MaxFileDescriptor=10240, ConnectionCount=0
{code}
I am open to the naming of the new method in ResourceChecker.ResourceAnalyzer

Please provide your comments.
                
> Enhance ResourceChecker to log stack trace for potentially hanging threads
> --------------------------------------------------------------------------
>
>                 Key: HBASE-7086
>                 URL: https://issues.apache.org/jira/browse/HBASE-7086
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Ted Yu
>            Assignee: Ted Yu
>             Fix For: 0.94.3, 0.96.0
>
>         Attachments: 7086.94, 7086-94.addendum, 7086-trunk.txt, 
> 7086-trunk-v2.txt, 7086-trunk-v3.txt, testHFileCleaner.out
>
>
> Currently ResourceChecker logs a line similar to the following if it detects 
> potential thread leak:
> {code}
> 2012-11-02 10:18:59,299 INFO  [main] hbase.ResourceChecker(157): after 
> master.cleaner.TestHFileCleaner#testTTLCleaner: 44 threads (was 43), 145 file 
> descriptors (was 145). 0 connections,  -thread leak?-
> {code}
> We should enhance the log to include stack trace of the potentially hanging 
> thread(s)
> This work was motivated when I investigated test failure in HBASE-6796

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to