Bug 202491

Summary: Reading files on CIFS mount fails: "CIFS VFS: Send error in read = -13"
Product: [Fedora] Fedora Reporter: Emily Brantley <koneko.em>
Component: sambaAssignee: Simo Sorce <ssorce>
Status: CLOSED CURRENTRELEASE QA Contact: David Lawrence <dkl>
Severity: high Docs Contact:
Priority: medium    
Version: 5CC: jplans, pb, wtogami
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: 3.0.24-1.fc6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-03-14 15:11:32 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
smb.conf from RHEL4 as requested in #10
none
anonymized log with log level 10 as requested in #10 none

Description Emily Brantley 2006-08-14 19:37:31 UTC
Description of problem:

A share mounted using the CIFS mounts correctly.  Files can be viewed, listed,
created, written to.  Files cannot be read.  Kernel dmesg log reports only:  

"CIFS VFS: Send error in read = -13"


Version-Release number of selected component (if applicable):

$ uname -r
2.6.17-1.2174_FC5smp

Steps to Reproduce:
1. mount -t cifs //192.168.1.14/share /media/share -o user=user -o password=pass 
2. cd /media/share
3. cat file.txt
  
Actual results:

$ cat file.txt
cat: two girls.txt: Permission denied

Expected results:

$ cat file.txt
[file contents here...]

Additional info:

CIFS shares browsed other ways (SMB kioslave, gnome-vfs) work normally.

Comment 1 Emily Brantley 2006-08-14 19:40:43 UTC
Sorry, when I pasted the "Actual results":

$ cat file.txt
cat: two girls.txt: Permission denied

I accidentally pasted the name of an actual file on my share instead of some
generic file like I was trying to do (a story on my drive).  It's meant to be
"file.txt" like the rest, not just some mistake.

Also, trying to do cat as root makes no difference.

Comment 2 Christopher Brown 2006-08-28 12:34:42 UTC
Hey Emily,

I was seeing this also. This is a known bug upstream which is fixed in 3.0.23b.
You can get this here:

http://us1.samba.org/samba/ftp/Binary_Packages/Fedora/RPMS/i386/core/5/

however this should really be in the updates repo as I have seen quite a few
people having problems with this and I was banging my head against the wall with
it for a while. I can confirm that downloading, updating and using the above on
the samba server fixes the problem for me.

This is not a samba issue, not a kernel one and I would suggest you change the
component to reflect that above.

Comment 3 Peter Bieringer 2006-09-28 13:14:41 UTC
I have here similar error message, but a different scenario and a different result:

Client: FC5 running kernel-2.6.17-1.2187_FC5 (and earlier)
Server: RHEL4 running samba-3.0.10-1.4E.9

Error message on client side:
kernel:  CIFS VFS: Send error in read = -13

Server side shows in debug log:
  error packet at smbd/reply.c(4602) cmd=36 (SMBlockingX) NT_STATUS_RANGE_NOT_LOCKED
  error packet at smbd/reply.c(2212) cmd=46 (SMBreadX) NT_STATUS_FILE_LOCK_CONFLICT



Symptom:
Opening a document with OpenOffice on client via mounted cifs share works. After
modifying the file, during first time on pressing "save", a message appears like
 "can't create backup copy" and upper shown message appears in kernel log. After
pressing "save" button again, no such message appears (and "save" is successfully).

Can one point me to whether it's more a kernel (client side) or samba (server
side) related problem

Comment 4 Dave Jones 2006-10-16 20:08:59 UTC
A new kernel update has been released (Version: 2.6.18-1.2200.fc5)
based upon a new upstream kernel release.

Please retest against this new kernel, as a large number of patches
go into each upstream release, possibly including changes that
may address this problem.

This bug has been placed in NEEDINFO state.
Due to the large volume of inactive bugs in bugzilla, if this bug is
still in this state in two weeks time, it will be closed.

Should this bug still be relevant after this period, the reporter
can reopen the bug at any time. Any other users on the Cc: list
of this bug can request that the bug be reopened by adding a
comment to the bug.

In the last few updates, some users upgrading from FC4->FC5
have reported that installing a kernel update has left their
systems unbootable. If you have been affected by this problem
please check you only have one version of device-mapper & lvm2
installed.  See bug 207474 for further details.

If this bug is a problem preventing you from installing the
release this version is filed against, please see bug 169613.

If this bug has been fixed, but you are now experiencing a different
problem, please file a separate bug for the new problem.

Thank you.

Comment 5 Peter Bieringer 2006-10-19 15:28:30 UTC
Still happen with 2.6.18-1.2200.fc5

Comment 6 Christopher Brown 2006-10-19 15:36:34 UTC
I do not see this error any longer. It disappeared once I installed the rpm from
the samba ftp and I am now running the latest samba update from the fedora
repos. Perhaps it is a config file or packaging issue? Would someone like to
test by removing samba and trashing all related files and re-install?

Just a thought.

Regards
Chris

Comment 7 Peter Bieringer 2006-10-19 16:05:44 UTC
Server side is running RHEL4 with samba-3.0.10-1.4E.9
Which samba version do you use? Perhaps we have to file a bug against the samba
version of RHEL4.

Comment 8 Dave Jones 2006-10-19 18:03:15 UTC
This does sound more like a userspace server-side samba daemon problem.
You'll need to open a separate bug for RHEL4 if this does turn out to be the case.


Comment 9 Peter Bieringer 2006-10-20 07:37:29 UTC
Hmm, log entries on server side are shonw in 
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=202491#c3

Would this be enough to open the bug against RHEL4 or are there more debug hints
available to isolate the problem. Are there somewhere newer samba packages
available for RHEL4 for testing?

Comment 10 Jose Plans 2006-10-21 17:23:18 UTC
Hello, 
 it's not clear to me how to reproduce your problem.
Could you share your smb.conf with us and describe samba versions that work and
doesnt ?

--
kernel:  CIFS VFS: Send error in read = -13 -> just states the original report
on permission denied.
--

and for the samba logs I wonder whether cifs tried to unlock ranges that werent
locked previously, given : 

--
  error packet at smbd/reply.c(4602) cmd=36 (SMBlockingX) NT_STATUS_RANGE_NOT_LOCKED
  error packet at smbd/reply.c(2212) cmd=46 (SMBreadX) NT_STATUS_FILE_LOCK_CONFLICT
--

So for now, I would suggest to attach to the RHEL4 bug a smb.conf file that
reproduces the problem. and see if you can get some more detailed logs using
"log level = 10" so we can see this happeneing. 10 as the locks are logged at
that level. 
thanks,
       Jose

Comment 11 Peter Bieringer 2006-12-13 16:58:18 UTC
Created attachment 143535 [details]
smb.conf from RHEL4 as requested in #10

Comment 12 Peter Bieringer 2006-12-13 16:59:34 UTC
Created attachment 143536 [details]
anonymized log with log level 10 as requested in #10

Comment 13 Peter Bieringer 2006-12-13 17:02:28 UTC
Steps producing the log:

- start samba server
- mount directory on FC6
- open test.odt with openoffice
- change test.odt
- first try to save test.odt -> error message
- second try to save test.odt -> works
- unmount directory on FC6

FC6 kernel tells:
Dec 13 17:25:41 client kernel:  CIFS VFS: Send error in SETFSUnixInfo = -5
Dec 13 17:26:00 client kernel:  CIFS VFS: Send error in read = -13
Dec 13 17:26:00 client last message repeated 7 times


Comment 14 Christopher Brown 2006-12-13 17:03:09 UTC
I no longer see this.

Comment 15 Simo Sorce 2007-03-14 15:11:32 UTC
Should be fixed with latest updates, reopen if not.

Comment 16 Peter Bieringer 2007-03-14 15:17:42 UTC
This reminds me that this issue is currently still not solved for RHEL4 server
side, the bug hits me every day now (Fedora Core 6 client, RHEL4 server) during
saving OpenOffice files, see also:
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=221852
Hopefully, Red Hat will now take care the RHEL4 serverside also.