Subject: Re: apache + ap-perl = abort trap
To: Johnny Lam <jlam@pkgsrc.org>
From: Dieter Baron <dillo@danbala.tuwien.ac.at>
List: tech-userlevel
Date: 01/03/2006 19:51:30
On Tue, Jan 03, 2006 at 12:19:04PM -0500, Johnny Lam wrote:
> Dieter Baron wrote:
> >
> >after upgrading to NetBSD/i386 3.0 (from 2.0) and recompiling all
> >packages (from current pkgsrc as of about a week ago), apache exits
> >with abort trap on startup when loading mod_perl.  [It worked under
> >2.0, but I don't know how recent the packages were.]
> >
> >  The abort happens in libc's fgetc, somewhere in the file locking
> >code; recompiling apache with CFLAGS+=-pthread fixes the problem.  It
> >looks like the old problem of a non-threaded executable (apache)
> >loading a threaded library (perl is built with threads support).
> >  
> >  Has this been / should this be fixed in libc?
> >
> >  Should I add a threads option to www/apache, which adds -pthread to
> >CFLAGS (at least on NetBSD)?
> 
> I thought NetBSD 3.0 didn't suffer from this problem.  dlopen.builtin.mk 
> thinks that the problem was fixed after NetBSD-2.99.10.  If it's not, 
> then we should add NetBSD<=3.0 to the list in dlopen.builtin.mk of 
> platforms that require pthreads when using dlopen().  Can you test to 
> see if that makes apache + ap-perl on your system work correctly?

  Yes, thanks, that fixes my problem (as it links httpd against
libpthread).

  Could someone with current please test if it works there without
libpthread?  Perhaps the problem is that apache loads the library
while reading from a file via stdio (fgets(); dlopen(); fgets()).

					yours,
					dillo