Date: Thu, 23 Nov 2006 09:49:23 -0500 From: Jim Pingle <lists@pingle.org> To: Dominik Zalewski <dzalewski@open-craft.com> Cc: freebsd-stable@freebsd.org Subject: Re: php in free(): error: junk pointer, too high to make sense Message-ID: <4565B4F3.3010801@pingle.org> In-Reply-To: <200611231335.55379.dzalewski@open-craft.com> References: <200611231335.55379.dzalewski@open-craft.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4565B4F3.3010801>