From owner-freebsd-bugs@FreeBSD.ORG Thu Mar 17 19:10:03 2005 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 016F116A4CE for ; Thu, 17 Mar 2005 19:10:03 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id AD3F443D41 for ; Thu, 17 Mar 2005 19:10:02 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j2HJA20n090557 for ; Thu, 17 Mar 2005 19:10:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j2HJA2eA090556; Thu, 17 Mar 2005 19:10:02 GMT (envelope-from gnats) Resent-Date: Thu, 17 Mar 2005 19:10:02 GMT Resent-Message-Id: <200503171910.j2HJA2eA090556@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Zach Metzinger Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 50CFB16A4CE for ; Thu, 17 Mar 2005 19:04:01 +0000 (GMT) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id 21F5743D41 for ; Thu, 17 Mar 2005 19:04:01 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.13.1/8.13.1) with ESMTP id j2HJ40B9023761 for ; Thu, 17 Mar 2005 19:04:00 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.13.1/8.13.1/Submit) id j2HJ40qG023760; Thu, 17 Mar 2005 19:04:00 GMT (envelope-from nobody) Message-Id: <200503171904.j2HJ40qG023760@www.freebsd.org> Date: Thu, 17 Mar 2005 19:04:00 GMT From: Zach Metzinger To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-2.3 Subject: kern/78953: smbfs getdirentries() failure causes CVS to fail X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Mar 2005 19:10:03 -0000 >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: