Date: Wed, 6 Jan 1999 20:04:00 +0000 From: Tony Finch <dot@dotat.at> To: current@FreeBSD.ORG Subject: Squid + linuxthreads in action Message-ID: <E0zxzBQ-0007Tt-00@fanf.noc.demon.net>
next in thread | raw e-mail | index | archive | help
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 :-( Also, it crashed hard after several minutes under load. This might have been due to us using softupdates with ccd rather than the threads stuff. Tony. -- f.a.n.finch dot@dotat.at fanf@demon.net 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?E0zxzBQ-0007Tt-00>