Bug 1377427

Summary: incorrect fuse dumping for WRITE
Product: [Community] GlusterFS Reporter: Csaba Henk <csaba>
Component: fuseAssignee: Csaba Henk <csaba>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: high    
Version: mainlineCC: bugs, hgowtham
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: glusterfs-3.10.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-03-06 17:26:53 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:

Description Csaba Henk 2016-09-19 16:07:12 UTC
Description of problem:

glusterfs fuse client can record the fuse traffic with "--dump-fuse=<file>" option.
The payload of incoming FUSE_WRITE requests is incorrectly recorded.

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

How reproducible:

Always. 

Steps to Reproduce:

1. mount a GlusterFS volume through fuse with invoking glusterfs from command line, passing "--dump-fuse=/tmp/sample.fuse"
2. $ echo HELLO > /some/file/in/the/gluster/mount
3. umount the volume
4. get & build the parsefuse tool (https://github.com/csabahenk/parsefuse). The contrib/fuse-include/fuse_kernel.h file from the GlusterFS source tree (corresponding to the glusterfs binary used above) is needed for the build. Once you have it, follow the instrcuctions in the README.
5. $ parsefuse /tmp/sample.fuse | grep WRITE

Actual results:

WRITE {Len:86 Opcode:16 Unique:8 Nodeid:140114248345388 Uid:0 Gid:0 Pid:10162 Padding:0} {Fh:140114047011132 Offset:11275787851083 Size:0 WriteFlags:0 LockOwner:0 Flags:0 Padding:0} "\x00\x00\x00\x00\x00\x00"

Expected results:

WRITE {Len:86 Opcode:16 Unique:8 Nodeid:140467912052652 Uid:0 Gid:0 Pid:15076 Padding:0} {Fh:140467979165708 Offset:0 Size:6 WriteFlags:0 LockOwner:0 Flags:32769 Padding:0} "HELLO\n"

Additional info:

The WRITE payload is dumped 40 bytes off.

Comment 1 Worker Ant 2016-09-19 16:09:16 UTC
REVIEW: http://review.gluster.org/15525 (fuse: fix fuse dumping for FUSE_WRITE) posted (#2) for review on master by Csaba Henk (csaba)

Comment 2 Worker Ant 2016-09-23 05:34:08 UTC
COMMIT: http://review.gluster.org/15525 committed in master by Raghavendra G (rgowdapp) 
------
commit 3bfdcdcdfa04a12483a490fb6f766fd6689663a9
Author: Csaba Henk <csaba>
Date:   Mon Sep 19 03:58:15 2016 +0200

    fuse: fix fuse dumping for FUSE_WRITE
    
    Data coming with FUSE_WRITE requests are arranged
    with a special alignment, cf. 15d85ff1. fuse_dumper()
    was not aware of this and didn't dump the proper
    reqion for FUSE_WRITE.
    
    BUG: 1377427
    Signed-off-by: Csaba Henk <csaba>
    Change-Id: I36255ca3336e95be6e2d256c8199761ddec41869
    Reviewed-on: http://review.gluster.org/15525
    Smoke: Gluster Build System <jenkins.org>
    Reviewed-by: Raghavendra G <rgowdapp>
    Tested-by: Raghavendra G <rgowdapp>
    CentOS-regression: Gluster Build System <jenkins.org>
    NetBSD-regression: NetBSD Build System <jenkins.org>

Comment 3 Shyamsundar 2017-03-06 17:26:53 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-3.10.0, please open a new bug report.

glusterfs-3.10.0 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] http://lists.gluster.org/pipermail/gluster-users/2017-February/030119.html
[2] https://www.gluster.org/pipermail/gluster-users/