|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57192 BUS error on udm_find();
Submitted: 2006-08-22 01:37 UTC Modified: 2013-02-18 00:35 UTC
From: michaelw at darkhorse dot com Assigned:
Status: No Feedback Package: mnogosearch (PECL)
PHP Version: 5.1.5 OS: OS X
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: michaelw at darkhorse dot com
New email:
PHP Version: OS:


 [2006-08-22 01:37 UTC] michaelw at darkhorse dot com
The udm_find() comamnd produces a BUS ERROR.

After compiling php 5.1.5, mnogo 3.2.39, the pecl extension, etc.  The simple a simple udm_alloc_agent()/udm_find() sequence, I get the message BUS ERROR from the command line.  Apache just bails.
If there's some alternative to udm_find that I should be using, it's undocumented.

Reproduce code:
$res = Udm_Find($udm_agent,'conan');

Expected result:
Not a bus error

Actual result:

An actual gdb backtrace that, I hope, doesn't make me look like I just make up problems to be difficult:

(gdb) set args -r '$udm_agent=Udm_Alloc_Agent("mysql://user:pass@blahlbla/mnogosearch/?dbmode=multi");$res = Udm_Find($udm_agent,'conan');'
(gdb) run
Starting program: /usr/local/bin/php -r '$udm_agent=Udm_Alloc_Agent("mysql://");$res = Udm_Find($udm_agent,'conan');'
Reading symbols for shared libraries .++....++.+++ done
Reading symbols for shared libraries . done

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0x00000005
0x02a595a4 in escape_string_for_mysql ()
(gdb) bt
#0  0x02a595a4 in escape_string_for_mysql ()
#1  0x02a396f0 in UdmMySQLEscStr (db=0x5f4a10, to=0xbfff6cdc "", from=0x29c0140 "conan", len=1) at sql-mysql.c:244
#2  0x02a353a8 in UdmFindWordsSQL (query=0xfe6000, Res=0xbfff95f8, db=0x200b800) at sql.c:5413
#3  0x02a0ef34 in UdmFindWordsDB (A=0xfe6000, CurRes=0xbfff95f8, db=0x200b800) at db.c:669
#4  0x02a0f0e8 in UdmFindWords (A=0xfe6000, Res=0x29c0180) at db.c:829
#5  0x02a0ffcc in UdmFind (A=0xfe6000) at db.c:887
#6  0x02a0ab14 in zif_udm_find (ht=44258216, return_value=0x29bf868, return_value_ptr=0x29c0140, this_ptr=0x1, return_value_used=1140868132) at /private/tmp/tmp9UZ6jF/mnogosearch-1.0.0/php_mnogo.c:2052
#7  0x0025aec4 in zend_do_fcall_common_helper_SPEC (execute_data=0xbffff518) at /Users/webadm/apps/php-5.1.5/Zend/zend_vm_execute.h:200
#8  0x0025a6f4 in execute (op_array=0x29bf768) at /Users/webadm/apps/php-5.1.5/Zend/zend_vm_execute.h:92
#9  0x0022ca3c in zend_eval_string (str=0xbffff5a8 "", retval_ptr=0x0, string_name=0x0) at /Users/webadm/apps/php-5.1.5/Zend/zend_execute_API.c:1116
#10 0x0022cbc8 in zend_eval_string_ex (str=0x5f4a10 "", retval_ptr=0xbfff6cdc, string_name=0x29c0140 "conan", handle_exceptions=1) at /Users/webadm/apps/php-5.1.5/Zend/zend_execute_API.c:1150
#11 0x002c7ad8 in main (argc=3, argv=0xbffffba4) at /Users/webadm/apps/php-5.1.5/sapi/cli/php_cli.c:1132


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-08-22 06:10 UTC] pierre dot php at gmail dot com
Are you sure you don't have any other mnogosearch extension installed (like in php4)?

I cannot reproduce this problem here, it looks like an mnogosearch problem, not the extension itself. I have to find a OS X box to test.
 [2006-08-23 00:14 UTC] michaelw at darkhorse dot com
There is no other extension installed.

I took your advice (that it's probably a mnogo error) and got it to work briefly today after I installed 3.2.33 with php 5.1.5.

Then I went back and went through the entire installation process with 3.2.39 down to find the latest version that worked.  All versions failed to perform.

When I got back to 3.2.33, the CLI call to a web page (like, index.php) worked great, but the apache call to the same page fails to connect and throws the udm_error():
DB err: MySQL driver: #2003: Can't connect to MySQL server on '' (49)

I started from scratch with each and every install of mnogosearch and the extension, so I'm at a loss.

I realize that this probably means that the PECL extension works great, and it's all mnogo's fault.  So if you want to close this bug, I'd understand.  But if you have some insight as to the differing nature of CLI vs apache calls to the extension, that would be pretty helpful.
 [2006-09-08 16:34 UTC] pierre dot php at gmail dot com
If you can give me an access to an OS X host, I can try to fix it or figure out what's going wrong.
 [2013-02-18 00:35 UTC] pecl-dev at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Fri May 07 02:01:38 2021 UTC