-
Technical task
-
Resolution: Unresolved
-
Medium
-
None
-
None
-
None
-
3
-
9223372036854775807
There are these log messages on MDT0002 on mount time. Those only occur on the failed session:
lustre-MDT0000-osp-MDT0002: next log does not exist! top_trans_stop(): lustre-MDT0000-osp-MDT0002: write updates failed: rc = -5 mdt_trash_setup_thread(): lustre-MDT0002: Trash dir setup failed: rc = -5
And this is what Claude said:
- At mount, mdt_trash_setup_thread() creates .lustre/.ltrash/MDT0002. The directory object lives on MDT0002 but its name entry is on MDT0000, so the create spans two MDTs.
- The setup thread ran before the update log between MDT0002 and MDT0000 was ready, so the first attempt failed with -EIO. It still left a half-made object, [0x280000400:0x2:0x0].
- The thread retried and created a second object, [0x280000400:0x5:0x0], which succeeded without logging anything more.
- test_118z's cleanup runs a namespace LFSCK and fails on any repair. The MDT0002 debug log shows LFSCK finding both objects claiming the name MDT0002 under the trash dir [0x200000002:0x4:0x0]. It moved 0x2 to lost+found, which gives multiple_referenced_repaired: 1 and the "Expect no namespace repair, but got 1" error.
Verdict: the race is in existing trash-setup code that the patch doesn't touch (it doesn't change mdt_handler.c). 118z only reports it because its cleanup runs the first LFSCK after mount. Repeating the test in a custom session won't reproduce it, because the race happens once per mount, not once per test run.