Maverick corrupts files on samba network shares

Bug #660747 reported by franco_bez
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Nautilus
New
Undecided
Unassigned
samba (Ubuntu)
Confirmed
High
Unassigned

Bug Description

my installtion of Ubuntu 10.10 64Bit Desktop Edition has one severe Problem when using Samba Shares:

When I edit files (i.e. using gedit) that lie on the Network share and I happen to remove some content (making the file smaller in size) and then save the file, The file get's corrupted - the size remains the same as it was before, and when I reopen the file has trailing garbage.

This also happens if I try to overwrite a file with one that is smaller, the result is garbage.

What can I do against it ?

Details:
Always reproductible.
Happens with smb shares that lie on Windows Machines as well as with an Ubuntu Hardy Server's share.
Only my Maverick Machine produces this corruption.
Copying new files works without problems.
Increasing file size also works.
Just when I try to decrease the file size corruption occurs.

The only workaround I have so far is to delete the file on the share, and then copy the new file - quite annoying.

Any Ideas, tips, hint welcome.

---
Architecture: amd64
DistroRelease: Ubuntu 10.10
InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release amd64 (20091027)
Package: samba 2:3.5.4~dfsg-1ubuntu8
PackageArchitecture: amd64
ProcEnviron:
 LANGUAGE=de_DE:de:en_GB:en
 PATH=(custom, user)
 LANG=de_DE.utf8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.35-22.34-generic 2.6.35.4
RelatedPackageVersions:
 nautilus 1:2.32.0-0ubuntu1
 gvfs 1.6.4-0ubuntu1
SambaClientRegression: Yes
Tags: maverick
Uname: Linux 2.6.35-22-generic x86_64
UserGroups: adm admin audio cdrom dialout dip fax floppy fuse lpadmin netdev plugdev sambashare tape vboxusers video

Revision history for this message
franco_bez (franco-bez) wrote :

I can reproduce the bug even on shares that reside on the same machine:

In Nautilus I right-click on a folder and chose "file sharing options" to make it a writable share.

Then, again in Nautilus, I navigate to "network" and mount the share by clicking on it and supplying username and password.

I created a new file on the share "sample.txt" with the following content:
01 sample line of text
02 sample line of text
03 sample line of text
04 sample line of text
05 sample line of text
06 sample line of text
07 sample line of text
08 sample line of text
09 sample line of text
10 sample line of text

Then I removed the lines 02 up to 05 from the file and hit save. Editor shows:
01 sample line of text
06 sample line of text
07 sample line of text
08 sample line of text
09 sample line of text
10 sample line of text

When I reopen the file the new content is:
01 sample line of text
06 sample line of text
07 sample line of text
08 sample line of text
09 sample line of text
10 sample line of text
07 sample line of text
08 sample line of text
09 sample line of text
10 sample line of text

I tried several editors, several servers providing SAMBA shares (Ubuntu Hardy, Windows Vista, and my Maverick notebook)
The result is always the same.

A very, very nasty bug.

Revision history for this message
franco_bez (franco-bez) wrote :

The bug ONLY occurs when the share is mounted via Nautilus.

When I mount the same share using the command line "smbmount" utility (as root) everything works like it should.

Revision history for this message
Scott Moser (smoser) wrote :

I'm marking this as confirmed based on the second report.
I'm not sure if this is necissarily a bug in samba, or if the bug would be in the kernel.

It would be helpful if you could run
  apport-collect 660747

Changed in samba (Ubuntu):
importance: Undecided → High
status: New → Confirmed
Revision history for this message
franco_bez (franco-bez) wrote : Dependencies.txt

apport information

tags: added: apport-collected
description: updated
Revision history for this message
franco_bez (franco-bez) wrote : SambaInstalledVersions.txt

apport information

Revision history for this message
franco_bez (franco-bez) wrote :

This only seems to affect the amd64 Version of Ubuntu 10.10

I tried with a 32bit Installation in Virtualbox - everything is OK.

Revision history for this message
franco_bez (franco-bez) wrote :

The Bug seems to be kernel related.

I restored the last lucid kernel from by backup and using this one the bug is gone.

Latest lucid kernel:
Linux 2.6.32-25-generic #44-Ubuntu SMP Fri Sep 17 20:05:27 UTC 2010 x86_64 GNU/Linux

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

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