[LU-17413] ll_merge_md_attr()) ASSERTION( lli->lli_lsm_obj != ((void *)0) ) Created: 10/Jan/24  Updated: 10/Jan/24

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

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

Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

I hit this often with racer:

[  794.138129] LustreError: 74995:0:(file.c:5471:ll_merge_md_attr()) ASSERTION( lli->lli_lsm_obj != ((void *)0) ) failed: 
[  794.154747] LustreError: 74995:0:(file.c:5471:ll_merge_md_attr()) LBUG
[  794.154868] Pid: 74995, comm: ls 4.18.0 #4 SMP Fri Dec 22 11:13:58 UTC 2023
[  794.154977] Call Trace TBD:
[  794.155035] [<0>] libcfs_call_trace+0x5e/0x80 [libcfs]
[  794.155143] [<0>] lbug_with_loc+0x3a/0x70 [libcfs]
[  794.155344] [<0>] ll_getattr_dentry+0xaf4/0xb20 [lustre]
[  794.155495] [<0>] vfs_statx_fd+0x3f/0x80
[  794.155569] [<0>] __se_sys_newfstat+0x1a/0x40
[  794.155664] [<0>] do_syscall_64+0x4b/0x1b0
[  794.155738] [<0>] entry_SYSCALL_64_after_hwframe+0x49/0xbe
[  794.155833] Kernel panic - not syncing: LBUG

looks like a race:

        if (!ll_dir_striped(inode))
                RETURN(0);

        down_read(&lli->lli_lsm_sem);
        LASSERT(lli->lli_lsm_obj != NULL);

where a new striping can apply right after if (!ll_dir_striped(inode))



 Comments   
Comment by Gerrit Updater [ 10/Jan/24 ]

"Alex Zhuravlev <bzzz@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/53639
Subject: LU-17413 llite: protect check in ll_merge_md_attr()
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: e98d662f119432704c8bd5c553d1fa230b0b7e84

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