Bug 1304105 - glusterfs client crash when an entry is invalidated
Summary: glusterfs client crash when an entry is invalidated
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: fuse
Version: mainline
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Raghavendra Bhat
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-02-02 22:10 UTC by Raghavendra Bhat
Modified: 2018-08-29 03:18 UTC (History)
1 user (show)

Fixed In Version: glusterfs-4.1.3 (or higher)
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-08-29 03:18:42 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description Raghavendra Bhat 2016-02-02 22:10:08 UTC
Description of problem:

glusterfs client segfaults when an entry is invalidated via setfattr interface.
This is the backtrace of the core generated.

warning: .dynamic section for "/usr/local/lib/libglusterfs.so.0" is not at the expected address (wrong library or version mismatch?)
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `/usr/local/sbin/glusterfs --volfile-server=hal9000 --volfile-id=mirror /mnt/glu'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00007f6bbfc84593 in fuse_invalidate_entry (this=0x1d5f470, fuse_ino=140100356824380) at ../../../../../xlators/mount/fuse/src/fuse-bridge.c:227
227	        list_for_each_entry (dentry, &inode->dentry_list, inode_list) {
[Current thread is 1 (Thread 0x7f6bb26fd700 (LWP 7727))]
Missing separate debuginfos, use: dnf debuginfo-install bzip2-libs-1.0.6-17.fc23.x86_64 elfutils-libelf-0.163-4.fc23.x86_64 elfutils-libs-0.163-4.fc23.x86_64 glibc-2.22-3.fc23.x86_64 keyutils-libs-1.5.9-7.fc23.x86_64 krb5-libs-1.13.2-11.fc23.x86_64 libacl-2.2.52-10.fc23.x86_64 libattr-2.4.47-14.fc23.x86_64 libcap-2.24-8.fc23.x86_64 libcom_err-1.42.13-3.fc23.x86_64 libgcc-5.3.1-2.fc23.x86_64 libgcrypt-1.6.4-1.fc23.x86_64 libgpg-error-1.20-1.fc23.x86_64 libidn-1.32-1.fc23.x86_64 libseccomp-2.2.3-0.fc23.x86_64 libselinux-2.4-4.fc23.x86_64 nss-mdns-0.10-16.fc23.x86_64 openssl-libs-1.0.2e-3.fc23.x86_64 pcre-8.37-4.fc23.x86_64 sssd-client-1.13.1-2.fc23.x86_64 systemd-libs-222-7.fc23.x86_64 xz-libs-5.2.1-3.fc23.x86_64 zlib-1.2.8-9.fc23.x86_64
(gdb) bt
#0  0x00007f6bbfc84593 in fuse_invalidate_entry (this=0x1d5f470, fuse_ino=140100356824380) at ../../../../../xlators/mount/fuse/src/fuse-bridge.c:227
#1  0x00007f6bbfc95407 in fuse_setxattr (this=0x1d5f470, finh=0x7f6ba80051e0, msg=0x7f6ba8005208) at ../../../../../xlators/mount/fuse/src/fuse-bridge.c:3198
#2  0x00007f6bbfc9bb83 in fuse_thread_proc (data=0x1d5f470) at ../../../../../xlators/mount/fuse/src/fuse-bridge.c:4947
#3  0x00007f6bc7b2260a in start_thread () from /lib64/libpthread.so.0
#4  0x00007f6bc7401bbd in clone () from /lib64/libc.so.6
(gdb) f 0
#0  0x00007f6bbfc84593 in fuse_invalidate_entry (this=0x1d5f470, fuse_ino=140100356824380) at ../../../../../xlators/mount/fuse/src/fuse-bridge.c:227
227	        list_for_each_entry (dentry, &inode->dentry_list, inode_list) {
(gdb) p inode
$1 = (inode_t *) 0x0
(gdb) l
222	        priv = this->private;
223	
224	        if (!priv->reverse_fuse_thread_started)
225	                return;
226	
227	        list_for_each_entry (dentry, &inode->dentry_list, inode_list) {
228	                node = GF_CALLOC (1, sizeof (*node),
229	                                  gf_fuse_mt_invalidate_node_t);
230	                if (node == NULL)
231	                        return;
(gdb) 



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


How reproducible:
Always

Steps to Reproduce:
1. setfattr -n "inode-invalidate" <file on gluster mount>
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Vijay Bellur 2016-02-02 22:14:15 UTC
REVIEW: http://review.gluster.org/13343 (mount/fuse: get the inode from fuse inode number before accessing) posted (#1) for review on master by Raghavendra Bhat (raghavendra)

Comment 2 Raghavendra Bhat 2016-02-18 15:25:59 UTC
http://review.gluster.org/13327 fixes the issue. So closing the bug.


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