Description of problem: When glusterfs is mounted with aux-gfid-mount option and if getxattr is invoked to find the "glusterfs.ancestr.path" attribute brick process crashes and entire volume becomes unavailable. Version-Release number of selected component (if applicable): 3.4.0 How reproducible: Everytime Steps to Reproduce: 1. mount glusterfs 2. Create a file on this mount point and get the gfid using getfattr 3. Now mount another mount point with aux-gfid-mount option. 4. Now execute - getfattr -n "glusterfs.ancestry.path" -e text <mount point>/gfid 5. execute - gluster volume status <vol-name> You will find the bricks online flag as N and access to the original mount point will be not be available. Actual results: getfattr does not show glusterfs.ancestry.path key value and mount point becomes inaccessible. Expected results: getfattr should succeed and mount point should be accessible. Additional info: Following is the backtrace: [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". Core was generated by `/usr/local/sbin/glusterfsd -s atinmu --volfile-id test-vol.atinmu.home-amukherj'. Program terminated with signal 11, Segmentation fault. #0 list_add_tail (head=0x0, new=0x7f20cc000f90) at ../../../../libglusterfs/src/list.h:41 41 new->prev = head->prev; Missing separate debuginfos, use: debuginfo-install glibc-2.17-20.fc19.x86_64 keyutils-libs-1.5.8-1.fc19.x86_64 krb5-libs-1.11.3-18.fc19.x86_64 libcom_err-1.42.7-2.fc19.x86_64 libgcc-4.8.2-7.fc19.x86_64 libselinux-2.1.13-15.fc19.x86_64 openssl-libs-1.0.1e-37.fc19.x86_64 pcre-8.32-8.fc19.x86_64 zlib-1.2.7-10.fc19.x86_64 (gdb) bt #0 list_add_tail (head=0x0, new=0x7f20cc000f90) at ../../../../libglusterfs/src/list.h:41 #1 posix_make_ancestral_node (priv_base_path=priv_base_path@entry=0x1d29510 "/home/amukherj/exports/b1", path=path@entry=0x7f20da2e3789 "/", pathsize=pathsize@entry=4072, head=head@entry=0x0, dir_name=dir_name@entry=0x7f20dbdf876b "/", iabuf=iabuf@entry=0x7f20da2e2440, inode=inode@entry=0x7f20d358e02c, type=type@entry=3, xdata=xdata@entry=0x0) at posix-handle.c:83 #2 0x00007f20dbdf3a5a in posix_make_ancestryfromgfid (this=<optimized out>, path=0x7f20da2e3789 "/", pathsize=4072, head=0x0, type=type@entry=3, gfid=0x7f20da2e26a0 "", handle_size=handle_size@entry=80, priv_base_path=0x1d29510 "/home/amukherj/exports/b1", itable=0x1d34630, parent=0x7f20da2e2698, xdata=0x0) at posix-handle.c:140 #3 0x00007f20dbdec9cc in posix_get_ancestry_non_directory (this=this@entry=0x1cfb000, leaf_inode=<optimized out>, head=head@entry=0x0, path=path@entry=0x7f20da2e4888, type=type@entry=1, op_errno=op_errno@entry=0x7f20da2e487c, xdata=0x0) at posix.c:3268 #4 0x00007f20dbdecd46 in posix_get_ancestry (this=this@entry=0x1cfb000, leaf_inode=<optimized out>, head=head@entry=0x0, path=path@entry=0x7f20da2e4888, type=type@entry=1, op_errno=op_errno@entry=0x7f20da2e487c, xdata=<optimized out>) at posix.c:3323 #5 0x00007f20dbded8f4 in posix_getxattr (frame=0x7f20e2d0a4e0, this=0x1cfb000, loc=<optimized out>, name=<optimized out>, xdata=<optimized out>) at posix.c:3503 #6 0x00007f20e3eef71d in default_getxattr (frame=0x7f20e2d0a4e0, this=0x1cfc2f0, loc=0x7f20e2792f18, name=0x1cf6280 "glusterfs.ancestry.path", xdata=0x0) at defaults.c:1143 #7 0x00007f20db9bf7ec in posix_acl_getxattr (frame=0x7f20e2d0a434, this=0x1cfd630, loc=0x7f20e2792f18, name=0x1cf6280 "glusterfs.ancestry.path", xdata=0x0) at posix-acl.c:1966 #8 0x00007f20db7a9ca9 in pl_getxattr (frame=0x7f20e2d0a388, this=0x1cfe740, loc=0x7f20e2792f18, name=<optimized out>, xdata=0x0) at posix.c:502 #9 0x00007f20db5909bb in iot_getxattr_wrapper (frame=0x7f20e2d0a2dc, this=0x1cff840, loc=0x7f20e2792f18, name=0x1cf6280 "glusterfs.ancestry.path", xdata=0x0) at io-threads.c:1746 #10 0x00007f20e3f0387d in call_resume_wind (stub=0x7f20e2792ed8) at call-stub.c:2414 #11 call_resume (stub=0x7f20e2792ed8) at call-stub.c:2841 #12 0x00007f20db59293f in iot_worker (data=0x1d24cf0) at io-threads.c:191 #13 0x0000003c61207c53 in start_thread () from /lib64/libpthread.so.0 #14 0x0000003c60af5dbd in clone () from /lib64/libc.so.6
REVIEW: http://review.gluster.org/6892 (getxattr segv fix for fetching glusterfs.ancestry.path key value from aux-gfid-mount based mount point for a gf id) posted (#1) for review on master by Atin Mukherjee (amukherj)
REVIEW: http://review.gluster.org/6892 (Problem : getfattr fails and mount point becomes inaccessible while fetching glusterfs.ancestry.path key value for a gfid from aux-gfid-mount based mount point.) posted (#2) for review on master by Atin Mukherjee (amukherj)
REVIEW: http://review.gluster.org/6892 (Problem : getfattr fails and mount point becomes inaccessible while fetching glusterfs.ancestry.path key value for a gfid from aux-gfid-mount based mount point.) posted (#3) for review on master by Atin Mukherjee (amukherj)
COMMIT: http://review.gluster.org/6892 committed in master by Vijay Bellur (vbellur) ------ commit d0574d040b3d7f54ddafa0b768ddfc1e7f247536 Author: Atin Mukherjee <amukherj> Date: Mon Feb 3 17:49:51 2014 +0530 Problem : getfattr fails and mount point becomes inaccessible while fetching glusterfs.ancestry.path key value for a gfid from aux-gfid-mount based mount point. Analysis : The caller of posix_make_ancestryfromgfid() function i.e. posix_get_ancestry_non_directory() is sending an incorrect type value as an argument leading to a crash in posix_make_ancestral_node() (head dirent pointer is NULL and an attempt to dereference causes seg fault). For a non directory operation this piece of code should not have been executed but due to incorrect type value this happened. Solution : In posix_make_ancestryfromgfid() call type is passed as logical or of type and POSIX_ANCESTRY_PATH instead of logical or of POSIX_ANCESTRY_PATH and POSX_ANCESTRY_DENTRY. Change-Id: Iaf844bea91396c5e2ee295d5a082998fda66f0a9 BUG: 1060104 Signed-off-by: Atin Mukherjee <amukherj> Reviewed-on: http://review.gluster.org/6892 Reviewed-by: Raghavendra G <rgowdapp> Tested-by: Gluster Build System <jenkins.com> Reviewed-by: Vijay Bellur <vbellur>
REVIEW: http://review.gluster.org/6921 (Problem : getfattr fails and mount point becomes inaccessible while fetching glusterfs.ancestry.path key value for a gfid from aux-gfid-mount based mount point.) posted (#1) for review on release-3.5 by Atin Mukherjee (amukherj)
REVIEW: http://review.gluster.org/6921 (POSIX : gefattr fails and mount point become inaccessible) posted (#2) for review on release-3.5 by Atin Mukherjee (amukherj)
COMMIT: http://review.gluster.org/6921 committed in release-3.5 by Vijay Bellur (vbellur) ------ commit 095f62a963e9768a17e7b7382967f2e30f3879a8 Author: Atin Mukherjee <amukherj> Date: Mon Feb 3 17:49:51 2014 +0530 POSIX : gefattr fails and mount point become inaccessible Problem : getfattr fails and mount point becomes inaccessible while fetching glusterfs.ancestry.path key value for a gfid from aux-gfid-mount based mount point. Analysis : The caller of posix_make_ancestryfromgfid() function i.e. posix_get_ancestry_non_directory() is sending an incorrect type value as an argument leading to a crash in posix_make_ancestral_node() (head dirent pointer is NULL and an attempt to dereference causes seg fault). For a non directory operation this piece of code should not have been executed but due to incorrect type value this happened. Solution : In posix_make_ancestryfromgfid() call type is passed as logical or of type and POSIX_ANCESTRY_PATH instead of logical or of POSIX_ANCESTRY_PATH and POSX_ANCESTRY_DENTRY. Please note this patch is backport picked up from following patch: http://review.gluster.org/#/c/6892/ Change-Id: Iaf844bea91396c5e2ee295d5a082998fda66f0a9 BUG: 1060104 Signed-off-by: Atin Mukherjee <amukherj> Reviewed-on: http://review.gluster.org/6892 Reviewed-by: Raghavendra G <rgowdapp> Tested-by: Gluster Build System <jenkins.com> Reviewed-by: Vijay Bellur <vbellur> Reviewed-on: http://review.gluster.org/6921
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-3.5.0, please reopen this bug report. glusterfs-3.5.0 has been announced on the Gluster Developers mailinglist [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] http://thread.gmane.org/gmane.comp.file-systems.gluster.devel/6137 [2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user