Bug 800822 - [228d01916c57d5a5716e1097e39e7aa06f31f3e4] Incorrect read output when md-cache timeout is increased
Summary: [228d01916c57d5a5716e1097e39e7aa06f31f3e4] Incorrect read output when md-cach...
Keywords:
Status: CLOSED DUPLICATE of bug 800833
Alias: None
Product: GlusterFS
Classification: Community
Component: stat-prefetch
Version: mainline
Hardware: Unspecified
OS: Unspecified
high
unspecified
Target Milestone: ---
Assignee: Raghavendra G
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-03-07 10:59 UTC by Anush Shetty
Modified: 2012-03-16 07:58 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-03-16 04:25:53 UTC
Regression: ---
Mount Type: fuse
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description Anush Shetty 2012-03-07 10:59:51 UTC
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 09:52:39 UTC
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 04:25:53 UTC
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 07:58:23 UTC
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.