Bug 1472822 - [Quota]: Assertion failed: !"link attempted on non-directory parent" errors reported in brick logs
Summary: [Quota]: Assertion failed: !"link attempted on non-directory parent" errors r...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat Storage
Component: quota
Version: rhgs-3.2
Hardware: x86_64
OS: Linux
medium
high
Target Milestone: ---
: ---
Assignee: hari gowtham
QA Contact: Rahul Hinduja
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-07-19 13:12 UTC by Rahul Hinduja
Modified: 2020-06-26 11:19 UTC (History)
3 users (show)

Fixed In Version: glusterfs-3.12.2-17
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-09-17 04:46:30 UTC
Embargoed:


Attachments (Terms of Use)

Description Rahul Hinduja 2017-07-19 13:12:57 UTC
Description of problem:
=======================

While performing the lookup on EC volume, lots of following errors were reported in the brick logs:

[2017-07-18 16:13:47.594241] E [inode.c:954:__inode_link] (-->/usr/lib64/glusterfs/3.8.4/xlator/features/quota.so(+0x15895) [0x7fa0e4b07895] -->/lib64/libglusterfs.so.0(inode_link+0x39) [0x7fa0f53fd809] -->/lib64/libglusterfs.so.0(+0x394a9) [0x7fa0f53fd4a9] ) 0-: Assertion failed: !"link attempted on non-directory parent"
[2017-07-18 16:13:47.617064] E [inode.c:954:__inode_link] (-->/usr/lib64/glusterfs/3.8.4/xlator/features/quota.so(+0x15895) [0x7fa0e4b07895] -->/lib64/libglusterfs.so.0(inode_link+0x39) [0x7fa0f53fd809] -->/lib64/libglusterfs.so.0(+0x394a9) [0x7fa0f53fd4a9] ) 0-: Assertion failed: !"link attempted on non-directory parent"
[2017-07-18 16:13:47.618151] E [inode.c:954:__inode_link] (-->/usr/lib64/glusterfs/3.8.4/xlator/features/quota.so(+0x15895) [0x7fa0e4b07895] -->/lib64/libglusterfs.so.0(inode_link+0x39) [0x7fa0f53fd809] -->/lib64/libglusterfs.so.0(+0x394a9) [0x7fa0f53fd4a9] ) 0-: Assertion failed: !"link attempted on non-directory parent"
[2017-07-18 16:13:48.680307] E [inode.c:954:__inode_link] (-->/usr/lib64/glusterfs/3.8.4/xlator/features/quota.so(+0x15895) [0x7fa0e4b07895] -->/lib64/libglusterfs.so.0(inode_link+0x39) [0x7fa0f53fd809] -->/lib64/libglusterfs.so.0(+0x394a9) [0x7fa0f53fd4a9] ) 0-: Assertion failed: !"link attempted on non-directory parent"
[2017-07-18 16:13:48.680831] E [inode.c:954:__inode_link] (-->/usr/lib64/glusterfs/3.8.4/xlator/features/quota.so(+0x15895) [0x7fa0e4b07895] -->/lib64/libglusterfs.so.0(inode_link+0x39) [0x7fa0f53fd809] -->/lib64/libglusterfs.so.0(+0x394a9) [0x7fa0f53fd4a9] ) 0-: Assertion failed: !"link attempted on non-directory parent"
[2017-07-18 16:13:48.707445] E [inode.c:954:__inode_link] (-->/usr/lib64/glusterfs/3.8.4/xlator/features/quota.so(+0x15895) [0x7fa0e4b07895] -->/lib64/libglusterfs.so.0(inode_link+0x39) [0x7fa0f53fd809] -->/lib64/libglusterfs.so.0(+0x394a9) [0x7fa0f53fd4a9] ) 0-: Assertion failed: !"link attempted on non-directory parent"
[2017-07-18 16:13:48.707959] E [inode.c:954:__inode_link] (-->/usr/lib64/glusterfs/3.8.4/xlator/features/quota.so(+0x15895) [0x7fa0e4b07895] -->/lib64/libglusterfs.so.0(inode_link+0x39) [0x7fa0f53fd809] -->/lib64/libglusterfs.so.0(+0x394a9) [0x7fa0f53fd4a9] ) 0-: Assertion failed: !"link attempted on non-directory parent"

I havent seen any functionality impact yet, however following is the outcome of the discussion with sanoj

"Functionality imapct.. writes on such hard link files would not get propagated up to root immediately. (but would happen eventually as the directory containing has a lookup).. It is a rare case that a directory has a file with hardlink to another file in same directory"


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

glusterfs-3.8.4-18.5.el7rhgs.x86_64


How reproducible:
=================

Have to retry another time. 

Steps carried:
==============

The steps carried were in geo-rep setup, however the logs on master bricks. Providing only the steps that is needed to avoid confusion. 

1. Create 6 node Master Cluster
2. Create EC volume on Master (2x(4+2)). Enable quota. 
3. Mount the volume (Fuse)
4. Using crefi, create the data set. fops carried inorder were:

create, chmod, chown, chgrp, hardlink, symlink, truncate

5. After every fop, calculate the checksum of mount (At least twice)
6. After truncate, checksum never matched

Actual results:
===============

Assertion failed: !"link attempted on non-directory parent"

Comment 5 Sanoj Unnikrishnan 2018-03-15 03:42:01 UTC
Hardlinks were incorrectly being linked as parents,
This has been fixed through https://review.gluster.org/#/c/17730.

Comment 8 Amar Tumballi 2018-09-17 04:46:30 UTC
The patch mentioned is already present in base of 3.4.0 (glusterfs-3.12.2-17)


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