Comments about FreeBSD threading from Apache people

Craig Rodrigues rodrigc at crodrigues.org
Wed Nov 12 20:49:38 PST 2003


Hi,

I compiled httpd-2.0.47 from apache.org, and compiled
the latest APR from ports with threading (-lc_r) enabled.
This was with a -CURRENT, cvsup'd from last week.

I was able to reproduce the behavior that Justin
Erenkrantz outlined with libc_r.
I then added the following to /etc/libmap.conf:

[/opt/home/rodrigc/httpd/bin/httpd]
libc_r.so libkse.so
libc_r.so.5 libkse.so.1

At this point, Apache worked fine. 

So, I can understand from the Apache point of view
why they don't want to enable threads by default
in APR.  This whole discussion came about because
I maintain the APR port for FreeBSD, and recently
tried to push some threading configury fixes
upstream back to the APR maintainers, and they balked.

I'd still like to push my APR changes upstream to them,
but maybe with threads disabled by default on FreeBSD,
instead of enabled by default as I had in my patch.

How close are we to having libkse as the default
threading library on FreeBSD?  The ports maintainers
define PTHREAD_LIBS to be -pthread on older FreeBSD's,
and -lc_r on newer ( > 500016) and do not tell people
to explicitly link to -lkse.

Thanks.

-- 
Craig Rodrigues        
http://crodrigues.org
rodrigc at crodrigues.org


On Mon, Nov 10, 2003 at 07:58:26PM -0500, Craig Rodrigues wrote:
> ----- Forwarded message from Justin Erenkrantz <justin at erenkrantz.com> -----
> X-Originating-IP: [216.220.40.247]
> Mailing-List: contact dev-help at apr.apache.org; run by ezmlm
> Delivered-To: mailing list dev at apr.apache.org
> Date: Mon, 10 Nov 2003 16:51:24 -0800
> From: Justin Erenkrantz <justin at erenkrantz.com>
> To: Craig Rodrigues <rodrigc at crodrigues.org>
> Cc: dev at apr.apache.org
> Subject: Re: [PATCH] FreeBSD threads configure support
> 
> Roughly, the test case is fairly simple and is as follows:
> 
> - Build threaded APR (--enable-threads) and httpd with worker MPM
> (--with-mpm=worker)
> - Start httpd with worker MPM (default config okay - 2+ processes required!)
> - Issue an HTTP request against the httpd (i.e. apachectl status)
> - *no response yet*
> - Issue another connection and request against the same httpd (i.e. another
> window w/apachectl status or whatnot)
> - *Response from 1st request is returned*
> - *No response to 2nd request yet*
> - Issue another connection
> - *Response from 2nd*
> - *No response from 3rd until 4th request, etc, etc, etc*
> 
> This worker MPM code works correctly on Linux, Solaris, AIX, Darwin, etc,
> so we believe our pthread API usage in APR is correct.  But, perhaps
> someone familiar with FreeBSD can shed some more light on this.  (If you
> could pass along to David, that might be helpful!)
> 
> We know 4.x still has this problem, and we believe 5.0 had it (at least the
> original 5.0 did), too.  But, I don't have access to a FreeBSD 5.x box to
> test this.
> 
> HTH.  -- justin
> 
> ----- End forwarded message -----
> _______________________________________________
> freebsd-threads at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-threads
> To unsubscribe, send any mail to "freebsd-threads-unsubscribe at freebsd.org"


More information about the freebsd-threads mailing list