Bug 1655527

Summary: Incorrect usage of local->fd in afr_open_ftruncate_cbk
Product: [Community] GlusterFS Reporter: Soumya Koduri <skoduri>
Component: replicateAssignee: bugs <bugs>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: high Docs Contact:
Priority: unspecified    
Version: 4.1CC: bugs, ravishankar, srangana
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: glusterfs-4.1.7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1648687 Environment:
Last Closed: 2019-01-22 14:09:20 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:
Embargoed:
Bug Depends On: 1648687, 1655578    
Bug Blocks: 1651322    

Description Soumya Koduri 2018-12-03 11:38:23 UTC
+++ This bug was initially created as a clone of Bug #1648687 +++

Description of problem:

afr_open() stores fd reference in local->cont.open structure. But in the callback function "afr_open_ftruncate_cbk" ( when openflags contain 'O_TRUNC' set), we reference local->fd in AFR_STACK_UNWIND resulting in error or crash.


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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

--- Additional comment from Soumya Koduri on 2018-11-11 12:34:37 EST ---

Patch posted for review - https://review.gluster.org/#/c/glusterfs/+/21617/

--- Additional comment from Worker Ant on 2018-11-11 12:45:42 EST ---

REVIEW: https://review.gluster.org/21617 (afr: open_ftruncate_cbk should read fd from local->cont.open struct) posted (#2) for review on master by soumya k

--- Additional comment from Worker Ant on 2018-11-15 00:08:03 EST ---

REVIEW: https://review.gluster.org/21617 (afr: open_ftruncate_cbk should read fd from local->cont.open struct) posted (#8) for review on master by Ravishankar N

Comment 1 Worker Ant 2018-12-03 13:10:19 UTC
REVIEW: https://review.gluster.org/21779 (afr: open_ftruncate_cbk should read fd from local->cont.open struct) posted (#1) for review on release-4.1 by soumya k

Comment 2 Worker Ant 2018-12-26 17:00:47 UTC
REVIEW: https://review.gluster.org/21779 (afr: open_ftruncate_cbk should read fd from local->cont.open struct) posted (#2) for review on release-4.1 by Shyamsundar Ranganathan

Comment 3 Shyamsundar 2019-01-22 14:09:20 UTC
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-4.1.7, please open a new bug report.

glusterfs-4.1.7 has been announced on the Gluster mailinglists [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution.

[1] https://lists.gluster.org/pipermail/announce/2019-January/000118.html
[2] https://www.gluster.org/pipermail/gluster-users/