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

Ted Yu commented on HBASE-7086:
-------------------------------

Looks like I cannot access https://builds.apache.org/job/PreCommit-HBASE-Build/ 
at the moment.
Recent Jenkins builds returned strange exception as well.

My first trunk patch didn't work. There would be a lot of extraneous log such 
as the following:
{code}
NumberFormatException: 2012-11-02 14:23:11,497 DEBUG [pool-1-thread-1] 
backup.HFileArchiver(338): No existing file in archive 
for:/home/hduser/trunk/hbase-server/target/test-data/9e6c26d7-45f9-406f-87eb-a733231256ac/testWithMinVersions/.archive/testWithMinVersions/07e89fc98af6b9300cd5c8e4c19fa8d9/colfamily31/a3644ad438fd40f885b29959730c1fde,
 free to archive original file.
NumberFormatException: 2012-11-02 14:23:11,497 DEBUG [pool-1-thread-1] 
backup.HFileArchiver(345): Finished archiving file from: class 
org.apache.hadoop.hbase.backup.HFileArchiver$FileableStoreFile, 
file:/home/hduser/trunk/hbase-server/target/test-data/9e6c26d7-45f9-406f-87eb-a733231256ac/testWithMinVersions/testWithMinVersions/07e89fc98af6b9300cd5c8e4c19fa8d9/colfamily31/a3644ad438fd40f885b29959730c1fde,
 to: 
/home/hduser/trunk/hbase-server/target/test-data/9e6c26d7-45f9-406f-87eb-a733231256ac/testWithMinVersions/.archive/testWithMinVersions/07e89fc98af6b9300cd5c8e4c19fa8d9/colfamily31/a3644ad438fd40f885b29959730c1fde
{code}
In trunk patch v2, I pass Log object to ResourceCheckerJUnitListener.
It seems that the actual log couldn't be written when there is thread leak:
{code}
2012-11-02 14:31:58,084 INFO  [main] hbase.ResourceChecker(162): after: 
io.hfile.TestScannerSelectionUsingTTL#testScannerSelection[3] Thread=11 (was 
10) - Thread LEAK? -, OpenFileDescriptor=104 (was 102) - OpenFileDescriptor 
LEAK? -, MaxFileDescriptor=10240 (was 10240), ConnectionCount=0 (was 0)
2012-11-02 14:31:58,085 INFO  [main] hbase.ResourceChecker(144): before: 
io.hfile.TestScannerSelectionUsingTTL#testScannerSelection[4] Thread=11, 
OpenFileDescriptor=104, MaxFileDescriptor=10240, ConnectionCount=0
{code}
My next step is to add method to ResourceChecker.ResourceAnalyzer which returns 
array of String so that ResourceChecker can log them.
But I want to get N Keywal's input first.
                
> 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, 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