CIFS truncates files resulting in data corruption

Bug #193659 reported by jafa
4
Affects Status Importance Assigned to Milestone
linux-source-2.6.22 (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: linux-image-2.6.22-14-xen

Test situation:

Server running Gutsy with samba share.
Client running Gutsy with share mounted using cifs.

Files on the share as accessed by the client are often reported as shorter than actual when the server is under load.

There was a CIFS fix in the .23 kernel which may be the solution to the problem:
- CIFS: fix corruption when server returns EAGAIN (#357001)

Our specific test case:

The samba server is a Xen dom0. The share has a large number of jpeg files (>100 000).
The client is a domU on the same hardware.
16 shell scripts were generated to run "convert" on 1/16th of the images.
The 16 shell scripts run in parallel.

A percentage fail with the error:
convert: Corrupt JPEG data: premature end of data segment

Likewise an attempt to cp can result in a file shorter than actual when under the above load.

Nick

Revision history for this message
Ralph Janke (txwikinger) wrote :

Thanks for this report.

Could you please test this against the latest kernel in hardy and tell us if the problem still occurs there?

Thanks

Changed in linux-source-2.6.22:
assignee: nobody → txwikinger
status: New → Incomplete
Revision history for this message
jafa (jafa) wrote :

Hi,

Update...

When we first set up the samba client connection we used smbfs (old habit).
This resulted in a large number of random IO errors (including the "premature end of data segment" errors).

We tested one file in detail - it was ok on the server and truncated on the client.

We then switched to cifs.
This fixed all errors except the "premature end of data segment" errors.

After further investigation we discovered that the failing files were truncated on the server filesystem.
Restoring from a backup fixed the problem. All files converted reliably using cifs.

Our thinking is that the smfs client somehow resulted the server truncating files.

We have not seen any further problems with cifs.

Nick

Revision history for this message
Leann Ogasawara (leannogasawara) wrote :

Hi Jafa,

Thanks for the update. I'm going to go ahead and close this report. Thanks!

Changed in linux-source-2.6.22:
status: Incomplete → Invalid
Ralph Janke (txwikinger)
Changed in linux-source-2.6.22:
assignee: txwikinger → nobody
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.