[LU-17000] Coverity static analysis issues Created: 28/Jul/23  Updated: 08/Feb/24

Status: Open
Project: Lustre
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Minor
Reporter: Tim Day Assignee: Tim Day
Resolution: Unresolved Votes: 0
Labels: None

Issue Links:
Related
is related to LU-1855 Coverity: Fix 'out-of-bounds access' ... Resolved
is related to LU-1856 Coverity: Fix 'Out-of-bounds write' e... Resolved
is related to LU-1884 Coverity: Fix 'resource leak' errors Resolved
is related to LU-1857 Coverity: Fix 'Unbounded source buffe... Resolved
is related to LU-1889 Fix false 'uninitialized scalar varia... Resolved
is related to LU-1907 Remove function resolution mistakes m... Resolved
is related to LU-2709 Coverity: Fix 'memory corruption' errors Resolved
is related to LU-2710 Remove function resolution mistakes m... Resolved
is related to LU-2753 Tracking bug for static code analysis... Resolved
Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

I've been experimenting with more static analyzers (Coverity in this case). While it does have some false positives, it looks like it found a number of legitimate bugs. See https://scan.coverity.com/projects/lustre for details.

It's seems like Coverity has been used with Lustre in the past (see: https://wiki.lustre.org/images/8/8a/LUG2013-Lustre_Static_Code_Analysis-Bull.pdf). Although, it doesn't seem like it's been run in a while.

Also, there's a number of Coverity comments that seem out-dated and should probably just be cleaned up.



 Comments   
Comment by Gerrit Updater [ 28/Jul/23 ]

"Timothy Day <timday@amazon.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/51793
Subject: LU-17000 misc: remove Coverity annotations
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: da0568b791cab9633d0a70d2c652345054801314

Comment by Gerrit Updater [ 28/Jul/23 ]

"Timothy Day <timday@amazon.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/51795
Subject: LU-17000 lod: remove dead code and end var
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 2e75b7bef5320fc3ba53c7462bf7c2430dd0d7fd

Comment by Gerrit Updater [ 29/Jul/23 ]

"Timothy Day <timday@amazon.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/51806
Subject: LU-17000 lnet: fix use-after-free in lnet_startup_lndnet
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 2052cc01176e2be645858864ae6ef3ef28305e60

Comment by Gerrit Updater [ 29/Jul/23 ]

"Timothy Day <timday@amazon.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/51807
Subject: LU-17000 lnet: stop abusing lo interface status
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 5309fd59908f2f4ccedc439003fd137ebae373ba

Comment by Gerrit Updater [ 02/Aug/23 ]

"Jake McManus <jacobpmcmanus@gmail.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/51846
Subject: LU-17000 lnet: null pointer dereference in liblnetconfig.c
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: a8dacf58211536cdf40ae0e32f97b7f1ca593829

Comment by Gerrit Updater [ 05/Aug/23 ]

"Timothy Day <timday@amazon.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/51876
Subject: LU-17000 lnet: fix various bugs in lib-move.c
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: e46b089b1b4cf4566c2b71a6ba0beb71846e4360

Comment by Gerrit Updater [ 07/Aug/23 ]

"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/51795/
Subject: LU-17000 lod: fix lod_gen_component_id not wrapping
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: ce05a43ca0df8bb725dad2ba854ec7bd0a8eae5f

Comment by Gerrit Updater [ 19/Aug/23 ]

"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/51806/
Subject: LU-17000 lnet: fix use-after-free in lnet_startup_lndnet
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: a28ae45d7709c89ae86af8de357842a454361a39

Comment by Andreas Dilger [ 30/Aug/23 ]

Tim, thanks for looking into this.

I registered with the project mostly to look around at what is available there, and definitely there are a number of issues that should be fixed.

I also added Oleg, Patrick, Serguei, Arshad, and James to this ticket since I think this may be of interest to them. I thought about inviting them directly to the project, but I wasn't sure which email they would want to use.

I've excluded lustre/tests, lustre/kernel_patches, ldiskfs/kernel_patches, contrib, and build from the scan, since these are either not user-visible defects, or I don't think a scan on a patch will produce useful results. There still appear to be 250k LOC that are not covered by the component subdivisions, so I'm not sure where they are coming from.

There are too many issues to handle all at once, but hopefully with some chipping away at the more serious issues and/or eliminating the false positives will make it a manageable number. It is totally fine to fix multiple issues of the same type in one patch, or multiple issues in the same file, as long as the patch doesn't get too large. If there are a lot of issues being fixed, it might make sense to make new tracking tickets for each release (e.g. "coverity issues fixed in 2.16.0" or similar) so they can be summarized more easily.

Comment by Tim Day [ 31/Aug/23 ]

Thanks for organizing the tickets and CC'ing people. I'd been meaning to gauge interest in Coverity, since it seems to have a pretty good hit-rate. Always great to have more interest in this stuff.

Someone familiar with ldiskfs should look at the ldiskfs warnings, since I rarely work with it and probably won't submit any patches for it.

As for false positives, I need to make a model file. It explains to Coverity what certain functions do i.e. panic, free memory, etc. OpenZFS has an example I could look at for inspiration. That should work better than littering 100s of annotations in the code.

For the uncovered LoC, some of the LNDs don't get compiled on my setup. I need to sort that out. snmp support isn't compiled either. But snmp for Lustre should probably be formally deprecated anyway, so people don't use it thinking it's actually supported. I could probably track down the rest of the LoC.

Ideally, if we run enough static analysis tools over a consistent period of time, the amount of effort to keep things in good shape will decrease a lot over time.

Comment by Patrick Farrell [ 31/Aug/23 ]

In theory, you should be able to compile everything except gnilnd, which is for Cray's previous generation Aries/Gemini networks. (I mean, you might be able to get the necessary headers, but it's likely not worth the trouble for an LND that's just going to get maintenance fixes).  o2iblnd and socklnd can compile against the kernel, and while I've never tried, kfilnd should be compilable with freely available code.  hornc would be able to help there I'm sure.

RE: snmp...  I have literally never noticed that directory in 10 years of working on Lustre.  Wow.  That can, I suspect, be removed.  The last change to that that wasn't a general tree cleanup or build fix was in 2012.

Comment by Gerrit Updater [ 31/Aug/23 ]

"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/51793/
Subject: LU-17000 misc: remove Coverity annotations
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 05b289450b21f67f3cc0e7c9f91b63cf9c43d177

Comment by Gerrit Updater [ 31/Aug/23 ]

"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/51846/
Subject: LU-17000 lnet: remove redundant errno check in liblnetconfig.c
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 1db59b7b603a917d4ab1bba98d94dd169475b86b

Comment by Arshad Hussain [ 31/Aug/23 ]

Andreas, Thanks for this ticket. I really wanted to dabble with Coverity (Seeing Tim's) patches. I heard of Coverity, however never used it. It definitely looks like a good time for me to get started with this. Thanks

Comment by Gerrit Updater [ 31/Aug/23 ]

"Andreas Dilger <adilger@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/52210
Subject: LU-17000 ptlrpc: fix string overflow warnings
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 44dafe2a1db7edeebaa60e39462faeda44b1b8ee

Comment by Gerrit Updater [ 01/Sep/23 ]

"Arshad Hussain <arshad.hussain@aeoncomputing.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/52216
Subject: LU-17000 misc: Fix Unused Value error(0)
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: b24e230841317ae00de4abfe2f681b06bfe7a0c6

Comment by Gerrit Updater [ 01/Sep/23 ]

"Arshad Hussain <arshad.hussain@aeoncomputing.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/52218
Subject: LU-17000 utils: Fix Resourse leak under mount_utils.c
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 82c7c1a6c4ec0afa3feae4607596146c17f9e5de

Comment by Gerrit Updater [ 05/Sep/23 ]

"Arshad Hussain <arshad.hussain@aeoncomputing.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/52272
Subject: LU-17000 coverity: Fix Resource Leak(0)
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 656dc4db91a03ea306d86d2a5fec4cd2c313d9ec

Comment by Gerrit Updater [ 06/Sep/23 ]

"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/51876/
Subject: LU-17000 lnet: fix various bugs in lib-move.c
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: bc61c12aa1a70c4ae8f279e86ad71b80ba9b9988

Comment by Gerrit Updater [ 13/Sep/23 ]

"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/52210/
Subject: LU-17000 ptlrpc: fix string overflow warnings
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: ff62700fa8ee717a71de13baec25f0d69640ae7c

Comment by Gerrit Updater [ 13/Sep/23 ]

"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/52218/
Subject: LU-17000 utils: Fix Resourse leak under mount_utils.c
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: dc05d7a89e0040e7b4d22d149c2f1451b2520830

Comment by Gerrit Updater [ 15/Sep/23 ]

"Arshad Hussain <arshad.hussain@aeoncomputing.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/52384
Subject: LU-17000 coverity: Fix Resource Leak(1)
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: caa61c69b6453667ef3f84331a068cbd5b231361

Comment by Arshad Hussain [ 18/Sep/23 ]

I have a question. For Coverity False Positive, is it expected to add coverity annotation in code and push the patch. Or just marking that Coverity ID as false positive under "scan coverity" webpage/dashboard be sufficient?

Comment by Tim Day [ 19/Sep/23 ]

I need to make a Coverity model file. A model file explains special macros and functions to Coverity. That should reduce the number of false positives we see and make the analysis more robust. I'm hoping that eliminates the need to have annotations in the code.

Comment by Arshad Hussain [ 19/Sep/23 ]

Yes. Model file is another way to supress false positives. Thanks

Comment by Gerrit Updater [ 28/Sep/23 ]

"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/52272/
Subject: LU-17000 coverity: Fix Resource Leak(0)
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: a283c7600e79c84404c8a9dcfcdc05a7d6d17fdb

Comment by Gerrit Updater [ 28/Sep/23 ]

"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/52384/
Subject: LU-17000 coverity: Fix Resource Leak(1)
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 4fc998320b51b1730326df5db470b2ca9c1da7c9

Comment by Gerrit Updater [ 06/Oct/23 ]

"Arshad Hussain <arshad.hussain@aeoncomputing.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/52583
Subject: LU-17000 coverity: Add check for -n option
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: a164987941def49442d2f73da1e6c7d1105bba61

Comment by Gerrit Updater [ 12/Oct/23 ]

"Arshad Hussain <arshad.hussain@aeoncomputing.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/52656
Subject: LU-17000 coverity: Fix leak under mgc_request.c
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 777e33b43d62fc72ba717f3530bbe9ec2c29411d

Comment by Gerrit Updater [ 12/Oct/23 ]

"Arshad Hussain <arshad.hussain@aeoncomputing.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/52658
Subject: LU-17000 coverity: Fix use before null under pcc.c
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 0abc6531f1445d6a762ac6b4c7c525df1acfbb84

Comment by Gerrit Updater [ 12/Oct/23 ]

"Arshad Hussain <arshad.hussain@aeoncomputing.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/52660
Subject: LU-17000 coverity: Fix 'Extra argument' under lst.c
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: d03e01290b4460ae39e3e7ce666b128e8a6d25e0

Comment by Gerrit Updater [ 13/Oct/23 ]

"Arshad Hussain <arshad.hussain@aeoncomputing.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/52686
Subject: LU-17000 coverity: Fix Resource Leak(2)
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 51710b9d1e30a2e912e13b7a58811248297e86d4

Comment by Gerrit Updater [ 25/Oct/23 ]

"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/52216/
Subject: LU-17000 misc: Fix Unused Value error(0)
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 5a0f59d05147ee32e10d8db606c6da17d4099721

Comment by Gerrit Updater [ 25/Oct/23 ]

"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/52583/
Subject: LU-17000 coverity: llverfs: Add check for -n option
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 5eaa7e8905c1d98373acf6e4db729fe7f6e6fa3d

Comment by Gerrit Updater [ 25/Oct/23 ]

"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/52658/
Subject: LU-17000 coverity: Fix use before null under pcc.c
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: f46d3e6f529b7501eff884e41d47bc2a5ed1650d

Comment by Gerrit Updater [ 25/Oct/23 ]

"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/52660/
Subject: LU-17000 coverity: Fix 'Extra argument' under lst.c
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: b074da4d4b4f261b050e11fd3f2e6df522db9c1f

Comment by Andreas Dilger [ 30/Oct/23 ]

Tim, can you please edit the ticket Description (or provide a few words here and I can edit it) on how the patches that address Coverity bugs should be tagged, so that this is done consistently. It would also be good to edit the Commit Message wiki page to add the same info.

Your patches used:

Addresses-Coverity: NNNNNN ("issue type")

though I think "Addresses" is implicit anyway for a bug fix (certainly we wouldn't ave an ID for creating an issue in Coverity), so IMHO it could be:

CoverityID: NNNNNN ("issue type"): filename

as Arshad has been using?

Would it be better to have the actual URL of the Coverity issue (which will also include the ID number)? That would make it easier to jump to the page that describes the issue to seethe background of why Coverity thinks this is a bug.

The pages themselves are currently not public, but I think it is reasonably to give access to any Lustre developer who asks. I think it is better to avoid making the pages totally public to make it harder to expose zero-day vulnerabilities in the code, since we do not have a dedicated team that can address all of the Coverity issues quickly (thanks to you and Arshad that these are being worked on at all).

It might make sense to include a sentence on how to request Coverity access, if that isn't already obvious once you get to the page itself.

Comment by Andreas Dilger [ 30/Oct/23 ]

timday, can you also provide a brief overview on what needs to be done to update the build stats for the Lustre Coverity build. I was looking at the site and see that it hasn't been updated since Sept 10, but patches for at least 20 Coverity issues have landed since then (just doing a grep for "Coverity|CID".

Comment by Andreas Dilger [ 30/Oct/23 ]

Looking at the upstream kernel commits, the majority of patches that reference Coverity are using "Addresses-Coverity-ID:" (62 in past 2 years vs. 25 using "Addresses-Coverity:", and 19 using "CID" in some form though often in conjunction with one of the other forms as well).

Comment by Tim Day [ 30/Oct/23 ]

The commit message needs at least "Coverity" and the ID number. Beyond that, no strong preference. Links would be nice, but I think they get very long and ugly - so not practical. The style I used (as you already saw) I copied from kernel commits. I can update the ticket and commit message wiki.

CoverityID: NNNNNN ("issue type")

I think works well enough. The filename can be seen already by looking at the commit itself.

I updated the Coverity build Oct. 6th. I try (and fail) to update it once at every landing. You need to download the Coverity build tool and run `cov-build --dir cov-int make` instead of a regular `make` then upload a tarball containing the newly created `cov-int` directory. Detailed instructions are on the Coverity site. It ought to be automated. But until then, I'll probably manually run it myself.

Comment by Gerrit Updater [ 31/Oct/23 ]

"Arshad Hussain <arshad.hussain@aeoncomputing.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/52901
Subject: LU-17000 coverity: Fix Dereference after null under client.c
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 322c37830ba4d5ddb6946d1b4a92b5bb06147053

Comment by Gerrit Updater [ 31/Oct/23 ]

"Arshad Hussain <arshad.hussain@aeoncomputing.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/52902
Subject: LU-17000 coverity: Fix Resource Leak(3)
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: d64a7cca2fa3b28c1b5880a8bd4e69c9fc3fc8dc

Comment by Gerrit Updater [ 31/Oct/23 ]

"Arshad Hussain <arshad.hussain@aeoncomputing.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/52903
Subject: LU-17000 coverity: Fix Dereference before null under obd_sysfs.c
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: ba262f1f670415b55f0fc29363cac3839c504c24

Comment by Gerrit Updater [ 01/Nov/23 ]

"Arshad Hussain <arshad.hussain@aeoncomputing.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/52920
Subject: LU-17000 coverity: Fix Out-of-bounds access under svcgssd_proc.c
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 4345c3f84134ba5ff5188f13696137e9e7dce4d1

Comment by Gerrit Updater [ 01/Nov/23 ]

"Arshad Hussain <arshad.hussain@aeoncomputing.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/52921
Subject: LU-17000 coverity: Fix Logically dead code under lnetctl.c
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: ab85aa269f96befa338e29ff7b58f66ed183eaf4

Comment by Gerrit Updater [ 02/Nov/23 ]

"Arshad Hussain <arshad.hussain@aeoncomputing.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/52950
Subject: LU-17000 coverity: Fix Logically dead code under liblnetconfig.c
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: db130c1529a773b3879cfbb206d0f69faeaa6c3d

Comment by Gerrit Updater [ 03/Nov/23 ]

"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/52656/
Subject: LU-17000 coverity: Fix leak under mgc_request.c
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 5b88c865b994b84060ffb5eaada5e9777ddaf675

Comment by Gerrit Updater [ 03/Nov/23 ]

"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/52686/
Subject: LU-17000 coverity: Fix Resource Leak(2)
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 3c36158566061a515a2730b9a64a607b73eae02e

Comment by Gerrit Updater [ 08/Nov/23 ]

"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/52901/
Subject: LU-17000 coverity: Fix Dereference after null under client.c
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: ee56161ea02cf7c58a4e4d4e080156b4dbcc5950

Comment by Gerrit Updater [ 08/Nov/23 ]

"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/52950/
Subject: LU-17000 coverity: Fix Logically dead code under liblnetconfig.c
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 982eca73a960131b4a12e528419e09a1fac90b30

Comment by Gerrit Updater [ 18/Nov/23 ]

"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/52902/
Subject: LU-17000 coverity: Fix Resource Leak(3)
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 6aea76b719738405ce59aecbae5d68bde990978a

Comment by Gerrit Updater [ 18/Nov/23 ]

"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/52903/
Subject: LU-17000 coverity: Fix Dereference before null under obd_sysfs.c
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 6e0652b3e58e14960bdcab0065024ec24b27b813

Comment by Gerrit Updater [ 18/Nov/23 ]

"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/52921/
Subject: LU-17000 coverity: Fix Logically dead code under lnetctl.c
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 4d95238de1b9021afaaf337ca60e3335e99881a6

Comment by Gerrit Updater [ 20/Nov/23 ]

"Arshad Hussain <arshad.hussain@aeoncomputing.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/53182
Subject: LU-17000 coverity: Fix Resource Leak(4)
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 3f2c8a8b1fdbd158b81ce5e581101055b655411c

Comment by Gerrit Updater [ 01/Dec/23 ]

"Arshad Hussain <arshad.hussain@aeoncomputing.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/53305
Subject: LU-17000 lnet: Fix dereference after NULL under ksocknal_recv_hello
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: f8c6ace9ffa95fbcd9b5c2bed4d631b161433220

Comment by Gerrit Updater [ 05/Dec/23 ]

"Arshad Hussain <arshad.hussain@aeoncomputing.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/53327
Subject: LU-17000 quota: check before using qbody under qsd_calc_adjust
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 58273bcfd59e7fedbf6f453835e7e195396f4d27

Comment by Gerrit Updater [ 05/Dec/23 ]

"Arshad Hussain <arshad.hussain@aeoncomputing.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/53331
Subject: LU-17000 utils: Check return value of yaml_parser_initialize
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: cee8ce55fdaafe426c8c244b35127f29299578f3

Comment by Gerrit Updater [ 10/Dec/23 ]

"Timothy Day <timday@amazon.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/53400
Subject: LU-17000 contrib: script to prepare coverity builds
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 9a26b8b9b39e8afe27cdf97381b28ea81e686c06

Comment by Gerrit Updater [ 13/Dec/23 ]

"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/52920/
Subject: LU-17000 gss: Fix Out-of-bounds access under svcgssd_proc.c
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 7d764f1f11be144ad26e33aa8cecedc5bb708793

Comment by Arshad Hussain [ 17/Dec/23 ]

Andreas, Tim - I see this happening from sometime. That is, I cannot assign any CID to myself. I login into web dashboard and If I select a CID and on the left panel try to populate the "owner" as myself I cannot seem to do it. The cursor keeps spinning and nothing happens. I am certain that I am logged in and session has not timed out. I am not sure what is happening. Are you also facing the same thing as I am? I am wondering how this could be solved. 

Comment by Andreas Dilger [ 17/Dec/23 ]

I've only assigned a few issues to myself and never had a problem, so I can't say if this is happening often.

Comment by Arshad Hussain [ 18/Dec/23 ]

This is something which is recently started to happen. It was working fine in the past. Could you please Assign CID: 397828 to me. I first wanted to rule out if this is something with I am only affected. Maybe you could drop me from members and re-add back, this could work. I am not sure if anyting could be done from my end.

Comment by Gerrit Updater [ 20/Dec/23 ]

"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/53182/
Subject: LU-17000 utils: fix leak in 'lfs find' error handling
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: a7c4b5916f9feac9b8900dd4aafb885439465ad9

Comment by Gerrit Updater [ 20/Dec/23 ]

"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/53305/
Subject: LU-17000 lnet: Fix dereference after NULL under ksocknal_recv_hello
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: c5685cc9a61e8cffdbb7e3e2a17a9b0bcf4a8a9b

Comment by Gerrit Updater [ 20/Dec/23 ]

"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/53331/
Subject: LU-17000 utils: Check return value of yaml_parser_initialize
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: edccd46eba01748a5f57b32f5917f730985585b2

Comment by Gerrit Updater [ 08/Jan/24 ]

"Arshad Hussain <arshad.hussain@aeoncomputing.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/53608
Subject: LU-17000 lnet: Add Coverity annotatin to mark false failure
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: e7caeb929576f7d9b70ad90b37f0f9557399a251

Comment by Gerrit Updater [ 08/Jan/24 ]

"Arshad Hussain <arshad.hussain@aeoncomputing.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/53609
Subject: LU-17000 lnet: Call ns_status when holding lock
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 442e530aecd873e4fa7ce9d58b4e166af933fedc

Comment by Arshad Hussain [ 08/Jan/24 ]

Andreas/Tim -  Please check CID 412758 and 412759 and let me know your thoughts  (https://review.whamcloud.com/c/fs/lustre-release/+/53608) I have added a coverity annotation. The advantage of this would be that false failures would be taged with comments for all to read. On the other hand it might get little noisy.  My own perferance would be wihin code. so all reviewers could see why this is being tagged as false failure.

Comment by Tim Day [ 10/Jan/24 ]

I wouldn't be surprised if the Coverity site had a bug. But I've never personally experienced problems with assigning CIDs. You could try clearing browser cache. That might help.

 

As for CID 412758 and 412759, I left some comments in the patch. I'm not a fan of the Coverity annotation comments. Lustre used to have quite a few of them. But they didn't seem to actually impact the false positive rate of the scans. I removed them all and nothing changed. I think we should try using a model file first if we can (it's much easier to test and doesn't produce as much clutter in the code). I've been meaning to write one, but haven't found the time.

Comment by Arshad Hussain [ 11/Jan/24 ]

I wouldn't be surprised if the Coverity site had a bug. But I've never personally experienced problems with assigning CIDs. You could try clearing browser cache. That might help.

I did try that. Did not work. It looks like I can atleast mark bug/CID as "fix submitted"/ False failure consistetly. So, this should be enough for me.

As for CID 412758 and 412759, I left some comments in the patch. I'm not a fan of the Coverity annotation comments. Lustre used to have quite a few of them. But they didn't seem to actually impact the false positive rate of the scans. I removed them all and nothing changed. I think we should try using a model file first if we can (it's much easier to test and doesn't produce as much clutter in the code). I've been meaning to write one, but haven't found the time.

Thanks for the feedback. Understood on this. (Apologies for not getting around quicker, Was in other work)

Comment by Arshad Hussain [ 12/Jan/24 ]

Tim, The Fixed number do not look correct (From the coverity Dashboard).

2,603                    874                    21                   1,708
Total defects    Outstanding    Dismissed    Fixed

Comment by Gerrit Updater [ 16/Jan/24 ]

"Arshad Hussain <arshad.hussain@aeoncomputing.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/53686
Subject: LU-17000 utils: Fix check after return from fopen()
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 583e839d0951ed3276733df8b14fea117cc6de03

Comment by Gerrit Updater [ 17/Jan/24 ]

"Arshad Hussain <arshad.hussain@aeoncomputing.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/53693
Subject: LU-17000 utils: Add check after calling sysconf(_SC_PAGESIZE)
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 5ef910ae0d9a717fac3243d1649d9ff2212553a0

Comment by Gerrit Updater [ 19/Jan/24 ]

"Arshad Hussain <arshad.hussain@aeoncomputing.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/53742
Subject: LU-17000 utils: Remove check for errno != 0
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 34d9c13f4cc8b610583cbc7c69dcd4e1edf68669

Comment by Tim Day [ 20/Jan/24 ]

The large number of 'Fixed' defects came from a bug in a newer version of the Coverity build tool (a compiler wrapper needed to submit builds). I've reverted to using an older version for now. Unfortunately, we're stuck with all of the false positives showing up as 'Fixed' on the site.

Comment by Arshad Hussain [ 22/Jan/24 ]

The large number of 'Fixed' defects came from a bug in a newer version of the Coverity build tool (a compiler wrapper needed to submit builds). I've reverted to using an older version for now. Unfortunately, we're stuck with all of the false positives showing up as 'Fixed' on the site.

Got it and Thanks for looking into this.

Comment by Gerrit Updater [ 22/Jan/24 ]

"Arshad Hussain <arshad.hussain@aeoncomputing.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/53758
Subject: LU-17000 utils: In mydaemon() check after calling open()
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: aacaf3df00d496568c028d4a6798d34a569211d4

Comment by Gerrit Updater [ 24/Jan/24 ]

"Arshad Hussain <arshad.hussain@aeoncomputing.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/53796
Subject: LU-17000 utils: Fix negative argument passed
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: c06b086a2087c5c5b442ae7b2ffe859ab3902d18

Comment by Gerrit Updater [ 04/Feb/24 ]

"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/53400/
Subject: LU-17000 contrib: script to prepare coverity builds
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 4722b8cec099064f6e5e808410efe7f8d082b450

Comment by Gerrit Updater [ 04/Feb/24 ]

"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/53608/
Subject: LU-17000 lnet: don't assign unused return codes
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 6826fe0efefc03e22ad723104866b15b59fa68ed

Comment by Gerrit Updater [ 04/Feb/24 ]

"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/53686/
Subject: LU-17000 utils: Fix check after return from fopen()
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 966c6bc7a2514737c04b579cdb4a985c99ae6658

Comment by Gerrit Updater [ 04/Feb/24 ]

"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/53693/
Subject: LU-17000 utils: Add check after calling sysconf(_SC_PAGESIZE)
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: b02a9bc1bf1af07cf7784f7f19ce10dc55b7bedb

Comment by Gerrit Updater [ 04/Feb/24 ]

"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/53742/
Subject: LU-17000 utils: Remove check for errno != 0
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 04d95ff28d1ddca79c204ceff7cd5d6ddfe83c34

Comment by Gerrit Updater [ 04/Feb/24 ]

"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/53758/
Subject: LU-17000 utils: In mydaemon() check after calling open()
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 0f67ab9b00c3949f257cd4e6081184858f245b4e

Comment by Gerrit Updater [ 06/Feb/24 ]

"Arshad Hussain <arshad.hussain@aeoncomputing.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/53936
Subject: LU-17000 utils: Use ssize_t to store return from sysconf()
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 7ab2dbf958c079e861da31ff24a32f95df89ec3a

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