[LU-14736] leak-finder.pl should not print to STDERR Created: 05/Jun/21  Updated: 22/Mar/23  Resolved: 22/Mar/23

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: None
Fix Version/s: Lustre 2.16.0

Type: Improvement Priority: Minor
Reporter: Patrick Farrell Assignee: Andreas Dilger
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Related
Rank (Obsolete): 9223372036854775807

 Description   

leak-finder.pl is checking for leaks, it's not an error in the script if it finds some.

The main effect is to make it more annoying to redirect the script output.  (It also prints some basic status information to stderr, for which there is no good reason at all.)



 Comments   
Comment by Gerrit Updater [ 05/Jun/21 ]

Patrick Farrell (farr0186@gmail.com) uploaded a new patch: https://review.whamcloud.com/43934
Subject: LU-14736 utils: Change leak_check to use stdout
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 983cadac1137cad6e0376e61fb80ecfa2b52fc9e

Comment by Gerrit Updater [ 11/Jun/21 ]

Andreas Dilger (adilger@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/43983
Subject: LU-14736 utils: update leak-finder.pl for new format
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: ae84ad355bb350924fb1963256a360c6f117ab2e

Comment by Gerrit Updater [ 21/Jun/21 ]

Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/43934/
Subject: LU-14736 utils: Change leak_finder to use stdout
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 975b944b815412baef344f58a8325423b5d95e1e

Comment by Emoly Liu [ 16/Sep/22 ]

I improved the patch at https://review.whamcloud.com/43983 a little by adding two new options:

  • --by_func: sort the leak logs by function name in ASC order;
  • --summary: print a summary report by the number of total leak bytes of each function in ASC order. The output is like
    -------------------------------------------------------------------------------------------------------------
                                                      function | each_leak_bytes | leak_times | total_leak_bytes 
    -----------------------------------------------------------|-----------------|------------|------------------
    cfs_hash_buckets_realloc:893:(new_bkts)                    |               8 |          1 |                8 
    ptlrpcd_init:789:(ptlrpcds)                                |              16 |          1 |               16 
    lnet_ni_add_interface:426:(ni->ni_interfaces[niface])      |               6 |          3 |               18 
    class_register_type:224:(type->typ_name)                   |               4 |          5 |               20 
    lprocfs_alloc_stats:1282:(stats->ls_cnt_header)            |              24 |          1 |               24 
    ...
    

     

These options are helpful for me when I worked on a recent memory leak issue.

Comment by Gerrit Updater [ 17/Nov/22 ]

"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/43983/
Subject: LU-14736 utils: update leak-finder.pl for new format
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 5b998d803ffbd02ed306195d231e0a3478658574

Comment by Gerrit Updater [ 10/Dec/22 ]

"Andreas Dilger <adilger@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/49357
Subject: LU-14736 tests: improve leak-finder compatibility
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 1a2c31849f443c75f1b549a56f6ed03abe908d2a

Comment by Gerrit Updater [ 21/Mar/23 ]

"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/49357/
Subject: LU-14736 tests: improve leak-finder compatibility
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 8ab8483c8f876480d5979e4b54e2e6f33cd9b7a7

Comment by Peter Jones [ 22/Mar/23 ]

Landed for 2.16

Generated at Sat Feb 10 03:12:20 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.