Details

    • Bug
    • Resolution: Fixed
    • Minor
    • Lustre 2.16.0
    • None
    • None
    • 3
    • 9223372036854775807

    Description

      There is a small memory leak reported by libcfs when using udsp.

      [root@el8-mds2 ~]# dmesg -C
      [root@el8-mds2 ~]# start.sh
      insmod /home/hornc/lustre-wc-rel/libcfs/libcfs/libcfs.ko
      insmod /home/hornc/lustre-wc-rel/lnet/lnet/lnet.ko
      insmod /home/hornc/lustre-wc-rel/lnet/klnds/socklnd/ksocklnd.ko
      debug=+net malloc
      [root@el8-mds2 ~]# lnetctl udsp add --src tcp --priority 1
      [root@el8-mds2 ~]# lustre_rmmod
      [root@el8-mds2 ~]# dmesg | tail
      [66520.595537] LNet: HW NUMA nodes: 1, HW CPU cores: 2, npartitions: 1
      [66520.600543] alg: No test for adler32 (adler32-zlib)
      [66521.319208] Key type ._llcrypt registered
      [66521.319558] Key type .llcrypt registered
      [66531.530270] LNet: 26041:0:(lib-ptl.c:956:lnet_clear_lazy_portal()) Active lazy portal 0 on exit
      [66531.580271] Key type .llcrypt unregistered
      [66531.581053] Key type ._llcrypt unregistered
      [66531.586086] LNetError: 26089:0:(module.c:948:libcfs_exit()) Portals memory leaked: 32 bytes
      [root@el8-mds2 ~]#
      

      Attachments

        Activity

          [LU-16575] UDSP memory leak

          "Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/50081/
          Subject: LU-16575 lnet: memory leak in copy_ioc_udsp_descr
          Project: fs/lustre-release
          Branch: master
          Current Patch Set:
          Commit: f8e129198b002589daf4acdaf10cb970e9dab44a

          gerrit Gerrit Updater added a comment - "Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/50081/ Subject: LU-16575 lnet: memory leak in copy_ioc_udsp_descr Project: fs/lustre-release Branch: master Current Patch Set: Commit: f8e129198b002589daf4acdaf10cb970e9dab44a

          "Chris Horn <chris.horn@hpe.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/50081
          Subject: LU-16575 lnet: memory leak in copy_ioc_udsp_descr
          Project: fs/lustre-release
          Branch: master
          Current Patch Set: 1
          Commit: 0efd4006770844f73dba8057b5f8283f3034d4c4

          gerrit Gerrit Updater added a comment - "Chris Horn <chris.horn@hpe.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/50081 Subject: LU-16575 lnet: memory leak in copy_ioc_udsp_descr Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: 0efd4006770844f73dba8057b5f8283f3034d4c4
          hornc Chris Horn added a comment -
          [root@el8-mds2 ~]# clean.sh
          [root@el8-mds2 ~]# start.sh
          insmod /home/hornc/lustre-wc-rel/libcfs/libcfs/libcfs.ko
          insmod /home/hornc/lustre-wc-rel/lnet/lnet/lnet.ko
          insmod /home/hornc/lustre-wc-rel/lnet/klnds/socklnd/ksocklnd.ko
          debug=+net malloc
          [root@el8-mds2 ~]# lctl clear
          [root@el8-mds2 ~]# lnetctl udsp add --src tcp --priority 0
          [root@el8-mds2 ~]# lnetctl udsp del --idx 0
          [root@el8-mds2 ~]# lctl dk > /tmp/dk.log
          [root@el8-mds2 ~]# perl /home/hornc/lustre-wc-rel/lustre/tests/leak_finder.pl /tmp/dk.log
          Starting analysis since 0
             freed    128 bytes at 00000000e6076820 called hdr (module.c:libcfs_ioctl:238)
          *** Free without malloc (128 bytes at 00000000e6076820, module.c:libcfs_ioctl:238)
             alloc     80 bytes at 0000000040ed7d27 called (*hdr_pp) (module.c:libcfs_ioctl_getdata:166)
             alloc    176 bytes at 000000004bc99907 called udsp (udsp.c:lnet_udsp_alloc:1099)
             alloc     32 bytes at 000000003b7c561d called (buf) (udsp.c:copy_ioc_udsp_descr:1496)
             freed     80 bytes at 0000000040ed7d27 called hdr (module.c:libcfs_ioctl:238)
             alloc     32 bytes at 00000000e7e1a5ff called (*hdr_pp) (module.c:libcfs_ioctl_getdata:166)
             freed    176 bytes at 000000004bc99907 called udsp (udsp.c:lnet_udsp_free:1132)
             freed     32 bytes at 00000000e7e1a5ff called hdr (module.c:libcfs_ioctl:238)
          *** Leak: 32 bytes allocated at 000000003b7c561d (udsp.c:copy_ioc_udsp_descr:1496:(buf), debug file line 10)
          maximum used: 288, amount leaked: 32
          [root@el8-mds2 ~]#
          
          hornc Chris Horn added a comment - [root@el8-mds2 ~]# clean.sh [root@el8-mds2 ~]# start.sh insmod /home/hornc/lustre-wc-rel/libcfs/libcfs/libcfs.ko insmod /home/hornc/lustre-wc-rel/lnet/lnet/lnet.ko insmod /home/hornc/lustre-wc-rel/lnet/klnds/socklnd/ksocklnd.ko debug=+net malloc [root@el8-mds2 ~]# lctl clear [root@el8-mds2 ~]# lnetctl udsp add --src tcp --priority 0 [root@el8-mds2 ~]# lnetctl udsp del --idx 0 [root@el8-mds2 ~]# lctl dk > /tmp/dk.log [root@el8-mds2 ~]# perl /home/hornc/lustre-wc-rel/lustre/tests/leak_finder.pl /tmp/dk.log Starting analysis since 0 freed 128 bytes at 00000000e6076820 called hdr (module.c:libcfs_ioctl:238) *** Free without malloc (128 bytes at 00000000e6076820, module.c:libcfs_ioctl:238) alloc 80 bytes at 0000000040ed7d27 called (*hdr_pp) (module.c:libcfs_ioctl_getdata:166) alloc 176 bytes at 000000004bc99907 called udsp (udsp.c:lnet_udsp_alloc:1099) alloc 32 bytes at 000000003b7c561d called (buf) (udsp.c:copy_ioc_udsp_descr:1496) freed 80 bytes at 0000000040ed7d27 called hdr (module.c:libcfs_ioctl:238) alloc 32 bytes at 00000000e7e1a5ff called (*hdr_pp) (module.c:libcfs_ioctl_getdata:166) freed 176 bytes at 000000004bc99907 called udsp (udsp.c:lnet_udsp_free:1132) freed 32 bytes at 00000000e7e1a5ff called hdr (module.c:libcfs_ioctl:238) *** Leak: 32 bytes allocated at 000000003b7c561d (udsp.c:copy_ioc_udsp_descr:1496:(buf), debug file line 10) maximum used: 288, amount leaked: 32 [root@el8-mds2 ~]#

          People

            hornc Chris Horn
            hornc Chris Horn
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: