OpenAFS client does not flush pages for new empty files

Bug #1263158 reported by Chris J Arges
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
openafs (Ubuntu)
Fix Released
Undecided
Unassigned
Precise
Fix Released
Medium
Chris J Arges
Quantal
Fix Released
Medium
Chris J Arges

Bug Description

[ Impact ]

This affects all versions with Linux kernel commit a32ea1e1f925399e0d81ca3f7394a44a6dafa12c. This includes v2.6.23 to the most recent kernel.

This affects precise and quantal versions.

An upstream fix for 1.6.x clients is here:
http://git.openafs.org/?p=openafs.git;a=patch;h=ad4e634051e18fa5bd07016b6405e53e236c2f45

Essentially this patch ensures we flush pages for empty files.

[ Test Case ]

Consider two OpenAFS clients: client A and client B. Client B is running Linux kernel v2.6.23 or higher, and client A is running on any platform:

 1. Client A creates a new file
 2. Client B reads the new, empty file
 3. Client A writes data to the new file
 4. Client B reads the new, now non-empty file again

Client B will now read 4096 of NUL bytes, followed by the actual file data. If an application is copying file data out of AFS, or to another location in AFS, this error will become permanent, since the NUL bytes are stored in a new file.

Note that this issue only occurs for files that have never contained any data. In the above example, if client A had truncated an existing non-empty file to 0 bytes instead of creating a new empty file, the issue would not occur.

The most common occurrence of this issue tends to be when client A is copying a large file into AFS, and client B is trying to read the file as it is being copied. Client A will create the empty file as soon as it starts copying, but the file contents will not be written to the fileserver until later.

[ Regression Potential ]

This is an upstream patch, and this code is present in versions in Raring and beyond.
A test build has been used to verify this fix already.

Chris J Arges (arges)
Changed in openafs (Ubuntu):
status: New → Fix Released
Changed in openafs (Ubuntu Precise):
assignee: nobody → Chris J Arges (arges)
Changed in openafs (Ubuntu Quantal):
assignee: nobody → Chris J Arges (arges)
Changed in openafs (Ubuntu Precise):
importance: Undecided → Medium
Changed in openafs (Ubuntu Quantal):
importance: Undecided → Medium
Changed in openafs (Ubuntu Precise):
status: New → In Progress
Changed in openafs (Ubuntu Quantal):
status: New → In Progress
Revision history for this message
Chris J Arges (arges) wrote :

uploaded for P/Q

Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Chris, or anyone else affected,

Accepted openafs into precise-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/openafs/1.6.1-1+ubuntu0.3 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in openafs (Ubuntu Precise):
status: In Progress → Fix Committed
tags: added: verification-needed
Changed in openafs (Ubuntu Quantal):
status: In Progress → Fix Committed
Revision history for this message
Brian Murray (brian-murray) wrote :

Hello Chris, or anyone else affected,

Accepted openafs into quantal-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/openafs/1.6.1-2+ubuntu2.2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Revision history for this message
Chris J Arges (arges) wrote :

Verified in P/Q.

tags: added: verification-done-precise verification-done-quantal
removed: verification-needed
tags: added: verification-done
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package openafs - 1.6.1-2+ubuntu2.2

---------------
openafs (1.6.1-2+ubuntu2.2) quantal; urgency=low

  * 0013-afs-Do-not-skip-flushing-pages-for-dv-0-files.patch:
    Fix files with NUL in first 4096 bytes (LP: #1263158)
 -- Chris J Arges <email address hidden> Fri, 20 Dec 2013 10:58:10 -0600

Changed in openafs (Ubuntu Quantal):
status: Fix Committed → Fix Released
Revision history for this message
Scott Kitterman (kitterman) wrote : Update Released

The verification of the Stable Release Update for openafs has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package openafs - 1.6.1-1+ubuntu0.3

---------------
openafs (1.6.1-1+ubuntu0.3) precise; urgency=low

  * 0013-afs-Do-not-skip-flushing-pages-for-dv-0-files.patch:
    Fix files with NUL in first 4096 bytes (LP: #1263158)
 -- Chris J Arges <email address hidden> Thu, 19 Dec 2013 17:57:47 -0600

Changed in openafs (Ubuntu Precise):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.