Date: Mon, 7 Oct 2002 13:40:08 -0700 (PDT) From: Ian Dowse <iedowse@maths.tcd.ie> To: freebsd-bugs@FreeBSD.org Subject: Re: kern/43739: cannot open file without obvious reason Message-ID: <200210072040.g97Ke8d9050480@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/43739; it has been noted by GNATS. From: Ian Dowse <iedowse@maths.tcd.ie> To: Arne Woerner <woerner@mediabase-gmbh.de> Cc: bug-followup@FreeBSD.org, roam@ringlet.net, fanf@FreeBSD.org Subject: Re: kern/43739: cannot open file without obvious reason Date: Mon, 07 Oct 2002 21:32:02 +0100 In message <200210071810.g97IA825093533@freefall.freebsd.org>, Arne Woerner wri tes: > IT IS THE "LOCKF"! > While the lockf blocks the session will not terminate. And a new > session can only be started as soon as the old session terminates. > See: > ( repeat 1000000000 ssh cyclops ./ICanDo.sh ) < /dev/null & > > I wonder why you both are reading my emails if you do not want to > understand them. I do not spend my time writing bug reports just for > your amusement or to allow you to insult me. Hi Arne, Nobody is trying to insult you, but we do need to ask a few questions to verify the problem, as we get many bogus problem reports that turn out to be misunderstandings or user errors. That is not the case here, but a few pieces of extra information such as the output of fstat and the value of kern.*files would have quickly confirmed to us that there is in fact a real bug. It looks like a fdrop() call in open() (now kern_open) was lost in revision 1.218 of vfs_syscalls.c. It probably wasn't noticed because it is in an error case that would rarely occur in practice. Doing lockf /dev/null ls is a reliable way of repeating the bug, as can be confirmed by monitoring kern.openfiles. The following patch appears to fix it. Ian Index: vfs_syscalls.c =================================================================== RCS file: /dump/FreeBSD-CVS/src/sys/kern/vfs_syscalls.c,v retrieving revision 1.289 diff -u -r1.289 vfs_syscalls.c --- vfs_syscalls.c 2 Oct 2002 09:05:30 -0000 1.289 +++ vfs_syscalls.c 7 Oct 2002 20:13:05 -0000 @@ -773,6 +773,7 @@ fdrop(fp, td); } else FILEDESC_UNLOCK(fdp); + fdrop(fp, td); return (error); } To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200210072040.g97Ke8d9050480>
