[LU-15902] osd_ea_lookup_rec()) ASSERTION( dir->i_op->lookup != ((void *)0) ) Created: 30/May/22  Updated: 05/Jun/23  Resolved: 18/Jul/22

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: None
Fix Version/s: Lustre 2.16.0

Type: Bug Priority: Minor
Reporter: Lai Siyao Assignee: Lai Siyao
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Related
Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

FID may be reused after LFSCK, then a directory may become a regular file, and dt_lookup() on this object will crash because .do_lookup is NULL for regular file:

[34514.623550] LustreError: 22328:0:(osd_handler.c:5977:osd_ea_lookup_rec()) ASSERTION( dir->i_op->lookup != ((void *)0) ) failed: 
[34514.623552] LustreError: 22328:0:(osd_handler.c:5977:osd_ea_lookup_rec()) LBUG
[34514.623554] Pid: 22328, comm: ll_ost_out04_00 3.10.0-1160.49.1.el7_lustre.ddn16.x86_64 #1 SMP Mon Dec 20 11:42:01 PST 2021
[34514.623554] Call Trace:
[34514.623609] [<0>] libcfs_call_trace+0x90/0xf0 [libcfs]
[34514.623617] [<0>] lbug_with_loc+0x4c/0xa0 [libcfs]
[34514.623656] [<0>] osd_index_ea_lookup+0xc65/0xf70 [osd_ldiskfs]
[34514.623878] [<0>] out_index_lookup+0x4be/0x710 [ptlrpc]
[34514.623938] [<0>] out_handle+0x15ae/0x1c00 [ptlrpc]
[34514.623995] [<0>] tgt_request_handle+0xaee/0x15f0 [ptlrpc]
[34514.624054] [<0>] ptlrpc_server_handle_request+0x24b/0xab0 [ptlrpc]
[34514.624095] [<0>] ptlrpc_main+0xb34/0x1470 [ptlrpc]
[34514.624101] [<0>] kthread+0xd1/0xe0
[34514.624105] [<0>] ret_from_fork_nospec_begin+0x7/0x21
[34514.624238] [<0>] 0xfffffffffffffffe
[34514.624239] Kernel panic - not syncing: LBUG


 Comments   
Comment by Gerrit Updater [ 30/May/22 ]

"Lai Siyao <lai.siyao@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/47483
Subject: LU-15902 obdclass: dt_try_as_dir() check dir exists
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: fdfd60287b82872f54f03d5ba4820b779933a7f8

Comment by Gerrit Updater [ 18/Jul/22 ]

"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/47483/
Subject: LU-15902 obdclass: dt_try_as_dir() check dir exists
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 1ebc9ed460922e6fcf2432f70f2f6412974e963a

Comment by Peter Jones [ 18/Jul/22 ]

Landed for 2.16

Comment by Gerrit Updater [ 05/Jun/23 ]

"Etienne AUJAMES <eaujames@ddn.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/51222
Subject: LU-15902 obdclass: dt_try_as_dir() check dir exists
Project: fs/lustre-release
Branch: b2_15
Current Patch Set: 1
Commit: ad56291b373d6df2fd413b0e1da9effec1fdc339

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