Bug 1611692 - Mount process crashes on a sharded volume during rename when dst doesn't exist
Summary: Mount process crashes on a sharded volume during rename when dst doesn't exist
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: sharding
Version: mainline
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
Assignee: Krutika Dhananjay
QA Contact: bugs@gluster.org
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-08-02 16:05 UTC by Krutika Dhananjay
Modified: 2018-10-23 15:16 UTC (History)
2 users (show)

Fixed In Version: glusterfs-5.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-10-23 15:16:17 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description Krutika Dhananjay 2018-08-02 16:05:43 UTC
Description of problem:

Was executing rsync to copy data within a sharded volume. And rsync internally copies data to a temporary file before renaming it to the actual bname. Hit this crash.

But then there was a .t specifically meant to test all rename and unlink scenarios in sharded volumes.

Then the question is - why didn't the tests @ https://bit.ly/2LScry1 and https://bit.ly/2vbqO6S cause the process to crash? Well, turns out it's because of a bug in the script itself where the test cases were supposed to test the scenario where the dst file doesn't exist but the dst path in both tests was existent as a remnant of the previous tests and never cleaned up prior to running these tests.

Need to fix both the bug and the test.

Version-Release number of selected component (if applicable):
Only the master branch

How reproducible:
Every time

Steps to Reproduce:
1. Create any volume with shard enabled.
2. Create a file f1 under the mount point.
3. Rename it to f2.
The mount process crashes.
Actual results:


Expected results:


Additional info:

Comment 1 Krutika Dhananjay 2018-08-02 16:49:08 UTC
https://review.gluster.org/#/c/20623

Comment 2 Worker Ant 2018-08-02 16:49:23 UTC
REVIEW: https://review.gluster.org/20623 (features/shard: Fix crash and test case in RENAME fop) posted (#1) for review on master by Krutika Dhananjay

Comment 3 Worker Ant 2018-08-14 13:50:10 UTC
COMMIT: https://review.gluster.org/20623 committed in master by "Krutika Dhananjay" <kdhananj> with a commit message- features/shard: Fix crash and test case in RENAME fop

Setting the refresh flag in inode ctx in shard_rename_src_cbk()
is applicable only when the dst file exists and is sharded and
has a hard link > 1 at the time of rename.

But this piece of code is exercised even when dst doesn't exist.
In this case, the mount crashes because local->int_inodelk.loc.inode
is NULL.

Change-Id: Iaf85a5ee3dff8b01a76e11972f10f2bb9dcbd407
Updates: bz#1611692
Signed-off-by: Krutika Dhananjay <kdhananj>

Comment 4 Shyamsundar 2018-10-23 15:16:17 UTC
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-5.0, please open a new bug report.

glusterfs-5.0 has been announced on the Gluster mailinglists [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution.

[1] https://lists.gluster.org/pipermail/announce/2018-October/000115.html
[2] https://www.gluster.org/pipermail/gluster-users/


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