Bug 808017 - [fbfb4d48491b160436e6ac986057a8fe5e320502] Crash in qr_open
Summary: [fbfb4d48491b160436e6ac986057a8fe5e320502] Crash in qr_open
Alias: None
Product: GlusterFS
Classification: Community
Component: quick-read (Show other bugs)
(Show other bugs)
Version: mainline
Hardware: Unspecified Unspecified
Target Milestone: ---
Assignee: Raghavendra G
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2012-03-29 11:05 UTC by Anush Shetty
Modified: 2015-12-01 16:45 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-04-03 03:38:01 UTC
Type: ---
Regression: ---
Mount Type: fuse
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description Anush Shetty 2012-03-29 11:05:45 UTC
Description of problem: On a single export volume, create a hard link, deleting the target file and reading the link file crashed the fuse client. 

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

How reproducible: Consistent

Steps to Reproduce:
1. touch /mnt/gluster/dot
2. ln /mnt/gluster/dot /mnt/gluster/dot2
3. rm -rf /mnt/gluster/dot
4. cat /mnt/gluster/dot2
Actual results:

(gdb) bt
#0  __strcmp_ssse3 () at ../sysdeps/x86_64/multiarch/../strcmp.S:214
#1  0x00007f8a363d95c5 in qr_open (frame=0x7f8a3998e230, this=0x2091160, loc=0x2106860, flags=32768, fd=0x20da5bc, xdata=0x0)
    at quick-read.c:797
#2  0x00007f8a3b15a5bc in default_open (frame=0x7f8a3998e02c, this=0x2092280, loc=0x2106860, flags=32768, fd=0x20da5bc, xdata=0x0)
    at defaults.c:976
#3  0x00007f8a35fba0a9 in io_stats_open (frame=0x7f8a3998e4e0, this=0x2093340, loc=0x2106860, flags=32768, fd=0x20da5bc, xdata=0x0)
    at io-stats.c:2026
#4  0x00007f8a35d9bc02 in posix_acl_open (frame=0x7f8a3998e0d8, this=0x2094440, loc=0x2106860, flags=32768, fd=0x20da5bc, xdata=0x0)
    at posix-acl.c:938
#5  0x00007f8a392ad9e2 in fuse_open_resume (state=0x2106840) at fuse-bridge.c:1873
#6  0x00007f8a392a21e7 in fuse_resolve_done (state=0x2106840) at fuse-resolve.c:453
#7  0x00007f8a392a22bd in fuse_resolve_all (state=0x2106840) at fuse-resolve.c:482
#8  0x00007f8a392a21b0 in fuse_resolve (state=0x2106840) at fuse-resolve.c:439
#9  0x00007f8a392a2294 in fuse_resolve_all (state=0x2106840) at fuse-resolve.c:478
#10 0x00007f8a392a2337 in fuse_resolve_continue (state=0x2106840) at fuse-resolve.c:498
#11 0x00007f8a392a1e95 in fuse_resolve_inode (state=0x2106840) at fuse-resolve.c:325
#12 0x00007f8a392a21a2 in fuse_resolve (state=0x2106840) at fuse-resolve.c:436
#13 0x00007f8a392a223f in fuse_resolve_all (state=0x2106840) at fuse-resolve.c:471
#14 0x00007f8a392a2375 in fuse_resolve_and_resume (state=0x2106840, fn=0x7f8a392ad38c <fuse_open_resume>) at fuse-resolve.c:511
#15 0x00007f8a392adb0f in fuse_open (this=0x207b110, finh=0x21063e0, msg=0x2106408) at fuse-bridge.c:1890
#16 0x00007f8a392b88e9 in fuse_thread_proc (data=0x207b110) at fuse-bridge.c:3962
#17 0x00007f8a3aae5efc in start_thread (arg=0x7f8a35403700) at pthread_create.c:304
#18 0x00007f8a3a82089d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#19 0x0000000000000000 in ?? ()
(gdb) f 1
#1  0x00007f8a363d95c5 in qr_open (frame=0x7f8a3998e230, this=0x2091160, loc=0x2106860, flags=32768, fd=0x20da5bc, xdata=0x0)
    at quick-read.c:797
797	                                if ((strcmp (dentry->name, loc->name) == 0)
(gdb) p loc->name
$1 = 0x0

Expected results:
Client shouldn't crash. 

Additional info:

Comment 1 Anand Avati 2012-04-02 09:38:30 UTC
CHANGE: http://review.gluster.com/3044 (performance/quick-read: open shouldn't be worried about checking whether it is being done on a deleted dentry.) merged in master by Vijay Bellur (vijay@gluster.com)

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