From owner-freebsd-current Fri Jan 8 07:22:24 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id HAA05699 for freebsd-current-outgoing; Fri, 8 Jan 1999 07:22:24 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from ns.tar.com (ns.tar.com [204.95.187.2]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id HAA05694 for ; Fri, 8 Jan 1999 07:22:22 -0800 (PST) (envelope-from dick@ns.tar.com) Received: (from dick@localhost) by ns.tar.com (8.9.1/8.9.1) id JAA18484; Fri, 8 Jan 1999 09:21:48 -0600 (CST) (envelope-from dick) Date: Fri, 8 Jan 1999 09:21:48 -0600 From: "Richard Seaman, Jr." To: Tony Finch Cc: current@FreeBSD.ORG Subject: Re: Squid + linuxthreads in action Message-ID: <19990108092148.A377@tar.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95i In-Reply-To: ; from Tony Finch on Wed, Jan 06, 1999 at 08:04:00PM +0000 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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