From owner-freebsd-hackers@FreeBSD.ORG Mon Mar 21 17:32:58 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 65BE116A4CE for ; Mon, 21 Mar 2005 17:32:58 +0000 (GMT) Received: from wattres.watt.com (wattres.watt.com [66.93.133.130]) by mx1.FreeBSD.org (Postfix) with ESMTP id 12FD243D31 for ; Mon, 21 Mar 2005 17:32:58 +0000 (GMT) (envelope-from steve@Watt.COM) Received: from wattres.watt.com (localhost.watt.com [127.0.0.1]) by wattres.watt.com (8.13.1/8.13.1) with ESMTP id j2LHWtA5080350 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 21 Mar 2005 09:32:55 -0800 (PST) (envelope-from steve@wattres.watt.com) Received: (from steve@localhost) by wattres.watt.com (8.13.1/8.13.1/Submit) id j2LHWtvC080349; Mon, 21 Mar 2005 09:32:55 -0800 (PST) (envelope-from steve) Message-Id: <200503211732.j2LHWtvC080349@wattres.watt.com> From: steve@Watt.COM (Steve Watt) Date: Mon, 21 Mar 2005 09:32:55 -0800 In-Reply-To: Matthew Hagerty "Re: Causing a process switch to test a theory." (Mar 21, 10:05) X-Mailer: Mail User's Shell (7.2.6 beta(5) 10/07/98) To: matthew@digitalstratum.com, Steve Watt X-Archived: 1111426375.860125595@wattres.Watt.COM X-Virus-Scanned: ClamAV 0.83/778/Mon Mar 21 02:48:43 2005 on wattres.Watt.COM X-Virus-Status: Clean cc: hackers@freebsd.org Subject: Re: Causing a process switch to test a theory. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Mar 2005 17:32:58 -0000 On Mar 21, 10:05, Matthew Hagerty wrote: } Steve Watt wrote: } >In <423DE326.9000203@digitalstratum.com>, } > matthew@digitalstratum.com wrote: } >That's another layer of indirection, though. If all of the children } >have separate pipes to the parent, and then the parent logs to your } >program, all should be fine. } } That's an interesting idea about each child having a pipe open back to } the parent, but I don't think that's what is happening. I'm pretty sure } each child has the logging pipe open directly. Here is an fstat: } There is a grouping like this for each Apache child process that's runing: } genie httpd 61320 root / 2 drwxr-xr-x 512 r } genie httpd 61320 wd / 2 drwxr-xr-x 512 r } genie httpd 61320 text /usr 5110792 -rwxr-xr-x 9766440 r } genie httpd 61320 0 /dev 8 crw-rw-rw- null r } genie httpd 61320 1 /dev 8 crw-rw-rw- null w } genie httpd 61320 2 /usr 5110968 -rw-r--r-- 494192 w } genie httpd 61320 15 /usr 5110968 -rw-r--r-- 494192 w } genie httpd 61320 16 /usr 5110969 -rw-r--r-- 451616 w } genie httpd 61320 17 /usr 5110981 -rw-r--r-- 1056219 w } genie httpd 61320 18 /usr 5111084 -rw-r--r-- 3886425 w } genie httpd 61320 19* internet stream tcp c5d1e2d0 } genie httpd 61320 20 /usr 5111178 prw-rw-rw- 0 w } genie httpd 61320 21 /usr 5111178 prw-rw-rw- 0 w } genie httpd 61320 22 /usr 5111178 prw-rw-rw- 0 w } genie httpd 61320 23 /usr 5111178 prw-rw-rw- 0 w } genie httpd 61320 24 /usr 5110835 -rw-r--r-- 573236 w } } My pipe listener (fd 0), which each child has open 4 times on fd 20 - 23: } root pglogd 519 root / 2 drwxr-xr-x 512 r } root pglogd 519 wd / 2 drwxr-xr-x 512 r } root pglogd 519 text /usr 8528219 -rwxr-xr-x 22793 r } root pglogd 519 0 /usr 5111178 prw-rw-rw- 0 rw } root pglogd 519 1 /usr 5111198 -rw-r--r-- 0 r } root pglogd 519 2 /usr 5111198 -rw-r--r-- 0 w } root pglogd 519 3* local stream c5dcb7a8 <-> c5dcb71c There aren't any pipes in your fstat output, but if I look at my currently running Apache, I see that there are pipes around, and everyone's got the same ones (they're fds 5 and 6 with my config). So yeah, I'd say that you've identified a problem, and it's some combination of good luck that hasn't gotten someone tripped. -- Steve Watt KD6GGD PP-ASEL-IA ICBM: 121W 56' 57.8" / 37N 20' 14.9" Internet: steve @ Watt.COM Whois: SW32 Free time? There's no such thing. It just comes in varying prices...