Bug 800822 - [228d01916c57d5a5716e1097e39e7aa06f31f3e4] Incorrect read output when md-cache timeout is increased
[228d01916c57d5a5716e1097e39e7aa06f31f3e4] Incorrect read output when md-cach...
Status: CLOSED DUPLICATE of bug 800833
Product: GlusterFS
Classification: Community
Component: stat-prefetch (Show other bugs)
mainline
Unspecified Unspecified
high Severity unspecified
: ---
: ---
Assigned To: Raghavendra G
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-07 05:59 EST by Anush Shetty
Modified: 2012-03-16 03:58 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-03-16 00:25:53 EDT
Type: ---
Regression: ---
Mount Type: fuse
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Anush Shetty 2012-03-07 05:59:51 EST
Description of problem: When I increased the timeout in md-cache translator to 20 on a single export volume with 2 fuse clients (writing from one client and reading from another), the read output was truncated towards the end of file. 

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


How reproducible: Consistently


Steps to Reproduce:
1. Client 1: echo 'abc' > dot;
2. Client 2: cat dot
3. Client 1: echo 'sdsdsdnasnfsdnmfsgfds' > dot;
4. Client 2: cat dot
  
Actual results:
[root@RHEL6 mnt]# cat dot
sdsds[root@RHEL6 mnt]# cat dot
sdsds[root@RHEL6 mnt]# cat dot
sdsds[root@RHEL6 mnt]# cat dot
sdsds[root@RHEL6 mnt]# cat dot
sdsds[root@RHEL6 mnt]# cat dot
sdsds[root@RHEL6 mnt]# cat dot
sdsds[root@RHEL6 mnt]# cat dot
sdsds[root@RHEL6 mnt]# cat dot
sdsds[root@RHEL6 mnt]# cat dot
sdsds[root@RHEL6 mnt]# cat dot
sdsds[root@RHEL6 mnt]# cat dot
sdsds[root@RHEL6 mnt]# cat dot
sdsds[root@RHEL6 mnt]# cat dot
sdsdsdnasnfsdnmfsgfds
[root@RHEL6 mnt]# cat dot
sdsdsdnasnfsdnmfsgfds


Additional info: All other performance translators on the client side were disabled. 

Client vol file-
volume dist-client-0
    type protocol/client
    option remote-host 10.1.11.184
    option remote-subvolume /dist1
    option transport-type tcp
end-volume

volume dist-md-cache
    type performance/md-cache
    option timeout 30
    subvolumes dist-client-0
end-volume

volume dist
    type debug/io-stats
    option latency-measurement off
    option count-fop-hits off
    subvolumes dist-md-cache
end-volume
Comment 1 Anush Shetty 2012-03-12 05:52:39 EDT
This issue is seen even with the default timeout value of 1. So changing the priority to high.
Comment 2 Raghavendra G 2012-03-16 00:25:53 EDT
glusterfs is writing to /dev/fuse correct number of bytes. However fuse-kernel module/vfs is returning only so many number of bytes as shown by st_size of stale entry in md-cache for the file. Probably kernel is relying on the st_size to determine the size of file rather than the number of bytes returned as part of read call. However this can be worked around with md-cache timeout as 0. Hence marking this bug as duplicate of 800833

*** This bug has been marked as a duplicate of bug 800833 ***
Comment 3 Anush Shetty 2012-03-16 03:58:23 EDT
Hi Raghu, the issue is seen even with md-cache timeout as 0.

Note You need to log in before you can comment on or make changes to this bug.