[LU-17203] false assertion in cfs_hash_for_each_empty() Created: 17/Oct/23  Updated: 23/Dec/23

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

Type: Bug Priority: Minor
Reporter: Alex Zhuravlev Assignee: WC Triage
Resolution: Unresolved Votes: 0
Labels: None

Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

this assertion in cfs_hash_for_each_empty():

LASSERT(atomic_read(&hs->hs_count) == 0);

is not correct - a lock can be in a process on enqueueing so can't be released right away.
here is an evidence:

00010000:00020000:1.0:1697224811.088493:0:31361:0:(ldlm_lockd.c:1479:ldlm_handle_enqueue()) ### lock on destroyed export 00000000fc58c50a ns: mdt-lustre-MDT0001_UUID lock: 0000000088760baf/0x8b83035ffb756f74 lrc: 3/0,0 mode: PR/PR res: [0x240000bd0:0x7f:0x0].0x0 bits 0x1b/0x0 rrc: 2 type: IBT gid 0 flags: 0x50200000000000 nid: 0@lo remote: 0x8b83035ffb756f58 expref: 6 pid: 31361 timeout: 0 lvb_type: 0
00000001:00000001:0.0:1697224811.091533:0:7065:0:(hash.c:1714:cfs_hash_for_each_nolock()) Process leaving (rc=0 : 0 : 0)
00010000:00000001:0.0:1697224811.091536:0:7065:0:(ldlm_lock.c:2473:ldlm_reprocess_recovery_done()) Process leaving
00010000:00020000:0.0:1697224811.091537:0:7065:0:(ldlm_lock.c:2748:ldlm_export_cancel_locks()) Export 00000000fc58c50a, canceled 51 locks, left on hash table 1.
...

I think we can just put the export on the stale list again via obd_stale_export_put()



 Comments   
Comment by Gerrit Updater [ 17/Oct/23 ]

"Alex Zhuravlev <bzzz@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/52726
Subject: LU-17203 libcfs: ignore remaining items
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 73903d3bb5bb9859e1e323e44083979bfe0ff461

Comment by Gerrit Updater [ 08/Nov/23 ]

"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/52726/
Subject: LU-17203 libcfs: ignore remaining items
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: f2f8b6deaf54f1a264b31b44f6cf875fa1629ab2

Comment by Gerrit Updater [ 23/Dec/23 ]

"Andreas Dilger <adilger@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/53541
Subject: LU-17203 libcfs: ignore remaining items
Project: fs/lustre-release
Branch: b2_15
Current Patch Set: 1
Commit: 7a7527a2c111e11e9d8c11d3396512a9868145fb

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