Date: Mon, 21 Mar 2005 09:32:55 -0800 From: steve@Watt.COM (Steve Watt) To: matthew@digitalstratum.com, Steve Watt <steve@Watt.COM> Cc: hackers@freebsd.org Subject: Re: Causing a process switch to test a theory. Message-ID: <200503211732.j2LHWtvC080349@wattres.watt.com> In-Reply-To: Matthew Hagerty <matthew@digitalstratum.com> "Re: Causing a process switch to test a theory." (Mar 21, 10:05)
next in thread | previous in thread | raw e-mail | index | archive | help
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...
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200503211732.j2LHWtvC080349>