[LU-5414] mdt_getattr() may call mdt_fix_reply() without packing reply Created: 24/Jul/14  Updated: 09/Jun/15  Resolved: 27/Apr/15

Status: Closed
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.6.0, Lustre 2.7.0
Fix Version/s: Lustre 2.7.0

Type: Bug Priority: Minor
Reporter: John Hammond Assignee: John Hammond
Resolution: Fixed Votes: 0
Labels: fault, mdt

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

 Description   

In mdt_getattr() if mdt_attr_get_eabuf_size() fails then the reply will not have been packed and we will LBUG in mdt_fix_reply().

[   69.676992] LustreError: 12155:0:(layout.c:2012:__req_capsule_get()) ASSERTION( msg != ((void *)0) ) failed: 
[   69.678763] LustreError: 12155:0:(layout.c:2012:__req_capsule_get()) LBUG
[   69.680022] Pid: 12155, comm: mdt01_009
[   69.680711] 
[   69.680712] Call Trace:
[   69.681447]  [<ffffffffa02be8c5>] libcfs_debug_dumpstack+0x55/0x80 [libcfs]
[   69.682686]  [<ffffffffa02beec7>] lbug_with_loc+0x47/0xb0 [libcfs]
[   69.683841]  [<ffffffffa06b6cd5>] __req_capsule_get+0x5e5/0x6e0 [ptlrpc]
[   69.685019]  [<ffffffff810a47e3>] ? up_read+0x23/0x40
[   69.685929]  [<ffffffffa0afb60b>] ? osd_object_read_unlock+0x8b/0xd0 [osd_ldiskfs]
[   69.687267]  [<ffffffffa06b6ed8>] req_capsule_server_get+0x18/0x20 [ptlrpc]
[   69.688466]  [<ffffffffa0c41ec1>] mdt_fix_reply+0x41/0x660 [mdt]
[   69.689535]  [<ffffffffa0c40338>] mdt_getattr+0x2a8/0x890 [mdt]
[   69.690599]  [<ffffffffa06f03e5>] tgt_request_handle+0x245/0xad0 [ptlrpc]
[   69.691812]  [<ffffffffa06a0e01>] ptlrpc_main+0xce1/0x1960 [ptlrpc]
[   69.692929]  [<ffffffffa06a0120>] ? ptlrpc_main+0x0/0x1960 [ptlrpc]
[   69.694021]  [<ffffffff8109eab6>] kthread+0x96/0xa0
[   69.694881]  [<ffffffff8100c30a>] child_rip+0xa/0x20
[   69.695753]  [<ffffffff81554710>] ? _spin_unlock_irq+0x30/0x40
[   69.696755]  [<ffffffff8100bb10>] ? restore_args+0x0/0x30
[   69.697691]  [<ffffffff8109ea20>] ? kthread+0x0/0xa0
[   69.698544]  [<ffffffff8100c300>] ? child_rip+0x0/0x20
[   69.699438] 

This issue was found through DT API fault injection.



 Comments   
Comment by John Hammond [ 28/Jul/14 ]

Please see http://review.whamcloud.com/11247.

Comment by John Hammond [ 11/Aug/14 ]

Patch landed to master.

Comment by Jodi Levi (Inactive) [ 20/Aug/14 ]

Reopening to add label

Generated at Sat Feb 10 01:51:17 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.