[LU-7145] mdd_object_type() uses need audit Created: 11/Sep/15  Updated: 30/Mar/21

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

Type: Bug Priority: Minor
Reporter: John Hammond Assignee: WC Triage
Resolution: Unresolved Votes: 0
Labels: None

Issue Links:
Related
is related to LU-6963 racer test_1: lu_object_attr() ASSERT... Open
is related to LU-14457 racer test_1: crash with directory mi... Open
is related to LU-7617 replay-single test_70b hangs ASSERTIO... Resolved
Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

mdd_object_type() calls lu_object_attr() and hence it asserts that the object exists. We need to audit the callers to ensure that a non-existing object is not passed. For example in mdd_migrate_entries() we have:

                child = mdd_object_find(env, mdd, &ent->lde_fid);
                if (IS_ERR(child))
			GOTO(out, rc = PTR_ERR(child));

                mdd_write_lock(env, child, MOR_SRC_CHILD);
                is_dir = S_ISDIR(mdd_object_type(child));


 Comments   
Comment by John Hammond [ 07/Oct/15 ]

Running racer.sh with MDSCOUNT=4 on 2.6.71.

[  441.561094] LustreError: 8066:0:(lu_object.h:862:lu_object_attr()) ASSERTION( ((o)->lo_header->loh_attr & LOHA_EXISTS) != 0 ) failed: 
[  441.563294] LustreError: 8066:0:(lu_object.h:862:lu_object_attr()) LBUG
[  441.564427] Pid: 8066, comm: mdt01_006
[  441.565056] 
[  441.565057] Call Trace:
[  441.565813]  [<ffffffffa08ed8b5>] libcfs_debug_dumpstack+0x55/0x80 [libcfs]
[  441.567020]  [<ffffffffa08edeb7>] lbug_with_loc+0x47/0xb0 [libcfs]
[  441.568106]  [<ffffffffa12e0001>] mdd_is_parent+0x6c1/0x730 [mdd]
[  441.569126]  [<ffffffffa125d9d8>] ? osd_attr_get+0x128/0x170 [osd_ldiskfs]
[  441.570286]  [<ffffffffa12e2049>] mdd_is_subdir+0x1c9/0x270 [mdd]
[  441.571329]  [<ffffffffa1343fad>] mdt_is_subdir+0xcd/0x350 [mdt]
[  441.572359]  [<ffffffffa1345115>] mdt_reint_rename_internal+0xee5/0x1a30 [mdt]
[  441.573570]  [<ffffffffa08ffe2e>] ? cfs_hash_spin_unlock+0xe/0x10 [libcfs]
[  441.574739]  [<ffffffffa0a7f890>] ? lu_object_put+0x260/0x3b0 [obdclass]
[  441.575867]  [<ffffffffa1345e4e>] mdt_reint_rename_or_migrate+0x1ee/0x2710 [mdt]
[  441.577121]  [<ffffffffa0a964b9>] ? upcall_cache_get_entry+0x99/0x8a0 [obdclass]
[  441.578383]  [<ffffffff810c48be>] ? is_module_address+0xe/0x20
[  441.579376]  [<ffffffffa0a964b9>] ? upcall_cache_get_entry+0x99/0x8a0 [obdclass]
[  441.580605]  [<ffffffff8155639b>] ? _spin_unlock+0x2b/0x40
[  441.581557]  [<ffffffffa0a967e3>] ? upcall_cache_get_entry+0x3c3/0x8a0 [obdclass]
[  441.582814]  [<ffffffffa0a9b9b0>] ? lu_ucred+0x20/0x30 [obdclass]
[  441.583861]  [<ffffffffa1323255>] ? mdt_ucred+0x15/0x20 [mdt]
[  441.584835]  [<ffffffffa133c7dc>] ? mdt_root_squash+0x2c/0x3f0 [mdt]
[  441.585951]  [<ffffffffa0cca035>] ? __req_capsule_get+0x165/0x6f0 [ptlrpc]
[  441.587090]  [<ffffffff812aa88a>] ? strlcpy+0x4a/0x60
[  441.587949]  [<ffffffffa13483a3>] mdt_reint_rename+0x13/0x20 [mdt]
[  441.588984]  [<ffffffffa134092d>] mdt_reint_rec+0x5d/0x200 [mdt]
[  441.590017]  [<ffffffffa1329c83>] mdt_reint_internal+0x633/0xa50 [mdt]
[  441.591140]  [<ffffffffa132a53b>] mdt_reint+0x6b/0x120 [mdt]
[  441.592168]  [<ffffffffa0d0954f>] tgt_request_handle+0x8cf/0x1300 [ptlrpc]
[  441.593396]  [<ffffffffa0cb3c4a>] ptlrpc_main+0xdaa/0x18b0 [ptlrpc]
[  441.594510]  [<ffffffffa0cb2ea0>] ? ptlrpc_main+0x0/0x18b0 [ptlrpc]
[  441.595558]  [<ffffffff8109e856>] kthread+0x96/0xa0
[  441.596388]  [<ffffffff8100c30a>] child_rip+0xa/0x20
[  441.597220]  [<ffffffff815562e0>] ? _spin_unlock_irq+0x30/0x40
[  441.598204]  [<ffffffff8100bb10>] ? restore_args+0x0/0x30
[  441.599115]  [<ffffffff8109e7c0>] ? kthread+0x0/0xa0
[  441.599966]  [<ffffffff8100c300>] ? child_rip+0x0/0x20
[  441.600848] 
Generated at Sat Feb 10 02:06:23 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.