Date: Fri, 8 Jan 1999 09:21:48 -0600 From: "Richard Seaman, Jr." <dick@tar.com> To: Tony Finch <dot@dotat.at> Cc: current@FreeBSD.ORG Subject: Re: Squid + linuxthreads in action Message-ID: <19990108092148.A377@tar.com> In-Reply-To: <E0zxzBQ-0007Tt-00@fanf.noc.demon.net>; from Tony Finch on Wed, Jan 06, 1999 at 08:04:00PM %2B0000 References: <E0zxzBQ-0007Tt-00@fanf.noc.demon.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Jan 06, 1999 at 08:04:00PM +0000, Tony Finch wrote: > We've been trying out Squid compiled to use async-io with linuxthreads > on FreeBSD-current today. It required a bit of fiddling to work around > incorrect assumptions in Squid's build and configuration stuff: > > To CFLAGS I added: -D_THREAD_SAFE -DLINUXTHREADS -I/usr/local/include > To XTRA_LIBS I added: -kthread > > I modified src/aiops.c and src/main.c to test for _SQUID_LINUX_THREADS_ > instead of (defined(_SQUID_LINUX_) && USE_ASYNC_IO) and altered > include/config.h.in to define _SQUID_LINUX_THREADS_ in the appropriate > situations. > > After running `configure` I had to edit src/Makefile to remove > -pthread from LDFLAGS. (It would be better for the long term to alter > configure.in and rebuild configure, but...) > > Squid then compiles and runs OK, apart from a few things: > > When the parent Squid process shuts down it leaves behind a pile of > orphan processes (the async-io handler threads). A glance at the aio > code reveals that Squid expects the pthread library to kill them -- > they just loop indefinitely. They also keep the listen socket open, so > the RunCache script can't restart Squid :-( Ok. I finally got squid compiled and running. When I do any of the following: squid -k shutdown squid -k kill squid -k interrupt all the squid processes get killed. After a short time squid restarts (I assume this is RunCache that does this). I seem to get 18 processes (threads) going. When you say you get orphan processes, is this what you're doing? -- Richard Seamman, Jr. email: dick@tar.com 5182 N. Maple Lane phone: 414-367-5450 Chenequa WI 53058 fax: 414-367-5852 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990108092148.A377>