From owner-freebsd-stable@FreeBSD.ORG Thu Nov 23 14:49:29 2006 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2DF3616A416 for ; Thu, 23 Nov 2006 14:49:29 +0000 (UTC) (envelope-from lists@pingle.org) Received: from willow.pingle.org (willow.pingle.org [208.149.144.13]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6D6A143D66 for ; Thu, 23 Nov 2006 14:48:53 +0000 (GMT) (envelope-from lists@pingle.org) Received: from localhost (unknown [127.0.0.1]) by willow.pingle.org (Postfix) with ESMTP id A4B251144D; Thu, 23 Nov 2006 09:49:27 -0500 (EST) Received: from willow.pingle.org ([127.0.0.1]) by localhost (willow.pingle.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 44033-03; Thu, 23 Nov 2006 09:49:26 -0500 (EST) Received: from [192.168.0.4] (josie.pingle.org [209.125.59.4]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by willow.pingle.org (Postfix) with ESMTP id 3DDCB11448; Thu, 23 Nov 2006 09:49:25 -0500 (EST) Message-ID: <4565B4F3.3010801@pingle.org> Date: Thu, 23 Nov 2006 09:49:23 -0500 From: Jim Pingle User-Agent: Thunderbird 1.5.0.8 (Windows/20061025) MIME-Version: 1.0 To: Dominik Zalewski References: <200611231335.55379.dzalewski@open-craft.com> In-Reply-To: <200611231335.55379.dzalewski@open-craft.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: amavisd-new at pingle.org Cc: freebsd-stable@freebsd.org Subject: Re: php in free(): error: junk pointer, too high to make sense X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Nov 2006 14:49:29 -0000 Dominik Zalewski wrote: > I'm using FreeBSD 6.1 release on i386. I have a problem with pear and apache. > Here is what I'm getting: > > [root@silicon ~]# pear list > Installed packages, channel pear.php.net: > ========================================= > Package Version State > Archive_Tar 1.3.1 stable > Console_Getopt 1.2 stable > DB 1.7.6 stable > Date 1.4.7 stable > Log 1.9.9 stable > PEAR 1.4.11 stable > XML_RPC 1.5.0 stable > php in free(): error: junk pointer, too high to make sense > Abort trap: 6 (core dumped) > > apache 2.2.3 and php-4.4.4_1 is working fine but everytime I restart it throws > core dump. > > Any ideas? I have seen this with PHP for a long time, with PHP 4.x-5.x. While it isn't the exact same context in which you're getting the error, the source may be the same. After I rebuild PHP extensions and restart Apache (1.3 or 2.2, doesn't matter which) or invoke PHP from the command line, PHP crashes and/or takes Apache down with it. Here are the errors that tend to show up for me: * exited on signal 11 (core dumped) * exited on signal 6 (core dumped) * seg fault or similar nasty error detected in the parent process * httpd in free(): error: junk pointer, too high to make sense I'm not sure if it's a problem inherent to how the ports system builds and installs the extensions or if it's just a problem in general. I had read somewhere that rebuilding extensions in a certain order would fix it. However, after some experimenting I found that rebuilding the extensions doesn't really matter, but the order of the extensions being loaded does. Rebuilding fixed it because when a php extension port is rebuilt, it gets placed at the end of extensions.ini. I solved the problem by editing /usr/local/etc/php/extensions.ini and placing the lines for mysql, imap, and sockets at the end and in that order: ... extension=mysql.so extension=imap.so extension=sockets.so I'm not sure if the conflict is only with those three, or with others as well, but that fixes it on my servers. I tried it on three different setups, and before the change they all crashed and after the change they're all running OK. I was never sure if I should file a PR about it because it could easily be a PHP problem and have nothing to do with FreeBSD or the ports system specifically. I haven't had time to research it any more to get enough information to figure out where the problem lies and with whom the bug report should be filed (i.e. try building directly and not from ports, install Fedora and try there, etc) Hope this helps! If not, it will at least be in the archives for future searches. Jim