From owner-freebsd-bugs Fri Sep 27 0:20:11 2002 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 C564B37B43E for ; Fri, 27 Sep 2002 00:20:03 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 802B743E42 for ; Fri, 27 Sep 2002 00:20:03 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.6/8.12.6) with ESMTP id g8R7K3Co018947 for ; Fri, 27 Sep 2002 00:20:03 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.6/8.12.6/Submit) id g8R7K3Ag018946; Fri, 27 Sep 2002 00:20:03 -0700 (PDT) Date: Fri, 27 Sep 2002 00:20:03 -0700 (PDT) Message-Id: <200209270720.g8R7K3Ag018946@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Maxim Konovalov Subject: Re: misc/41792: lseek after ftruncate fails Reply-To: Maxim Konovalov Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org The following reply was made to PR misc/41792; it has been noted by GNATS. From: Maxim Konovalov To: bug-followup@freebsd.org Cc: Subject: Re: misc/41792: lseek after ftruncate fails Date: Fri, 27 Sep 2002 11:19:46 +0400 (MSD) Add to the audit trail. ---------- Forwarded message ---------- Date: Thu, 26 Sep 2002 15:53:34 -0700 (PDT) From: yury izrailevsky To: Maxim Konovalov Subject: Re: misc/41792: lseek after ftruncate fails I was wrong -- it doesn't fail locally. Consistently fails over an NFS mount though. Privet. I-Opa --- Maxim Konovalov wrote: > > Hello, > > [...] > > >Environment: > > FreeBSD 4.6.1-RELEASE-p10 > > >Description: > > File operation problem. Running the > following: > > > > write(fd, buffer, 8K); > > ftruncate(fd, 0); > > write(fd, buffer, 1); > > off = lseek(fd, 0, SEEK_END); > > printf("%d", off); > > > > Output: 24576, expected: 1. > > Can't reproduce on 4.6-STABLE: > > $ uname -a > FreeBSD golf.macomnet.net > 4.6-20020805-MACOMNET-STABLE FreeBSD > 4.6-20020805-MACOMNET-STABLE #19: Fri Sep 20 > 17:09:52 MSD 2002 > maxim@golf.macomnet.net:/usr/obj/usr/src/sys/GOLF > i386 > $ rm test.file > $ ./trunc > file offset=1, expected 1 > $ ls -l test.file > -rw-r--r-- 1 maxim staff 1 23 ΣΕΞ 13:55 test.file > $ > > > The size of the actual file is 1 (if you ls -l on > it). However, > > lseek goes way past it... > > > > Noticed this while running connectathon rewind > test (part of special > > test suite). But fails even if don't go over NFS > but just run on the > > local file system. > > > > I suspect the problem is with the FS cache. Or > perhaps lseek and/or > > ftruncate are just broken... > > [...] > > -- > Maxim Konovalov, maxim@FreeBSD.org > > __________________________________________________ Do you Yahoo!? New DSL Internet Access from SBC & Yahoo! http://sbc.yahoo.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message