Bug 1004765

Summary: writes on cifs mount fails with "Bad file descriptor" when we perform changes to client graph
Product: Red Hat Gluster Storage Reporter: spandura
Component: sambaAssignee: Poornima G <pgurusid>
Status: CLOSED ERRATA QA Contact: spandura
Severity: urgent Docs Contact:
Priority: urgent    
Version: 2.1CC: amarts, lmohanty, pgurusid, shaines, surs
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: glusterfs-3.4.0.32rhs-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1005159 (view as bug list) Environment:
Last Closed: 2013-09-23 22:32:17 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 1005159    

Description spandura 2013-09-05 12:32:46 UTC
Description of problem:
=========================
When writes are in progress from cifs mount, if we perform any volume set operations which changes the client graph, the writes fails with "Bad file descriptor" 

Version-Release number of selected component (if applicable):
===============================================================
glusterfs 3.4.0.30rhs built on Aug 30 2013 08:15:37

How reproducible:
====================
Often

Steps to Reproduce:
=====================
1.Create a replicate volume. Start the volume. 

2.Create a cifs mount. 

3.From mount point execute: "for i in `seq 1 100`; do echo "Hello $i" > file.1 ; sleep 1 ; done

4. while writes on file are in progress , set "write-behind" to "off" from one of the storage node. 

Actual results:
==============
root@darrel [Sep-05-2013-10:14:47] > for i in `seq 1 100`; do echo "Hello $i" >&5 ; sleep 1 ; done
-bash: echo: write error: Bad file descriptor
-bash: echo: write error: Bad file descriptor
-bash: echo: write error: Bad file descriptor
-bash: echo: write error: Bad file descriptor
-bash: echo: write error: Bad file descriptor
-bash: echo: write error: Bad file descriptor
-bash: echo: write error: Bad file descriptor
-bash: echo: write error: Bad file descriptor
-bash: echo: write error: Bad file descriptor
-bash: echo: write error: Bad file descriptor

Expected results:
===================
writes shouldn't file. 

Additional info:

Comment 2 Lalatendu Mohanty 2013-09-05 15:15:57 UTC
I am seeing this issue with latest gluster rpm i.e. glusterfs-server-3.4.0.31rhs-1.el6rhs.x86_64. 

This bug will result in data loss for on going IO when we a graph change for gluster volume. Graph change includes add-brick, remove-brick commit, volume set commands.

Comment 3 Poornima G 2013-09-06 11:05:00 UTC
Posted review @ https://code.engineering.redhat.com/gerrit/12573

Comment 4 spandura 2013-09-07 07:46:57 UTC
Verified the fix on build:-
============================
glusterfs 3.4.0.32rhs built on Sep  6 2013 10:26:11

Bug is fixed. Moving bug to verified state.

Comment 5 Scott Haines 2013-09-23 22:32:17 UTC
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. 

For information on the advisory, and where to find the updated files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2013-1262.html