apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <trawi...@bellsouth.net>
Subject threads on FreeBSD - disable?
Date Thu, 15 Feb 2001 19:15:18 GMT
Threads on at least some FreeBSD releases have issues.

I almost always use the prefork MPM on my FreeBSD (3.4) box.  A few
days ago, Apache started building APR with thread support even though
we're using the prefork MPM.  That is clearly the right thing to do
*in general.*

Unfortunately, weird stuff started happening with my regression
tests on FreeBSD 3.4 at this point.  To make an extremely long story
short, under certain test conditions a file which was opened O_RDONLY
was actually O_WRONLY, as verified by fcntl(,F_GETFL,) immediately
after the open().  Turning off thread support avoided the problem.
(Note that the symptom as exhibited in the APR app was quite hard to
track down to the file not being readable.)

We've noticed other "issues" with threads on FreeBSD, such as breakage
with threads+sendfile+poll.

Greg Ames picked up some undesired behavior with Apache/prefork on
FreeBSD 4.2 in the last couple of days which went away when he added
--disable-threads to his configure invocation.

So far it seems counterproductive to build a threaded APR app on
FreeBSD.  I suggest that APR needs logic like the following:

  if FreeBSD:
    if --enable-threads specified,
      abort configure with an error message
      configure without thread support

Maybe other apps work fine (so far :) ) using threaded APR on BSD?

Thoughts?  It is pretty sucky to disable thread support, but it is
even worse to present it as working and end up tracking down weird
problems caused by the way we tickle the thread library or perhaps
just the thread library itself.

Jeff Trawick | trawickj@bellsouth.net | PGP public key at web site:
             Born in Roswell... married an alien...

View raw message