Date: Thu, 17 Mar 2005 19:04:00 GMT From: Zach Metzinger <zmetzing@warthog.com> To: freebsd-gnats-submit@FreeBSD.org Subject: kern/78953: smbfs getdirentries() failure causes CVS to fail Message-ID: <200503171904.j2HJ40qG023760@www.freebsd.org> Resent-Message-ID: <200503171910.j2HJA2eA090556@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 78953 >Category: kern >Synopsis: smbfs getdirentries() failure causes CVS to fail >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Mar 17 19:10:02 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Zach Metzinger >Release: FreeBSD 4.10-RELEASE #0 >Organization: >Environment: FreeBSD infidel 4.10-RELEASE FreeBSD 4.10-RELEASE #0: Thu Sep 16 12:24:40 CDT 2004 zmetzing@infidel:/usr/src/sys/compile/INFIDEL i386 >Description: I had my CVSROOT pointing to a directory on an smbfs mounted share (detailed below). My CVS local working repository was on a traditional ufs filesystem. When I ran cvs update on a specific subdirectory of my local working directory, CVS complained that it could not access the directory in the repository. I failed to capture the exact error message from CVS, but I do have the truss(1) output: open("/remotefs/software/scm/Matlab/work/gpib",0x4,027757771374) = 4 (0x4) fstat(4,0xbfbff410) = 0 (0x0) fcntl(0x4,0x2,0x1) = 0 (0x0) __sysctl(0xbfbff2c8,0x2,0x282c5c20,0xbfbff2c4,0x0,0x0) = 0 (0x0) fstatfs(0x4,0xbfbff310) = 0 (0x0) getdirentries(0x4,0x80c8000,0x1000,0x80c08f4) = 3960 (0xf78) getdirentries(0x4,0x80c8000,0x1000,0x80c08f4) = 3960 (0xf78) getdirentries(0x4,0x80c8000,0x1000,0x80c08f4) = 3960 (0xf78) getdirentries(0x4,0x80c8000,0x1000,0x80c08f4) = 1848 (0x738) getdirentries(0x4,0x80c8000,0x1000,0x80c08f4) ERR#9 'Bad file descriptor' lseek(4,0x0,0) = 0 (0x0) close(4) = 0 (0x0) Comparing this to a getdirentries() call on a non-problem directory, it seems that the difference is the last getdirentries() call returning with an error instead of just a read of length 0 (signalling the end of directory information). Mounted share from OS=[Windows Server 2003 3790] Server=[Windows Server 2003 5.2] as: //SOMEUSER@SOMESERVER/SOFTWARE on /remotefs/software (smbfs) I then used a MS Windows version of CVS to add a new file to this repository directory. Now the problem doesn't happen and getdirentries() returns as expected: open("/remotefs/software/scm/Matlab/work/gpib",0x4,02640) = 5 (0x5) fstat(5,0xbfbff410) = 0 (0x0) fcntl(0x5,0x2,0x1) = 0 (0x0) __sysctl(0xbfbff2c8,0x2,0x282c5c20,0xbfbff2c4,0x0,0x0) = 0 (0x0) fstatfs(0x5,0xbfbff310) = 0 (0x0) getdirentries(0x5,0x80c8000,0x1000,0x80cd5d4) = 3960 (0xf78) getdirentries(0x5,0x80c8000,0x1000,0x80cd5d4) = 3960 (0xf78) getdirentries(0x5,0x80c8000,0x1000,0x80cd5d4) = 3960 (0xf78) getdirentries(0x5,0x80c8000,0x1000,0x80cd5d4) = 2112 (0x840) getdirentries(0x5,0x80c8000,0x1000,0x80cd5d4) = 0 (0x0) lseek(5,0x0,0) = 0 (0x0) close(5) = 0 (0x0) I then removed the new file from the CVS directory and got the same non-failure results as above. I have packet captures from this session for the failure case. Send me email and I will forward the capture file. >How-To-Repeat: Unknown.. Hasn't happened again. Possibly happens on NT directory sizes of (exactly or multiples of) 13728 with nbytes = 3960. >Fix: Possibly ignore flaky behavior from Windows 2003 file server at end-of-directory, or could be a problem with the request on the FBSD side. >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200503171904.j2HJ40qG023760>