From owner-freebsd-ports@FreeBSD.ORG Wed Apr 16 22:48:04 2008 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AB1551065670 for ; Wed, 16 Apr 2008 22:48:04 +0000 (UTC) (envelope-from ocrow@skymind.com) Received: from skink.simplexity.net (skink.simplexity.net [209.209.9.228]) by mx1.freebsd.org (Postfix) with ESMTP id 966C68FC17 for ; Wed, 16 Apr 2008 22:48:04 +0000 (UTC) (envelope-from ocrow@skymind.com) Received: from [10.25.0.105] (adsl-71-135-42-230.dsl.pltn13.pacbell.net [71.135.42.230]) (authenticated bits=0) by skink.simplexity.net (8.14.2/8.14.2) with ESMTP id m3GMlrRT031641 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 16 Apr 2008 15:47:54 -0700 (PDT) (envelope-from ocrow@skymind.com) Message-ID: <48068213.7020005@skymind.com> Date: Wed, 16 Apr 2008 15:47:47 -0700 From: Oliver Crow User-Agent: Thunderbird 2.0.0.12 (Windows/20080213) MIME-Version: 1.0 To: d@delphij.net References: <4806623B.1060304@skymind.com> <48066E6B.8090509@delphij.net> In-Reply-To: <48066E6B.8090509@delphij.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-ports@freebsd.org Subject: Re: PHP CLI bails with threaded libraries X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Apr 2008 22:48:04 -0000 Xin LI wrote: > Oliver Crow wrote: >> I'm looking for advice on a problem with PHP on FreeBSD 7.0, which >> appears to be related to threading. Whenever I run the command line >> 'php' program I get a core dump with a series of error messages: >> >> > Fatal error 'Cannot allocate red zone for initial thread' at line >> 384 in file /usr/src/lib/libthr/thread/thr_init.c (errno = 12) > > You may have to rebuild all related stuff to get rid of this. Linking > against different libc versions is not supported. I did a portupgrade -f lang/php5, and that did the trick! I can now load php extensions such as mhash and pgsql which use libthr without dumping core. I guess this should have clued me in: # ldd /usr/local/bin/php ... libc.so.6 => /lib/libc.so.6 (0x284a3000) ... libc.so.7 => /lib/libc.so.7 (0x285b4000) After the portupgrade ldd shows only libc.so.7 Thanks! Oliver