Bug 765512 (GLUSTER-3780)

Summary: Short read from open file
Product: [Community] GlusterFS Reporter: Joe Julian <joe>
Component: fuseAssignee: Csaba Henk <csaba>
Status: CLOSED DUPLICATE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 3.1.7CC: gluster-bugs, raghavendra
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Csaba Henk 2011-11-03 21:24:51 UTC
This is known in our lore as the "ping vs tail" issue, cf.

http://bugs.gluster.com/show_bug.cgi?id=801#c27

There is a fix for this (technically verifired, but not yet in tree for various releng reasons): http://review.gluster.com/56 -- please try and report your experience.

*** This bug has been marked as a duplicate of bug 801 ***

Comment 1 Joe Julian 2011-11-04 00:03:34 UTC
I get this occasionally from mysql "alter table"s and frequently with bazaar. I think this strace is showing a short read on a file that's still open for writing:

open("/mnt/gluster/web2/web/.bzr/repository/upload/per4j8lrk16ku1w9ns4k.pack", O_WRONLY|O_CREAT|O_TRUNC, 0664) = 5
fstat(5, {st_mode=S_IFREG|0664, st_size=0, ...}) = 0
close(5)                                = 0
open("/mnt/gluster/web2/web/.bzr/repository/upload/per4j8lrk16ku1w9ns4k.pack", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 5
fstat(5, {st_mode=S_IFREG|0664, st_size=0, ...}) = 0
fstat(5, {st_mode=S_IFREG|0664, st_size=0, ...}) = 0
fstat(5, {st_mode=S_IFREG|0664, st_size=0, ...}) = 0
write(5, "Bazaar pack format 1 (introduced"..., 78065) = 78065
open("/mnt/gluster/web2/web/.bzr/repository/upload/per4j8lrk16ku1w9ns4k.pack", O_RDONLY) = 8
fstat(8, {st_mode=S_IFREG|0664, st_size=73728, ...}) = 0
fstat(8, {st_mode=S_IFREG|0664, st_size=73728, ...}) = 0
mmap(NULL, 131072, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaaaacf4000
lseek(8, 0, SEEK_SET)                   = 0
read(8, "Bazaar pack format 1 (introduced"..., 131072) = 73728
lseek(8, 0, SEEK_SET)                   = 0
read(8, "Bazaar pack format 1 (introduced"..., 131072) = 73728
lseek(8, 4103, SEEK_CUR)                = 77831
read(8, "", 131072)                     = 0