Bug 818578

Summary: [glusterfs-3.3.0qa39]: blocked entrylks when rm -rf and replace-brick happening parallely
Product: [Community] GlusterFS Reporter: Raghavendra Bhat <rabhat>
Component: replicateAssignee: Pranith Kumar K <pkarampu>
Status: CLOSED CURRENTRELEASE QA Contact: Pranith Kumar K <pkarampu>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: mainlineCC: gluster-bugs
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: glusterfs-3.4.0 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-07-24 17:19:04 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: glusterfs-3.3.0qa40 Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 817967    
Attachments:
Description Flags
statedump of the source brick none

Description Raghavendra Bhat 2012-05-03 12:30:41 UTC
Description of problem:
Created a single brick volume. Untarred linux-kernel tarball and glusterfs tarball. Gave replace-brick and after some time ran rm -rf on the fuse mount parallely.

After somefiles were deleted rm -rf hung.

[xlator.features.locks.new-locks.inode]
path=<gfid:4a142098-c7be-40d0-9fcf-04cf9f8fe2e5>
mandatory=0
entrylk-count=2
lock-dump.domain.domain=new-pump
xlator.feature.locks.lock-dump.domain.entrylk.entrylk[0](ACTIVE)=type=ENTRYLK_WRLCK on basename=.sys_ia32.o.cmd, pid = 484620988, owner=bcbae2
1c097f0000, transport=(nil), , granted at Thu May  3 15:49:45 2012

xlator.feature.locks.lock-dump.domain.entrylk.entrylk[1](BLOCKED)=type=ENTRYLK_WRLCK on basename=.sys_ia32.o.cmd, pid = 484620988, owner=bcbae21c097f0000, transport=(nil), , blocked at Thu May  3 15:49:45 2012

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


How reproducible:


Steps to Reproduce:
1. Create a single brick volume and start it.
2. Create files and directories (may be untarring of linux-kernel, glusterfs etc)
3. Give replace brick and after some time do rm -rf on the mount point (replace-brick should be going on)
  
Actual results:

rm -rf hung due to blocked entrylks

Expected results:

rm -rf should not hang

Additional info:

Comment 1 Raghavendra Bhat 2012-05-03 12:31:48 UTC
Created attachment 581848 [details]
statedump of the source brick

Comment 2 Anand Avati 2012-05-03 19:22:21 UTC
CHANGE: http://review.gluster.com/3270 (cluster/afr: Fix race in nonblocking entrylk) merged in master by Anand Avati (avati)

Comment 3 Raghavendra Bhat 2012-05-10 07:26:23 UTC
Tested with glusterfs-3.3.0qa40 and rm -rf completed successfully without hanging when replace-brick was going on and replace-brick also completed.