Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 7 Oct 2002 11:10:08 -0700 (PDT)
From:      Arne Woerner <woerner@mediabase-gmbh.de>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: kern/43739: cannot open file without obvious reason
Message-ID:  <200210071810.g97IA825093533@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: Arne Woerner <woerner@mediabase-gmbh.de>
To: roam@ringlet.net
Cc: bug-followup@FreeBSD.org, fanf@FreeBSD.org
Subject: Re: kern/43739: cannot open file without obvious reason
Date: Mon, 7 Oct 2002 17:42:18 GMT

 > From roam@ringlet.net Mon Oct  7 17:30:16 2002
 > Date: Mon, 7 Oct 2002 20:21:07 +0300
 > From: Peter Pentchev <roam@ringlet.net>
 > To: Arne Woerner <woerner@mediabase-gmbh.de>
 > Cc: fanf@FreeBSD.org, bug-followup@FreeBSD.org
 > Subject: Re: kern/43739: cannot open file without obvious reason
 > References: <200210071707.g97H7g2F001469@gargano.local.mediabase-gmbh.de>
 > Mime-Version: 1.0
 > Content-Type: text/plain; charset=windows-1251
 > Content-Disposition: inline
 > In-Reply-To: <200210071707.g97H7g2F001469@gargano.local.mediabase-gmbh.de>
 > User-Agent: Mutt/1.5.1i
 > X-Virus-Scanned: by Nik's Monitoring Daemon (AMaViS perl-11d <Tu  28 May 2002 12:55:43 EEST>)
 > X-UIDL: A8<!!jn-!!gg%#!n'O!!
 >
 > On Mon, Oct 07, 2002 at 05:07:42PM +0000, Arne Woerner wrote:
 > > Wrong! Wrong! Wrong! :)
 > > 
 > > Due to the "lockf" it is impossible that there are more than
 > > two ICanDo.sh processes...
 >
 > Uhm.. excuse me?  What is to prevent the SSH session starting up
 > a billion of ICanDo.sh processes?
 >
 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.
 
 > Each SSH session operates in one of the following ways:
 >
 > 1. Log in - this eats a file descriptor for the socket.
 >
 > 2. Start a shell running ICanDo.sh - this eats a couple of file
 >    descriptors for the shell's /bin/sh executable and for the ICanDo.sh
 >    file that the shell needs to read to execute.
 >
 > 3. Start executing ICanDo.sh - at this point, there are at least two
 >    file descriptors consumed by this session on the target host.
 >
 > 4. Start lockf(1) - this needs an additional file descriptor for reading
 >    in the lockf(1)'s executable file.
 >
 > 5. Open the 'gaga' lockfile.
 >
 > 6. Try to flock(2) the 'gaga' lockfile *after having opened it* -
 >    please take a look at the lockf(1), flock(2) and lockf(3) manual
 >    pages; the lockfile needs to be opened in order to be locked.
 >
 > At this step, if the file may not be locked, there are still at least
 > two, maybe up to four file descriptors in use, two of which may not
 > be reclaimed under any circumstances.  So, each of your billion SSH
 > sessions eats up at least two file descriptors.
 >
 No!
 
 > I think somebody should spend a little more time reading the relevant
 > utilities' manual pages :)
 >
 Laa-Laa is cuter than you!
 
 -Arne
 
 "I want to understand..." (Fox Mulder?)

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?200210071810.g97IA825093533>