[LU-15832] race between dt_try_as_dir() and lod_striping_free_nolock() Created: 09/May/22 Updated: 22/Jun/22 Resolved: 05/Jun/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: |
|
||||
| Severity: | 3 | ||||
| Rank (Obsolete): | 9223372036854775807 | ||||
| Description |
|
In lod_striping_free_nolock(), if object is directory, its striping is freed, but .ldo_index_ops is not cleared, if a subsequent dt_try_as_dir() is called on this object, the .ldo_index_ops will be called, while its striping is not initialized yet, which may cause crash. MDT0000 crashed with the following LBUG: LustreError: 18825:0:(mdt_xattr.c:421:mdt_dir_layout_shrink()) fs-MDT0000: [0x20002c3a3:0x47:0x0] migrate mdt index mismatch 0 != 4294967295 LustreError: 18825:0:(mdt_xattr.c:421:mdt_dir_layout_shrink()) fs-MDT0000: [0x20002c3a3:0x69:0x0] migrate mdt index mismatch 0 != 4294967295 LustreError: 18825:0:(mdt_xattr.c:421:mdt_dir_layout_shrink()) Skipped 26 previous similar messages LustreError: 18832:0:(mdt_xattr.c:421:mdt_dir_layout_shrink()) fs-MDT0000: [0x20002c3a3:0xb3:0x0] migrate mdt index mismatch 0 != 4294967295 LustreError: 18832:0:(mdt_xattr.c:421:mdt_dir_layout_shrink()) Skipped 47 previous similar messages LustreError: 18839:0:(mdd_dir.c:4521:mdd_migrate()) fs-MDD0000: 'chrne' migration was interrupted, run 'lfs migrate -m 0 -c 3 -H 2 j4675' to finish migration. LustreError: 18828:0:(lod_object.c:383:lod_striped_lookup()) ASSERTION( lo->ldo_dir_stripe_count > 0 ) failed: LustreError: 18828:0:(lod_object.c:383:lod_striped_lookup()) LBUG Kernel panic - not syncing: LBUG CPU: 5 PID: 18828 Comm: mdt01_007 3.10.0-1160.49.1.el7_lustre.x86_64 #1 Call Trace: dump_stack+0x19/0x1b panic+0xe8/0x21f lbug_with_loc+0x9b/0xa0 [libcfs] lod_striped_lookup+0x2ba/0x2f0 [lod] __mdd_lookup.isra.17+0x298/0x440 [mdd] mdd_lookup+0xaf/0x170 [mdd] mdt_getattr_name_lock+0x1353/0x21e0 [mdt] mdt_getattr_name+0xc4/0x2b0 [mdt] tgt_request_handle+0xaee/0x15f0 [ptlrpc] ptlrpc_server_handle_request+0x24b/0xab0 [ptlrpc] ptlrpc_main+0xb34/0x1470 [ptlrpc] kthread+0xd1/0xe0 |
| Comments |
| Comment by Gerrit Updater [ 09/May/22 ] |
|
"Lai Siyao <lai.siyao@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/47256 |
| Comment by Gerrit Updater [ 04/Jun/22 ] |
|
"Andreas Dilger <adilger@whamcloud.com>" merged in patch https://review.whamcloud.com/47256/ |
| Comment by Peter Jones [ 05/Jun/22 ] |
|
Landed for 2.16 |