[Samba] corrupt files... oplocks?

Adam Tauno Williams adamtaunowilliams at gmail.com
Mon Apr 14 19:32:54 GMT 2008


> Suddenly in the past week we have been having users who share excel 
> files via our Samba complain that the file has become corrupt, and also 
> some database files (Orcad .tdb database files). Fortunately there has 
> in each instance been a good copy in the .recycler... so far.
> I came across some docs and threads in the net about oplocks. I did find 
> an error in the samba log:
> [2008/04/14 10:19:05, 0] smbd/oplock.c:oplock_timeout_handler(351)

Were there any other adjacent messages relating to the lock?

I'd suspect a basic network problem before I suspected Samba's locking.

> and there are some other errors that have been in the logs for a long 
> time that we've been ignoring (because we were ignorant & nobody 
> complained of any problems)
> Apr 13 07:14:04 aa-samba smbd[10083]: [2008/04/13 07:14:04, 0] 
> lib/util_sock.c:get_peer_addr(1229)
> Apr 13 07:14:04 aa-samba smbd[10083]:   getpeername failed. Error was 
> Transport endpoint is not connected
> Apr 13 07:14:04 aa-samba smbd[10083]: [2008/04/13 07:14:04, 0] 
> lib/util_sock.c:write_data(562)
> Apr 13 07:14:04 aa-samba smbd[10083]:   write_data: write failure in 
> writing to client 192.168.1.46. Error Connection reset by peer
> Apr 13 07:14:04 aa-samba smbd[10083]: [2008/04/13 07:14:04, 0] 
> lib/util_sock.c:send_smb(769)
> Apr 13 07:14:04 aa-samba smbd[10083]:   Error writing 4 bytes to client. 
> -1. (Connection reset by peer)

These errors are meaningless 99.999% of the time.  Lots of discussion of
these in the list archives.

> Should we add a line disabling oplocks in smb.conf, and if so, what 
> would be the recommended approach?

No, I think it is premature [given just this information] to blame Samba
or oplocks.

I'd root around in dmesg and the interface counters first.  And make
sure you don't have a dying disk (is PFA enabled, if so has it
flipped?).
-- 
          Consonance: an Open Source .NET OpenGroupware client.
 Contact:awilliam at whitemiceconsulting.com   http://freshmeat.net/projects/consonance/



More information about the samba mailing list