Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-10657

New static analysis issues in v2_10_58_0-16-g21e3977

Details

    • Bug
    • Resolution: Fixed
    • Major
    • Lustre 2.11.0
    • Lustre 2.11.0
    • 3
    • 9223372036854775807

    Description

      Found 1 new static analysis issues in v2_10_58_0-16-g21e3977:

      1. Resource leak
        • lustre/utils/lfs.c: in mirror_split, Resource acquired to 'fd' at line 1690 may be lost here.

      TRACEBACK:

      • A condition which occurs, leading to the defect
        lfs.c:1683: rc==LLAPI_LAYOUT_ITER_CONT is false
      • An event which alters the program's state, leading to the defect
        lfs.c:1690: Resource is acquired: 'fd' in the call to 'open'
      • A condition which occurs, leading to the defect
        lfs.c:1691: fd<0 is false
      • A condition which occurs, leading to the defect
        lfs.c:1721: rc<0 is true
      • An event which alters the program's state, leading to the defect
        lfs.c:1788: Resource is lost: 'fd'

      The same happens with all 'goto free_layout;' after lfs.c:1697 line.

      The list of commits since the previous build v2_10_57_0-88-g8059dbb:

      21e3977 -LU-10286- mdt: deny 2.10 clients to open mirrored files
      b8e87b5 LU-10560 llite: remove extra headers from rw26.c
      aae9a90 LU-10560 llite: remove extra headers from llite_mmap.c
      45ad1a7 -LU-10536- build: add path for libnvpair to zfslib
      4fabc57 -LU-10580- lfsck: GPF in lfsck_namespace_repair_dirent
      db25bdd -LU-9466- tests: Error message for empty "error" calls
      defbc7d -LU-10508- utils: use callvpe() in lustre_rsync
      7b980e1 -LU-10507- tests: use {save,restore}
      _layout() in test
      4b5206bc -LU-6353- contrib: Remove wireshark plugin
      96fbf09 LU-10347 tests: suspend the copytool in sanity-hsm/test_252
      043f597 -LU-10364- test: Add version check to test_255b
      873c843 -LU-9664- hsm: protect cdt_state
      99420a1 LU-9474 tests: fix quoting in stack_trap
      dbc73c2 LU-9019 lnd: remove remaining cfs_time wrappers
      23b2d47 -LU-10420- flr: split a mirror from mirrored file
      27116ee -LU-10394- lnd: default to using MEM_REG
      116c51f New tag 2.10.58

      Attachments

        Issue Links

          Activity

            [LU-10657] New static analysis issues in v2_10_58_0-16-g21e3977
            adilger Andreas Dilger made changes -
            Link New: This issue is related to LU-4629 [ LU-4629 ]
            adilger Andreas Dilger made changes -
            Affects Version/s New: Lustre 2.11.0 [ 13091 ]
            pjones Peter Jones made changes -
            Fix Version/s New: Lustre 2.11.0 [ 13091 ]
            Resolution New: Fixed [ 1 ]
            Status Original: Open [ 1 ] New: Resolved [ 5 ]
            pjones Peter Jones added a comment -

            Landed for 2.11

            pjones Peter Jones added a comment - Landed for 2.11

            Oleg Drokin (oleg.drokin@intel.com) merged in patch https://review.whamcloud.com/31410/
            Subject: LU-10657 utils: fd leak in mirror_split()
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: c593dd0b3c758f58a0845e850a7b986e00c80af2

            gerrit Gerrit Updater added a comment - Oleg Drokin (oleg.drokin@intel.com) merged in patch https://review.whamcloud.com/31410/ Subject: LU-10657 utils: fd leak in mirror_split() Project: fs/lustre-release Branch: master Current Patch Set: Commit: c593dd0b3c758f58a0845e850a7b986e00c80af2

            Bobi Jam (bobijam@hotmail.com) uploaded a new patch: https://review.whamcloud.com/31410
            Subject: LU-10657 utils: fd leak in mirror_split()
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: 7daecd1c02ea0316fccf3649448171de9f1913d1

            gerrit Gerrit Updater added a comment - Bobi Jam (bobijam@hotmail.com) uploaded a new patch: https://review.whamcloud.com/31410 Subject: LU-10657 utils: fd leak in mirror_split() Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: 7daecd1c02ea0316fccf3649448171de9f1913d1
            jgmitter Joseph Gmitter (Inactive) made changes -
            Assignee Original: WC Triage [ wc-triage ] New: Zhenyu Xu [ bobijam ]

            Hi Bobijam,

            Can you please look into this?

            Thanks.
            Joe

            jgmitter Joseph Gmitter (Inactive) added a comment - Hi Bobijam, Can you please look into this? Thanks. Joe
            dmiter Dmitry Eremin (Inactive) made changes -
            Description Original: Found 1 new static analysis issues in v2_10_58_0-16-g21e3977:
             # *Resource leak*
             ** {{lustre/utils/lfs.c}}: in _mirror_split_, Resource acquired to 'fd' at line 1690 may be lost here.

            *TRACEBACK:*
             * A condition which occurs, leading to the defect
             lfs.c:1683: rc==LLAPI_LAYOUT_ITER_CONT is false
             * An event which alters the program's state, leading to the defect
             lfs.c:1690: Resource is acquired: 'fd' in the call to 'open'
             * A condition which occurs, leading to the defect
             lfs.c:1691: fd<0 is false
             * A condition which occurs, leading to the defect
             lfs.c:1721: rc<0 is true
             * An event which alters the program's state, leading to the defect
             lfs.c:1788: Resource is lost: 'fd'

            The list of commits since the previous build v2_10_57_0-88-g8059dbb:


            |[21e3977|http://git.whamcloud.com/?p=fs/lustre-release.git;a=commit;h=21e39775a0f4f8d7819a49c37b59379a1181f52a]|-LU-10286- mdt: deny 2.10 clients to open mirrored files|
            |[b8e87b5|http://git.whamcloud.com/?p=fs/lustre-release.git;a=commit;h=b8e87b5a1c17048a760ce9809fde904ca6dc449d]|LU-10560 llite: remove extra headers from rw26.c|
            |[aae9a90|http://git.whamcloud.com/?p=fs/lustre-release.git;a=commit;h=aae9a90ce7c967c208c482e0ef500c5115017388]|LU-10560 llite: remove extra headers from llite_mmap.c|
            |[45ad1a7|http://git.whamcloud.com/?p=fs/lustre-release.git;a=commit;h=45ad1a73829763f9a0ebe0f2c6f25d254697f0e6]|-LU-10536- build: add path for libnvpair to zfslib|
            |[4fabc57|http://git.whamcloud.com/?p=fs/lustre-release.git;a=commit;h=4fabc57516c0e2aa82cb937afdce26b4cd1d510d]|-LU-10580- lfsck: GPF in lfsck_namespace_repair_dirent|
            |[db25bdd|http://git.whamcloud.com/?p=fs/lustre-release.git;a=commit;h=db25bddf374954b5c835e3784c75fc88e1dc36d6]|-LU-9466- tests: Error message for empty "error" calls|
            |[defbc7d|http://git.whamcloud.com/?p=fs/lustre-release.git;a=commit;h=defbc7ddd9c3b1ffc28f123316217e30e210127b]|-LU-10508- utils: use callvpe() in lustre_rsync|
            |[7b980e1|http://git.whamcloud.com/?p=fs/lustre-release.git;a=commit;h=7b980e101e172d7d8b43a0db2dcaabc8c8c6c855]|-LU-10507- tests: use \{save,restore}
            _layout() in test|
            |[4b5206bc|http://git.whamcloud.com/?p=fs/lustre-release.git;a=commit;h=4b5206bcf18c71ecc1291219af560298bf7517e3]|-LU-6353- contrib: Remove wireshark plugin|
            |[96fbf09|http://git.whamcloud.com/?p=fs/lustre-release.git;a=commit;h=96fbf0935977a9669d2a3bb2612db8b7eba3e5a5]|LU-10347 tests: suspend the copytool in sanity-hsm/test_252|
            |[043f597|http://git.whamcloud.com/?p=fs/lustre-release.git;a=commit;h=043f5976d087a87bace840653c99e10cde13bb6d]|-LU-10364- test: Add version check to test_255b|
            |[873c843|http://git.whamcloud.com/?p=fs/lustre-release.git;a=commit;h=873c843ea158be8300b39582d74ff021ffae9b2f]|-LU-9664- hsm: protect cdt_state|
            |[99420a1|http://git.whamcloud.com/?p=fs/lustre-release.git;a=commit;h=99420a1830b89a8aba6350b095065d65107f7c0f]|LU-9474 tests: fix quoting in stack_trap|
            |[dbc73c2|http://git.whamcloud.com/?p=fs/lustre-release.git;a=commit;h=dbc73c2f7c999530029bd20f878d0afcd56d81c4]|LU-9019 lnd: remove remaining cfs_time wrappers|
            |[23b2d47|http://git.whamcloud.com/?p=fs/lustre-release.git;a=commit;h=23b2d47818996a825ab8eadd64ce29089b3d114b]|-LU-10420- flr: split a mirror from mirrored file|
            |[27116ee|http://git.whamcloud.com/?p=fs/lustre-release.git;a=commit;h=27116ee18c04057936837f6f0aef3f4c09c21d78]|-LU-10394- lnd: default to using MEM_REG|
            |[116c51f|http://git.whamcloud.com/?p=fs/lustre-release.git;a=commit;h=116c51fd3db691537fbe83a223d646ddf045bc13]|New tag 2.10.58|
            New: Found 1 new static analysis issues in v2_10_58_0-16-g21e3977:
             # *Resource leak*
             ** {{lustre/utils/lfs.c}}: in _mirror_split_, Resource acquired to 'fd' at line 1690 may be lost here.

            *TRACEBACK:*
             * A condition which occurs, leading to the defect
             lfs.c:1683: rc==LLAPI_LAYOUT_ITER_CONT is false
             * An event which alters the program's state, leading to the defect
             lfs.c:1690: Resource is acquired: 'fd' in the call to 'open'
             * A condition which occurs, leading to the defect
             lfs.c:1691: fd<0 is false
             * A condition which occurs, leading to the defect
             lfs.c:1721: rc<0 is true
             * An event which alters the program's state, leading to the defect
             lfs.c:1788: Resource is lost: 'fd'

            The same happens with all '*goto free_layout*;' after lfs.c:1697 line.

            The list of commits since the previous build v2_10_57_0-88-g8059dbb:


            |[21e3977|http://git.whamcloud.com/?p=fs/lustre-release.git;a=commit;h=21e39775a0f4f8d7819a49c37b59379a1181f52a]|--LU-10286-- mdt: deny 2.10 clients to open mirrored files|
            |[b8e87b5|http://git.whamcloud.com/?p=fs/lustre-release.git;a=commit;h=b8e87b5a1c17048a760ce9809fde904ca6dc449d]|LU-10560 llite: remove extra headers from rw26.c|
            |[aae9a90|http://git.whamcloud.com/?p=fs/lustre-release.git;a=commit;h=aae9a90ce7c967c208c482e0ef500c5115017388]|LU-10560 llite: remove extra headers from llite_mmap.c|
            |[45ad1a7|http://git.whamcloud.com/?p=fs/lustre-release.git;a=commit;h=45ad1a73829763f9a0ebe0f2c6f25d254697f0e6]|--LU-10536-- build: add path for libnvpair to zfslib|
            |[4fabc57|http://git.whamcloud.com/?p=fs/lustre-release.git;a=commit;h=4fabc57516c0e2aa82cb937afdce26b4cd1d510d]|--LU-10580-- lfsck: GPF in lfsck_namespace_repair_dirent|
            |[db25bdd|http://git.whamcloud.com/?p=fs/lustre-release.git;a=commit;h=db25bddf374954b5c835e3784c75fc88e1dc36d6]|--LU-9466-- tests: Error message for empty "error" calls|
            |[defbc7d|http://git.whamcloud.com/?p=fs/lustre-release.git;a=commit;h=defbc7ddd9c3b1ffc28f123316217e30e210127b]|--LU-10508-- utils: use callvpe() in lustre_rsync|
            |[7b980e1|http://git.whamcloud.com/?p=fs/lustre-release.git;a=commit;h=7b980e101e172d7d8b43a0db2dcaabc8c8c6c855]|--LU-10507-- tests: use \{save,restore}
             _layout() in test|
            |[4b5206bc|http://git.whamcloud.com/?p=fs/lustre-release.git;a=commit;h=4b5206bcf18c71ecc1291219af560298bf7517e3]|--LU-6353-- contrib: Remove wireshark plugin|
            |[96fbf09|http://git.whamcloud.com/?p=fs/lustre-release.git;a=commit;h=96fbf0935977a9669d2a3bb2612db8b7eba3e5a5]|LU-10347 tests: suspend the copytool in sanity-hsm/test_252|
            |[043f597|http://git.whamcloud.com/?p=fs/lustre-release.git;a=commit;h=043f5976d087a87bace840653c99e10cde13bb6d]|--LU-10364-- test: Add version check to test_255b|
            |[873c843|http://git.whamcloud.com/?p=fs/lustre-release.git;a=commit;h=873c843ea158be8300b39582d74ff021ffae9b2f]|--LU-9664-- hsm: protect cdt_state|
            |[99420a1|http://git.whamcloud.com/?p=fs/lustre-release.git;a=commit;h=99420a1830b89a8aba6350b095065d65107f7c0f]|LU-9474 tests: fix quoting in stack_trap|
            |[dbc73c2|http://git.whamcloud.com/?p=fs/lustre-release.git;a=commit;h=dbc73c2f7c999530029bd20f878d0afcd56d81c4]|LU-9019 lnd: remove remaining cfs_time wrappers|
            |[23b2d47|http://git.whamcloud.com/?p=fs/lustre-release.git;a=commit;h=23b2d47818996a825ab8eadd64ce29089b3d114b]|--LU-10420-- flr: split a mirror from mirrored file|
            |[27116ee|http://git.whamcloud.com/?p=fs/lustre-release.git;a=commit;h=27116ee18c04057936837f6f0aef3f4c09c21d78]|--LU-10394-- lnd: default to using MEM_REG|
            |[116c51f|http://git.whamcloud.com/?p=fs/lustre-release.git;a=commit;h=116c51fd3db691537fbe83a223d646ddf045bc13]|New tag 2.10.58|
            dmiter Dmitry Eremin (Inactive) made changes -
            Priority Original: Minor [ 4 ] New: Major [ 3 ]

            People

              bobijam Zhenyu Xu
              dmiter Dmitry Eremin (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: