[LU-11330] replay-single test_70d: Directory not empty rmdir fails Created: 03/Sep/18  Updated: 26/Aug/19  Resolved: 27/Feb/19

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.12.0
Fix Version/s: Lustre 2.13.0, Lustre 2.12.1

Type: Bug Priority: Major
Reporter: Maloo Assignee: Alex Zhuravlev
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Related
is related to LU-9157 replay-single test_80c: rmdir failed Resolved
is related to LU-12068 sanity-lfsck test_6b: (7.2) 0x0 is no... Resolved
is related to LU-11366 replay-single timeout test 80f: rm: c... Resolved
Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

This issue was created by maloo for Andreas Dilger <adilger@whamcloud.com>

This issue relates to the following test suite run: https://testing.whamcloud.com/test_sets/0b9dcc0a-adf2-11e8-bd05-52540065bddc

test_70d failed with the following error:

Started 7681
rm: cannot remove '/mnt/lustre/d70d.replay-single/test1': Directory not empty
rmdir fails
7681 stopped

VVVVVVV DO NOT REMOVE LINES BELOW, Added by Maloo for auto-association VVVVVVV
replay-single test_70d - 7681 stopped



 Comments   
Comment by Alex Zhuravlev [ 23/Jan/19 ]

I'm able to reproduce this w/o any failover, just with this:

for ((i = 0; i < 5000; i++)); do
        $LFS mkdir -i0 -c2 $DIR/$tdir/test || error mkdir failed"
        touch $DIR/$tdir/test/a || error "rmdir failed"
        mkdir $DIR/$tdir/test/b || error "mkdir failed"
        rm -rf $DIR/$tdir/test || error "rmdir failed"
done

the root cause is that sometimes hash of "a" or "b" can be 0, so during readdir MDT returns "." (hard coded hash=1), then ".." (hash=2) and then all the remaining real entries including that one with hash=0. and this confuses the client.

IMO, it deserves to be "major" issue

Comment by Gerrit Updater [ 23/Jan/19 ]

Alex Zhuravlev (bzzz@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/34098
Subject: LU-11330 osd-zfs: hash for . and .. must not be a positive number
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: fe4a0c155179bc3810f9bd449539b147a943daa4

Comment by Gerrit Updater [ 27/Feb/19 ]

Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/34098/
Subject: LU-11330 osd-zfs: hash for ./.. must be 0
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: fb75af7d45d1217c877f75c4296f9df0cc731604

Comment by Peter Jones [ 27/Feb/19 ]

Landed for 2.13

Comment by Gerrit Updater [ 19/Mar/19 ]

Minh Diep (mdiep@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/34451
Subject: LU-11330 osd-zfs: hash for ./.. must be 0
Project: fs/lustre-release
Branch: b2_12
Current Patch Set: 1
Commit: 74b0f9d6ee3278084f5f8f52d1ea3fb35eb4d009

Comment by Gerrit Updater [ 01/Apr/19 ]

Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/34451/
Subject: LU-11330 osd-zfs: hash for ./.. must be 0
Project: fs/lustre-release
Branch: b2_12
Current Patch Set:
Commit: 945db23fad2bb38a2a4ebaec9407f6ae20ed3dc7

Generated at Sat Feb 10 02:42:56 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.