|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2006-08-20 19:52 UTC] michaelw at darkhorse dot com
Description:
------------
As far as I can tell, PHP 5.1.5 no longer supports --with-mnogosearch in the configure file, forcing me to switch to the PECL extension and the addition of "extension=mnogosearch.so" in the php.ini file.
Once I do that, however, apache will not restart. I get a "BUS ERROR". Removing the call to mnogo allows apache to restart correctly.
In addition, when I have mnogo enabled and I call a script from the CLI, I get the following error when it hits a command like udm_alloc_agent():
php(27466) malloc: *** Deallocation of a pointer not malloced: 0x1; This could be a double free(), or free() called with the middle of an allocated block; Try setting environment variable MallocHelp to see tools to help debug
php(27466) malloc: *** Deallocation of a pointer not malloced: 0x100; This could be a double free(), or free() called with the middle of an allocated block; Try setting environment variable MallocHelp to see tools to help debug
php(27466) malloc: *** Deallocation of a pointer not malloced: 0x2809ae4; This could be a double free(), or free() called with the middle of an allocated block; Try setting environment variable MallocHelp to see tools to help debug
Reproduce code:
---------------
From the command line:
php -r 'Udm_Alloc_Agent("mysql://");' // dsn is irrelevent
Expected result:
----------------
Nothing.
Actual result:
--------------
php(27466) malloc: *** Deallocation of a pointer not malloced: 0x1; This could be a double free(), or free() called with the middle of an allocated block; Try setting environment variable MallocHelp to see tools to help debug
php(27466) malloc: *** Deallocation of a pointer not malloced: 0x100; This could be a double free(), or free() called with the middle of an allocated block; Try setting environment variable MallocHelp to see tools to help debug
php(27466) malloc: *** Deallocation of a pointer not malloced: 0x2809ae4; This could be a double free(), or free() called with the middle of an allocated block; Try setting environment variable MallocHelp to see tools to help debug
And when restarting apache:
/usr/sbin/apachectl: line 193: 27479 Bus error $HTTPD
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Dec 15 12:00:01 2025 UTC |
"Also, I realized that the mnogo extension isn't included as of 5.1.10 but 5.1.14's config script still supported --with-mnogosearch" There is no 5.1.10 or 5.1.14, or do you mean 5.1.0 and 5.1.4? Both versions (and 5.1.5) do not have the mnogosearch configuration option. "Is there some special debug log or tool I could use to help track down the cause of the error?" Compile PHP in debug mode (configure --enable-debug) and run through valgrind or gdb. Valgrind: valgrind php -r 'Udm_Alloc_Agent("mysql://");' GDB (enter at the end of each line > ...<enter>): gdb php > set args -r 'Udm_Alloc_Agent("mysql://");' > run > bt and copy the outputs here (one of them or both).Yeah, I meant 5.1.5. Sorry. I recompiled with --enable-debug, reinstaled the mnogo pecl extension, changed the php.ini file to point to the new, debug extension folder and ran GDB. I got a very disappointing: (gdb) set args -r 'Udm_Alloc_Agent("mysql://");' (gdb) run Starting program: /usr/local/bin/php -r 'Udm_Alloc_Agent("mysql://");' Reading symbols for shared libraries ..+....+++ done Reading symbols for shared libraries ... done Program exited normally. (gdb) bt No stack. (gdb) quit Valgrind doesn't seem to be available on OS X. And now things are more confusing. Now I can't get an error with the CLI test, even if I switch back to non-debug mode. And apache will still not start.