Bug 910661 - fuse client crashes when open-fd migration is in progress
Summary: fuse client crashes when open-fd migration is in progress
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: distribute
Version: mainline
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: shishir gowda
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 895528
TreeView+ depends on / blocked
 
Reported: 2013-02-13 07:06 UTC by shishir gowda
Modified: 2015-12-01 16:45 UTC (History)
4 users (show)

Fixed In Version: glusterfs-3.4.0
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-07-24 18:03:48 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)
open-fd-test.c taken from glusterfs/extras/tests (1.52 KB, text/x-csrc)
2013-02-13 07:06 UTC, shishir gowda
no flags Details

Description shishir gowda 2013-02-13 07:06:04 UTC
Created attachment 696723 [details]
open-fd-test.c taken from glusterfs/extras/tests

Description of problem:
Fuse client crashes when a file with open-fd is in migration. Rebalance does not error out. But fuse client crashes

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


How reproducible:
always

Steps to Reproduce:
1. create a dht (atleast 2 bricks) volume
2. create a file
3. rename the file till a linkfile is created
4. open the file and start writing to it
5. start rebalance force

Attached the test program to keep the fd opened, and writes. (pass the file path as argument)
  
Actual results:
client crashes

Expected results:
client should not crash

Additional info:

Comment 1 shishir gowda 2013-02-13 07:07:23 UTC
[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-id=/patchy --volfile-server=localhost /mnt/'.
Program terminated with signal 11, Segmentation fault.
#0  pthread_spin_lock (lock=0xaaaaaac2) at ../nptl/sysdeps/i386/pthread_spin_lock.c:35
35	  asm ("\n"
Missing separate debuginfos, use: debuginfo-install keyutils-libs-1.5.5-2.fc17.x86_64 libgcc-4.7.2-2.fc17.x86_64 libselinux-2.1.10-3.fc17.x86_64
(gdb) bt
#0  pthread_spin_lock (lock=0xaaaaaac2) at ../nptl/sysdeps/i386/pthread_spin_lock.c:35
#1  0x00007f7567af2dd3 in fd_ref (fd=0x117108c) at fd.c:447
#2  0x00007f7566129875 in fuse_write (this=0x10c9b30, finh=0x7f7554007010, msg=0x7f756716d000)
    at fuse-bridge.c:2186
#3  0x00007f756613dd68 in fuse_thread_proc (data=0x10c9b30) at fuse-bridge.c:4562
#4  0x00000039f2c07d14 in start_thread (arg=0x7f7561f2b700) at pthread_create.c:309
#5  0x00000039f28f168d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:115

(gdb) p *fd
$2 = {pid = 2992, flags = 32770, refcount = 0, inode_list = {next = 0x117109c, prev = 0x117109c}, 
  inode = 0xaaaaaaaa, lock = 1, _ctx = 0x7f7554006e50, xl_count = 11, lk_ctx = 0x7f75540038a0, 
  anonymous = _gf_false}

Comment 2 shishir gowda 2013-02-14 07:20:32 UTC
Fix sent for review http://review.gluster.org/#change,4509

Comment 3 Vijay Bellur 2013-02-15 04:26:30 UTC
CHANGE: http://review.gluster.org/4509 (cluster/distribute: Remove suprious fd_unref call) merged in master by Anand Avati (avati)

Comment 4 Vijay Bellur 2013-03-04 10:40:46 UTC
CHANGE: http://review.gluster.org/4608 (cluster/distribute: Remove suprious fd_unref call) merged in release-3.4 by Vijay Bellur (vbellur)


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