Bug #66313
closedmgr/vol: subvolume metadata is incorrectly properly when clones finish running
0%
Description
When multiple ongoing clones are finishing close to each other1, subvolume's metadata file is not properly updated due to race condition between these cloner threads to update the subvolume metadata file. Due to this race, update made by one of cloner threads is lost because one of the cloner other threads ends up over-writing, without waiting to read after the previous thread has finished writing. Adding a lock to subvolume should sort this issue.
During testing 7 clones were launched and only 4 clones were allowed to run at time, rest were in pending state. Subvolume's snapshot contained 3 files, each of 1 GB. After cloning finished, subvolume deletion would fail because detach_snapshot() would fail which in turn happened because _remove_snap_clone would fail since removing clone snaps section from subvolmetadata file was not allowed since it wasn't empty. A clone UUID from one of the cloner thread was found in the subvolume's metadata file. Once lockless=False was added to method that opened subvolume, this issue was fixed. Initially, this issue would come up once in 2-3 runs but then it never did. Fixed was added PR 54620 some time ago since the issue was caught in tests added on this PR.
RD Updated by Rishabh Dave over 2 years ago
- Subject changed from mgr/vol: subvolume metadata is not updated when clones finish running to mgr/vol: subvolume metadata is not updated properly when clones finish running
RD Updated by Rishabh Dave over 2 years ago
- Subject changed from mgr/vol: subvolume metadata is not updated properly when clones finish running to mgr/vol: subvolume metadata is incorrectly properly when clones finish running
RD Updated by Rishabh Dave over 2 years ago
- Status changed from Fix Under Review to Closed
VS Updated by Venky Shankar over 2 years ago
- Status changed from Closed to Rejected
Rejected is the correct status since this ins't a bug.