Bug 1758579

Summary: Rebalance causing IO Error - File descriptor in bad state
Product: [Community] GlusterFS Reporter: Mohit Agrawal <moagrawa>
Component: distributeAssignee: Mohit Agrawal <moagrawa>
Status: CLOSED NEXTRELEASE QA Contact:
Severity: high Docs Contact:
Priority: unspecified    
Version: mainlineCC: bugs, moagrawa, pasik, rhs-bugs, storage-qa-internal, tdesala, ubansal
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1758432
: 1761910 1806996 (view as bug list) Environment:
Last Closed: 2019-10-15 14:49:23 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1758432, 1761907    
Bug Blocks: 1761910, 1806996    

Comment 1 Mohit Agrawal 2019-10-07 10:59:02 UTC
Hi,

Steps to reproduce 

1.Mounted a disperse volume
2.Started the a python script from 2 clients (one from /mnt/EC and another from /mnt/EC/dir1) to continues
  fd open/close in multiple threads
3.Added brick and started rebalance 
4.Rebalance has completed 

RCA:
Before merged this patch https://review.gluster.org/#/c/glusterfs/+/15804/ if fd 
is not opened client_fops sets anon fd without checking fd is anonymous or not so there was no issue 
in if fd is not opened before throwing any fop but after merged this patch CLIENT_GET_REMOTE_FD sets the errno to EBADFD if fd is not anonymous.In dht fop_cbks code path open fd only while errno is EBADF so need to handle EBADFD if any dht children xlator sets as an error if fd is not opened.


Regards,
Mohit Agrawal

Comment 2 Mohit Agrawal 2019-10-07 12:02:48 UTC
Upstream patch
https://review.gluster.org/#/c/glusterfs/+/23518/

Comment 3 Worker Ant 2019-10-15 14:49:23 UTC
REVIEW: https://review.gluster.org/23518 (dht: Rebalance causing IO Error - File descriptor in bad state) merged (#19) on master by MOHIT AGRAWAL