Bug 1654753 - A distributed-disperse volume crashes when a symbolic link is renamed
Summary: A distributed-disperse volume crashes when a symbolic link is renamed
Keywords:
Status: CLOSED DEFERRED
Alias: None
Product: GlusterFS
Classification: Community
Component: distribute
Version: mainline
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
Assignee: Susant Kumar Palai
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-11-29 15:28 UTC by Xavi Hernandez
Modified: 2020-03-03 07:57 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-03-03 07:57:06 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Gluster.org Gerrit 22666 0 None Abandoned dht: use separate inode for linkto file create and setattr 2019-10-03 19:30:32 UTC

Description Xavi Hernandez 2018-11-29 15:28:00 UTC
Description of problem:

On a distributed-disperse volume, if you try to rename a symbolic link, the fuse process dies.

Version-Release number of selected component (if applicable): mainline


How reproducible:

Often, depends on the names used as original and renamed names

Steps to Reproduce:
1. gluster volume create test disperse 6 redundancy 2 host:/bricks/test_{1..12}
2. gluster volume start test
3. mount -t glusterfs host:/test /mnt
4. ln -s /dummy /mnt/symlink
5. mv /mnt/symlink /mnt/symlink.2

Actual results:

Fuse mount crashes

Expected results:

The rename should not cause a crash

Additional info:

The problem appears at the creation of the linkto file when the new name doesn't go to the same brick the symlink was residing before the rename. In this case DHT creates the symlink and tries to set some attributes calling setattr fop.

When setattr is called, the passed inode references the "real" file (i.e. a symlink). However, when ec receives the answers from bricks, statpre and statpost say that the inode is a regular file (because linkto files are regular files on the bricks).

This makes ec assume that it's a file, so it must have a defined size, but symlinks do not have size, which causes an assertion to fail.

We shouldn't use the same inode structure to represent two different things.

Comment 1 Worker Ant 2019-05-07 09:24:32 UTC
REVIEW: https://review.gluster.org/22666 (dht: use separate inode for linkto file create and setattr) posted (#2) for review on master by Susant Palai

Comment 2 Susant Kumar Palai 2020-03-03 07:57:06 UTC
Not being actively worked on. It will be reopened when someone works on it.


Note You need to log in before you can comment on or make changes to this bug.