Bug 783313 - Possible race between read-ahead and write
Summary: Possible race between read-ahead and write
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: read-ahead
Version: mainline
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: Raghavendra G
QA Contact: Anush Shetty
URL:
Whiteboard:
Depends On:
Blocks: 817967
TreeView+ depends on / blocked
 
Reported: 2012-01-19 22:49 UTC by Jeff Darcy
Modified: 2013-07-24 17:49 UTC (History)
3 users (show)

Fixed In Version: glusterfs-3.4.0
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-07-24 17:49:46 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description Jeff Darcy 2012-01-19 22:49:29 UTC
Description of problem:

Currently, it's possible for a write to occur while a read-ahead is in progress, and nothing is done to interrupt or cancel that read-ahead.  As a result, a user read which is fully subsequent to that write (even if it's O_SYNC) could still get the read-ahead data which is now stale.

How reproducible:

It's a race, found by inspection, so it's probably pretty hard to hit (hasn't been observed in practice except by stopping things in a debugger).  It might be possible to construct a log-tailing test case, as that would leave one process reading just behind where another was writing on the same client.  Meanwhile, since read-ahead is just a performance optimization, it should be safe to disable it when the risk can be anticipated.

Comment 1 Anand Avati 2012-01-30 13:09:43 UTC
CHANGE: http://review.gluster.com/2666 (Fix race between read-ahead and write.) merged in master by Anand Avati (avati)

Comment 2 Anush Shetty 2012-06-04 05:56:13 UTC
This bug was filed as part of the review and was not able to reproduce it. So moving this to verified.


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