php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #58414 Core Dump
Submitted: 2008-11-14 15:23 UTC Modified: 2008-11-21 10:21 UTC
From: nobleclem at fatalexception dot us Assigned:
Status: Closed Package: sphinx (PECL)
PHP Version: 5.2.6 OS: Solaris 10
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:
Package:
Bug Type:
Summary:
From: nobleclem at fatalexception dot us
New email:
PHP Version: OS:

 

 [2008-11-14 15:23 UTC] nobleclem at fatalexception dot us
Description:
------------
OS: SunOS westland-dev 5.10 Generic_118833-36 sun4v sparc SUNW,Sun-Fire-T1000

Extensions Installed:
- apc (not enabled on cli)
-sphinx Revision => $Revision: 1.15 $

Running the code below from the CLI generates a core dump.
Sphinx Extension was built with GCC (gcc version 3.4.3 (csl-sol210-3_4-branch+sol_rpath)).

Reproduce code:
---------------
<?php

$cl = new SphinxClient();
$cl->SetServer( 'localhost', 3312 );
$cl->SetLimits( 0, 1, 1000 );
$res = $cl->Query( '' );
var_dump( $res );

Actual result:
--------------
GDB BackTrace:
$ gdb php core
GNU gdb 6.8
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "sparc-sun-solaris2.10"...
Reading symbols from /usr/lib/libcrypt_i.so.1...done.
Loaded symbols for /usr/lib/libcrypt_i.so.1
Reading symbols from /lib/librt.so.1...done.
Loaded symbols for /lib/librt.so.1
Reading symbols from /usr/local/lib/libsybdb.so.5...done.
Loaded symbols for /usr/local/lib/libsybdb.so.5
Reading symbols from /lib/libsocket.so.1...done.
Loaded symbols for /lib/libsocket.so.1
Reading symbols from /usr/local/lib/libmcrypt.so.4...done.
Loaded symbols for /usr/local/lib/libmcrypt.so.4
Reading symbols from /usr/local/lib/libltdl.so.3...done.
Loaded symbols for /usr/local/lib/libltdl.so.3
Reading symbols from /lib/libdl.so.1...
warning: Lowest section in /lib/libdl.so.1 is .dynamic at 00000094
done.
Loaded symbols for /lib/libdl.so.1
Reading symbols from /usr/local/lib/libldap-2.3.so.0...done.
Loaded symbols for /usr/local/lib/libldap-2.3.so.0
Reading symbols from /lib/libgen.so.1...done.
Loaded symbols for /lib/libgen.so.1
Reading symbols from /lib/libnsl.so.1...done.
Loaded symbols for /lib/libnsl.so.1
Reading symbols from /usr/lib/libsasl.so.1...done.
Loaded symbols for /usr/lib/libsasl.so.1
Reading symbols from /usr/sfw/lib/libssl.so.0.9.7...done.
Loaded symbols for /usr/sfw/lib/libssl.so.0.9.7
Reading symbols from /usr/sfw/lib/libcrypto.so.0.9.7...done.
Loaded symbols for /usr/sfw/lib/libcrypto.so.0.9.7
Reading symbols from /usr/local/lib/liblber-2.3.so.0...done.
Loaded symbols for /usr/local/lib/liblber-2.3.so.0
Reading symbols from /lib/libpam.so.1...done.
Loaded symbols for /lib/libpam.so.1
Reading symbols from /lib/libresolv.so.2...done.
Loaded symbols for /lib/libresolv.so.2
Reading symbols from /lib/libm.so.2...done.
Loaded symbols for /lib/libm.so.2
Reading symbols from /usr/local/lib/libcurl.so.4...done.
Loaded symbols for /usr/local/lib/libcurl.so.4
Reading symbols from /usr/lib/libsched.so.1...
warning: Lowest section in /usr/lib/libsched.so.1 is .dynamic at 00000074
done.
Loaded symbols for /usr/lib/libsched.so.1
Reading symbols from /u1/app/oracle/OraHome/lib/libclntsh.so.9.0...done.
Loaded symbols for /u1/app/oracle/OraHome//lib/libclntsh.so.9.0
Reading symbols from /usr/local/lib/libxml2.so.2...done.
Loaded symbols for /usr/local/lib/libxml2.so.2
Reading symbols from /lib/libpthread.so.1...
warning: Lowest section in /lib/libpthread.so.1 is .dynamic at 00000074
done.
Loaded symbols for /lib/libpthread.so.1
Reading symbols from /lib/libc.so.1...done.
Loaded symbols for /lib/libc.so.1
Reading symbols from /usr/sfw/lib/libgcc_s.so.1...done.
Loaded symbols for /usr/sfw/lib/libgcc_s.so.1
Reading symbols from /lib/libaio.so.1...done.
Loaded symbols for /lib/libaio.so.1
Reading symbols from /lib/libmd5.so.1...done.
Loaded symbols for /lib/libmd5.so.1
Reading symbols from /lib/libcmd.so.1...done.
Loaded symbols for /lib/libcmd.so.1
Reading symbols from /usr/lib/libz.so.1...done.
Loaded symbols for /usr/lib/libz.so.1
Reading symbols from /u1/app/oracle/OraHome/lib/libwtc9.so...done.
Loaded symbols for /u1/app/oracle/OraHome/lib/libwtc9.so
Reading symbols from /platform/sun4v/lib/libc_psr.so.1...done.
Loaded symbols for /platform/SUNW,Sun-Fire-T1000/lib/libc_psr.so.1
Reading symbols from /home/httpd/modules/php/sphinx.so...done.
Loaded symbols for /home/httpd/modules/php/sphinx.so
Reading symbols from /usr/local/lib/libsphinxclient-0.0.1.so...done.
Loaded symbols for /usr/local/lib/libsphinxclient-0.0.1.so
Reading symbols from /home/httpd/modules/php/apc.so...done.
Loaded symbols for /home/httpd/modules/php/apc.so
Reading symbols from /lib/nss_files.so.1...done.
Loaded symbols for /lib/nss_files.so.1
Reading symbols from /usr/lib/libpkcs11.so.1...done.
Loaded symbols for /usr/lib/libpkcs11.so.1
Reading symbols from /usr/lib/libcryptoutil.so.1...done.
Loaded symbols for /usr/lib/libcryptoutil.so.1
Reading symbols from /lib/libdoor.so.1...done.
Loaded symbols for /lib/libdoor.so.1
Reading symbols from /usr/lib/security/pkcs11_kernel.so...done.
Loaded symbols for /usr/lib/security/pkcs11_kernel.so
Reading symbols from /usr/lib/security/pkcs11_softtoken.so...done.
Loaded symbols for /usr/lib/security/pkcs11_softtoken.so
Reading symbols from /lib/ld.so.1...done.
Loaded symbols for /lib/ld.so.1
Core was generated by `php test-compiled.php'.
Program terminated with signal 10, Bus error.
[New process 81034    ]
#0  0xfeaa31b0 in php_sphinx_result_to_array () from /home/httpd/modules/php/sphinx.so
(gdb) bt
#0  0xfeaa31b0 in php_sphinx_result_to_array () from /home/httpd/modules/php/sphinx.so
#1  0xfeaa8064 in zim_SphinxClient_runQueries () from /home/httpd/modules/php/sphinx.so
#2  0x005295e0 in zend_do_fcall_common_helper_SPEC ()
#3  0x0052a740 in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER ()
#4  0x00528f3c in execute ()
#5  0x005297e4 in zend_do_fcall_common_helper_SPEC ()
#6  0x0052a740 in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER ()
#7  0x00528f3c in execute ()
#8  0x004f702c in zend_execute_scripts ()
#9  0x00481174 in php_execute_script ()
#10 0x005971cc in main ()
(gdb) quit

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-11-14 16:55 UTC] tony at daylessday dot org
Please rebuild PHP with --enable-debug (and recompile PECL/sphinx after that if you compiled it as a separate extension).
See also http://bugs.php.net/bugs-generating-backtrace.php
 [2008-11-17 09:47 UTC] nobleclem at fatalexception dot us
We performed the rebuilding as requested and here is the new backtrace:

The only thing that has changed this time is our sysadmin upgraded to php 5.2.6 when debug was enabled.

------------
$ gdb php core 
GNU gdb 6.8
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "sparc-sun-solaris2.10"...
DW_FORM_strp pointing outside of .debug_str section [in module /usr/local/bin/php]
Reading symbols from /usr/lib/libcrypt_i.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libcrypt_i.so.1
Reading symbols from /lib/librt.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib/librt.so.1
Reading symbols from /usr/local/lib/libsybdb.so.5...done.
Loaded symbols for /usr/local/lib/libsybdb.so.5
Reading symbols from /lib/libsocket.so.1...done.
Loaded symbols for /lib/libsocket.so.1
Reading symbols from /usr/local/lib/libmcrypt.so.4...done.
Loaded symbols for /usr/local/lib/libmcrypt.so.4
Reading symbols from /usr/local/lib/libltdl.so.3...done.
Loaded symbols for /usr/local/lib/libltdl.so.3
Reading symbols from /lib/libdl.so.1...
warning: Lowest section in /lib/libdl.so.1 is .dynamic at 00000094
done.
Loaded symbols for /lib/libdl.so.1
Reading symbols from /usr/local/lib/libldap-2.3.so.0...done.
Loaded symbols for /usr/local/lib/libldap-2.3.so.0
Reading symbols from /lib/libgen.so.1...done.
Loaded symbols for /lib/libgen.so.1
Reading symbols from /lib/libnsl.so.1...done.
Loaded symbols for /lib/libnsl.so.1
Reading symbols from /usr/lib/libsasl.so.1...done.
Loaded symbols for /usr/lib/libsasl.so.1
Reading symbols from /usr/sfw/lib/libssl.so.0.9.7...done.
Loaded symbols for /usr/sfw/lib/libssl.so.0.9.7
Reading symbols from /usr/sfw/lib/libcrypto.so.0.9.7...done.
Loaded symbols for /usr/sfw/lib/libcrypto.so.0.9.7
Reading symbols from /usr/local/lib/liblber-2.3.so.0...done.
Loaded symbols for /usr/local/lib/liblber-2.3.so.0
Reading symbols from /lib/libpam.so.1...done.
Loaded symbols for /lib/libpam.so.1
Reading symbols from /lib/libresolv.so.2...done.
Loaded symbols for /lib/libresolv.so.2
Reading symbols from /lib/libm.so.2...done.
Loaded symbols for /lib/libm.so.2
Reading symbols from /usr/local/lib/libcurl.so.4...done.
Loaded symbols for /usr/local/lib/libcurl.so.4
Reading symbols from /usr/lib/libsched.so.1...
warning: Lowest section in /usr/lib/libsched.so.1 is .dynamic at 00000074
done.
Loaded symbols for /usr/lib/libsched.so.1
Reading symbols from /u1/app/oracle/OraHome/lib/libclntsh.so.9.0...done.
Loaded symbols for /u1/app/oracle/OraHome//lib/libclntsh.so.9.0
Reading symbols from /usr/local/lib/libxml2.so.2...done.
Loaded symbols for /usr/local/lib/libxml2.so.2
Reading symbols from /lib/libpthread.so.1...
warning: Lowest section in /lib/libpthread.so.1 is .dynamic at 00000074
done.
Loaded symbols for /lib/libpthread.so.1
Reading symbols from /lib/libc.so.1...done.
Loaded symbols for /lib/libc.so.1
Reading symbols from /lib/libaio.so.1...done.
Loaded symbols for /lib/libaio.so.1
Reading symbols from /lib/libmd5.so.1...done.
Loaded symbols for /lib/libmd5.so.1
Reading symbols from /usr/sfw/lib/libgcc_s.so.1...done.
Loaded symbols for /usr/sfw/lib/libgcc_s.so.1
Reading symbols from /lib/libcmd.so.1...done.
Loaded symbols for /lib/libcmd.so.1
Reading symbols from /usr/lib/libz.so.1...done.
Loaded symbols for /usr/lib/libz.so.1
Reading symbols from /u1/app/oracle/OraHome/lib/libwtc9.so...done.
Loaded symbols for /u1/app/oracle/OraHome/lib/libwtc9.so
Reading symbols from /platform/sun4v/lib/libc_psr.so.1...done.
Loaded symbols for /platform/SUNW,Sun-Fire-T1000/lib/libc_psr.so.1
Reading symbols from /home/httpd/modules/php/sphinx.so...done.
Loaded symbols for /home/httpd/modules/php/sphinx.so
Reading symbols from /usr/local/lib/libsphinxclient-0.0.1.so...done.
Loaded symbols for /usr/local/lib/libsphinxclient-0.0.1.so
Reading symbols from /lib/nss_files.so.1...done.
Loaded symbols for /lib/nss_files.so.1
Reading symbols from /usr/lib/libpkcs11.so.1...done.
Loaded symbols for /usr/lib/libpkcs11.so.1
Reading symbols from /usr/lib/libcryptoutil.so.1...done.
Loaded symbols for /usr/lib/libcryptoutil.so.1
Reading symbols from /lib/libdoor.so.1...done.
Loaded symbols for /lib/libdoor.so.1
Reading symbols from /usr/lib/security/pkcs11_kernel.so...done.
Loaded symbols for /usr/lib/security/pkcs11_kernel.so
Reading symbols from /usr/lib/security/pkcs11_softtoken.so...done.
Loaded symbols for /usr/lib/security/pkcs11_softtoken.so
Reading symbols from /lib/ld.so.1...done.
Loaded symbols for /lib/ld.so.1
Core was generated by `php test.php'.
Program terminated with signal 10, Bus error.
[New process 70121    ]
#0  0xfeaa37d4 in php_sphinx_result_to_array () from /home/httpd/modules/php/sphinx.so
(gdb) bt
#0  0xfeaa37d4 in php_sphinx_result_to_array () from /home/httpd/modules/php/sphinx.so
#1  0xfeaa8c28 in zim_SphinxClient_query () from /home/httpd/modules/php/sphinx.so
#2  0x005807c0 in ?? ()
(gdb) quit
 [2008-11-17 10:01 UTC] tony at daylessday dot org
I don't see any differences, the debug symbols are still missing.
 [2008-11-17 10:45 UTC] nobleclem at fatalexception dot us
So I noticed APC was tossing an error and thinking that might have cause the debug symbols not showing I had it disabled and reproduced the core dump and backtrace only to get the same thing as in my previous note.

Not sure if this will help but here is how our PHP is currently configured on this system.  Also any suggestions for getting the debug information you are looking for or is using pecl sphinx on solaris a lost cause?

PHP Info ($php -i):
-------------------
$ php -i
phpinfo()
PHP Version => 5.2.6

System => SunOS westland-dev 5.10 Generic_118833-36 sun4v
Build Date => Nov 16 2008 21:02:50
Configure Command =>  './configure'  '--with-apxs2=/home/httpd/bin/apxs' '--with-imap=/usr/local/src/imap-2004g/' '--enable-ftp' '--with-imap-ssl' '--with-zlib' '--with-mcrypt' '--with-openssl' '--with-curl=/usr/local/src/curl-7.16.0/' '--with-pdo-oci=/u1/app/oracle/OraHome/' '--with-pdo-mysql=/usr/local/mysql' '--with-pdo-dblib=/usr/local/' '--with-mysql=/usr/local/mysql' '--enable-soap' '--with-oci8=/u1/app/oracle/OraHome/' '--with-ldap=/usr/local/' '--enable-sockets' '--enable-debug'
Server API => Command Line Interface
Virtual Directory Support => disabled
Configuration File (php.ini) Path => /usr/local/lib
Loaded Configuration File => /usr/local/lib/php.ini
PHP API => 20041225
PHP Extension => 20060613
Zend Extension => 220060519
Debug Build => yes
Thread Safety => disabled
Zend Memory Manager => enabled
IPv6 Support => enabled
Registered PHP Streams => php, file, data, http, ftp, compress.zlib, https, ftps  
Registered Stream Socket Transports => tcp, udp, unix, udg, ssl, sslv3, sslv2, tls
Registered Stream Filters => string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, convert.iconv.*, zlib.*


This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies
 [2008-11-17 10:56 UTC] tony at daylessday dot org
What do you get with this:
# file `which php`
# file /home/httpd/modules/php/sphinx.so

?
 [2008-11-17 11:02 UTC] nobleclem at fatalexception dot us
$ file `which php`
/usr/local/bin/php:	ELF 32-bit MSB executable SPARC Version 1, dynamically linked, not stripped

$ file /home/httpd/modules/php/sphinx.so 
/home/httpd/modules/php/sphinx.so:	ELF 32-bit MSB dynamic lib SPARC Version 1, dynamically linked, not stripped, no debugging information available
 [2008-11-17 11:54 UTC] tony at daylessday dot org
>Version 1, dynamically linked, not stripped, no debugging information available
Not good..
Try adding -g3 to CFLAGS when building the extension (or whatever flag enables debug info for the compiler you use).
 [2008-11-18 14:15 UTC] nobleclem at fatalexception dot us
Ok we rebuilt PHP and the sphinx extension with the -g3 flag and here is the new backtrace.

Backtrace:
----------
$ gdb php core 
GNU gdb 6.8
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "sparc-sun-solaris2.10"...
Reading symbols from /usr/lib/libcrypt_i.so.1...done.
Loaded symbols for /usr/lib/libcrypt_i.so.1
Reading symbols from /lib/librt.so.1...done.
Loaded symbols for /lib/librt.so.1
Reading symbols from /usr/local/lib/libsybdb.so.5...done.
Loaded symbols for /usr/local/lib/libsybdb.so.5
Reading symbols from /lib/libsocket.so.1...done.
Loaded symbols for /lib/libsocket.so.1
Reading symbols from /usr/local/lib/libmcrypt.so.4...done.
Loaded symbols for /usr/local/lib/libmcrypt.so.4
Reading symbols from /usr/local/lib/libltdl.so.3...done.
Loaded symbols for /usr/local/lib/libltdl.so.3
Reading symbols from /lib/libdl.so.1...
warning: Lowest section in /lib/libdl.so.1 is .dynamic at 00000094
done.
Loaded symbols for /lib/libdl.so.1
Reading symbols from /usr/local/lib/libldap-2.3.so.0...done.
Loaded symbols for /usr/local/lib/libldap-2.3.so.0
Reading symbols from /lib/libgen.so.1...done.
Loaded symbols for /lib/libgen.so.1
Reading symbols from /lib/libnsl.so.1...done.
Loaded symbols for /lib/libnsl.so.1
Reading symbols from /usr/lib/libsasl.so.1...done.
Loaded symbols for /usr/lib/libsasl.so.1
Reading symbols from /usr/sfw/lib/libssl.so.0.9.7...done.
Loaded symbols for /usr/sfw/lib/libssl.so.0.9.7
Reading symbols from /usr/sfw/lib/libcrypto.so.0.9.7...done.
Loaded symbols for /usr/sfw/lib/libcrypto.so.0.9.7
Reading symbols from /usr/local/lib/liblber-2.3.so.0...done.
Loaded symbols for /usr/local/lib/liblber-2.3.so.0
Reading symbols from /lib/libpam.so.1...done.
Loaded symbols for /lib/libpam.so.1
Reading symbols from /lib/libresolv.so.2...done.
Loaded symbols for /lib/libresolv.so.2
Reading symbols from /lib/libm.so.2...done.
Loaded symbols for /lib/libm.so.2
Reading symbols from /usr/local/lib/libcurl.so.4...done.
Loaded symbols for /usr/local/lib/libcurl.so.4
Reading symbols from /usr/lib/libsched.so.1...
warning: Lowest section in /usr/lib/libsched.so.1 is .dynamic at 00000074
done.
Loaded symbols for /usr/lib/libsched.so.1
Reading symbols from /u1/app/oracle/OraHome/lib/libclntsh.so.9.0...done.
Loaded symbols for /u1/app/oracle/OraHome//lib/libclntsh.so.9.0
Reading symbols from /usr/local/lib/libxml2.so.2...done.
Loaded symbols for /usr/local/lib/libxml2.so.2
Reading symbols from /lib/libpthread.so.1...
warning: Lowest section in /lib/libpthread.so.1 is .dynamic at 00000074
done.
Loaded symbols for /lib/libpthread.so.1
Reading symbols from /lib/libc.so.1...done.
Loaded symbols for /lib/libc.so.1
Reading symbols from /usr/sfw/lib/libgcc_s.so.1...done.
Loaded symbols for /usr/sfw/lib/libgcc_s.so.1
Reading symbols from /lib/libaio.so.1...done.
Loaded symbols for /lib/libaio.so.1
Reading symbols from /lib/libmd5.so.1...done.
Loaded symbols for /lib/libmd5.so.1
Reading symbols from /lib/libcmd.so.1...done.
Loaded symbols for /lib/libcmd.so.1
Reading symbols from /usr/lib/libz.so.1...done.
Loaded symbols for /usr/lib/libz.so.1
Reading symbols from /u1/app/oracle/OraHome/lib/libwtc9.so...done.
Loaded symbols for /u1/app/oracle/OraHome/lib/libwtc9.so
Reading symbols from /platform/sun4v/lib/libc_psr.so.1...done.
Loaded symbols for /platform/SUNW,Sun-Fire-T1000/lib/libc_psr.so.1
Reading symbols from /home/httpd/modules/php/sphinx.so...done.
Loaded symbols for /home/httpd/modules/php/sphinx.so
Reading symbols from /usr/local/lib/libsphinxclient-0.0.1.so...done.
Loaded symbols for /usr/local/lib/libsphinxclient-0.0.1.so
Reading symbols from /lib/nss_files.so.1...done.
Loaded symbols for /lib/nss_files.so.1
Reading symbols from /usr/lib/libpkcs11.so.1...done.
Loaded symbols for /usr/lib/libpkcs11.so.1
Reading symbols from /usr/lib/libcryptoutil.so.1...done.
Loaded symbols for /usr/lib/libcryptoutil.so.1
Reading symbols from /lib/libdoor.so.1...done.
Loaded symbols for /lib/libdoor.so.1
Reading symbols from /usr/lib/security/pkcs11_kernel.so...done.
Loaded symbols for /usr/lib/security/pkcs11_kernel.so
Reading symbols from /usr/lib/security/pkcs11_softtoken.so...done.
Loaded symbols for /usr/lib/security/pkcs11_softtoken.so
Reading symbols from /lib/ld.so.1...done.
Loaded symbols for /lib/ld.so.1
Core was generated by `php test.php'.
Program terminated with signal 10, Bus error.
[New process 67839    ]
#0  0xfeaa37d4 in php_sphinx_result_to_array () from /home/httpd/modules/php/sphinx.so
(gdb) bt
#0  0xfeaa37d4 in php_sphinx_result_to_array () from /home/httpd/modules/php/sphinx.so
#1  0xfeaa8c28 in zim_SphinxClient_query () from /home/httpd/modules/php/sphinx.so
#2  0x00586e80 in zend_do_fcall_common_helper_SPEC (execute_data=0xffbff310)
    at /usr/local/src/php-5.2.6/Zend/zend_vm_execute.h:200
#3  0x00588140 in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER (execute_data=0xffbff310)
    at /usr/local/src/php-5.2.6/Zend/zend_vm_execute.h:322
#4  0x00586798 in execute (op_array=0x963000) at /usr/local/src/php-5.2.6/Zend/zend_vm_execute.h:92
#5  0x0054ecc8 in zend_execute_scripts (type=8, retval=0x0, file_count=3)
    at /usr/local/src/php-5.2.6/Zend/zend.c:1134
#6  0x004cc674 in php_execute_script (primary_file=0xffbffac0)
    at /usr/local/src/php-5.2.6/main/main.c:2005
#7  0x00605474 in main (argc=2, argv=0xffbffb64)
    at /usr/local/src/php-5.2.6/sapi/cli/php_cli.c:1140
(gdb) quit
 [2008-11-19 02:12 UTC] tony at daylessday dot org
I can see that PHP now does have debug symbols, but sphinx.so is still missing them.
Please make sure that the extension itself is built with -g3 flags and doesn't have any other -gN flags defined.
 [2008-11-20 14:28 UTC] nobleclem at fatalexception dot us
Sorry about that.  I think we have it this time.

I looked at line 235 and I am not sure what the problem might be.

Backtrace:
----------
$ gdb php core 
GNU gdb 6.8
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "sparc-sun-solaris2.10"...
Reading symbols from /usr/lib/libcrypt_i.so.1...done.
Loaded symbols for /usr/lib/libcrypt_i.so.1
Reading symbols from /lib/librt.so.1...done.
Loaded symbols for /lib/librt.so.1
Reading symbols from /usr/local/lib/libsybdb.so.5...done.
Loaded symbols for /usr/local/lib/libsybdb.so.5
Reading symbols from /lib/libsocket.so.1...done.
Loaded symbols for /lib/libsocket.so.1
Reading symbols from /usr/local/lib/libmcrypt.so.4...done.
Loaded symbols for /usr/local/lib/libmcrypt.so.4
Reading symbols from /usr/local/lib/libltdl.so.3...done.
Loaded symbols for /usr/local/lib/libltdl.so.3
Reading symbols from /lib/libdl.so.1...
warning: Lowest section in /lib/libdl.so.1 is .dynamic at 00000094
done.
Loaded symbols for /lib/libdl.so.1
Reading symbols from /usr/local/lib/libldap-2.3.so.0...done.
Loaded symbols for /usr/local/lib/libldap-2.3.so.0
Reading symbols from /lib/libgen.so.1...done.
Loaded symbols for /lib/libgen.so.1
Reading symbols from /lib/libnsl.so.1...done.
Loaded symbols for /lib/libnsl.so.1
Reading symbols from /usr/lib/libsasl.so.1...done.
Loaded symbols for /usr/lib/libsasl.so.1
Reading symbols from /usr/sfw/lib/libssl.so.0.9.7...done.
Loaded symbols for /usr/sfw/lib/libssl.so.0.9.7
Reading symbols from /usr/sfw/lib/libcrypto.so.0.9.7...done.
Loaded symbols for /usr/sfw/lib/libcrypto.so.0.9.7
Reading symbols from /usr/local/lib/liblber-2.3.so.0...done.
Loaded symbols for /usr/local/lib/liblber-2.3.so.0
Reading symbols from /lib/libpam.so.1...done.
Loaded symbols for /lib/libpam.so.1
Reading symbols from /lib/libresolv.so.2...done.
Loaded symbols for /lib/libresolv.so.2
Reading symbols from /lib/libm.so.2...done.
Loaded symbols for /lib/libm.so.2
Reading symbols from /usr/local/lib/libcurl.so.4...done.
Loaded symbols for /usr/local/lib/libcurl.so.4
Reading symbols from /usr/lib/libsched.so.1...
warning: Lowest section in /usr/lib/libsched.so.1 is .dynamic at 00000074
done.
Loaded symbols for /usr/lib/libsched.so.1
Reading symbols from /u1/app/oracle/OraHome/lib/libclntsh.so.9.0...done.
Loaded symbols for /u1/app/oracle/OraHome//lib/libclntsh.so.9.0
Reading symbols from /usr/local/lib/libxml2.so.2...done.
Loaded symbols for /usr/local/lib/libxml2.so.2
Reading symbols from /lib/libpthread.so.1...
warning: Lowest section in /lib/libpthread.so.1 is .dynamic at 00000074
done.
Loaded symbols for /lib/libpthread.so.1
Reading symbols from /lib/libc.so.1...done.
Loaded symbols for /lib/libc.so.1
Reading symbols from /usr/sfw/lib/libgcc_s.so.1...done.
Loaded symbols for /usr/sfw/lib/libgcc_s.so.1
Reading symbols from /lib/libaio.so.1...done.
Loaded symbols for /lib/libaio.so.1
Reading symbols from /lib/libmd5.so.1...done.
Loaded symbols for /lib/libmd5.so.1
Reading symbols from /lib/libcmd.so.1...done.
Loaded symbols for /lib/libcmd.so.1
Reading symbols from /usr/lib/libz.so.1...done.
Loaded symbols for /usr/lib/libz.so.1
Reading symbols from /u1/app/oracle/OraHome/lib/libwtc9.so...done.
Loaded symbols for /u1/app/oracle/OraHome/lib/libwtc9.so
Reading symbols from /platform/sun4v/lib/libc_psr.so.1...done.
Loaded symbols for /platform/SUNW,Sun-Fire-T1000/lib/libc_psr.so.1
Reading symbols from /home/httpd/modules/php/sphinx.so...done.
Loaded symbols for /home/httpd/modules/php/sphinx.so
Reading symbols from /usr/local/lib/libsphinxclient-0.0.1.so...done.
Loaded symbols for /usr/local/lib/libsphinxclient-0.0.1.so
Reading symbols from /lib/nss_files.so.1...done.
Loaded symbols for /lib/nss_files.so.1
Reading symbols from /usr/lib/libpkcs11.so.1...done.
Loaded symbols for /usr/lib/libpkcs11.so.1
Reading symbols from /usr/lib/libcryptoutil.so.1...done.
Loaded symbols for /usr/lib/libcryptoutil.so.1
Reading symbols from /lib/libdoor.so.1...done.
Loaded symbols for /lib/libdoor.so.1
Reading symbols from /usr/lib/security/pkcs11_kernel.so...done.
Loaded symbols for /usr/lib/security/pkcs11_kernel.so
Reading symbols from /usr/lib/security/pkcs11_softtoken.so...done.
Loaded symbols for /usr/lib/security/pkcs11_softtoken.so
Reading symbols from /lib/ld.so.1...done.
Loaded symbols for /lib/ld.so.1
Core was generated by `php test.php'.
Program terminated with signal 10, Bus error.
[New process 71928    ]
#0  0xfeaa3884 in php_sphinx_result_to_array (c=0x962898, result=0xd70810, array=0xffbff080)
    at /usr/local/src/sphinx-cvs/sphinx.c:235
235                                                             for (k = 1; mva && k <= mva[0]; k++) {
(gdb) bt
#0  0xfeaa3884 in php_sphinx_result_to_array (c=0x962898, result=0xd70810, array=0xffbff080)
    at /usr/local/src/sphinx-cvs/sphinx.c:235
#1  0xfeaa8cd8 in zim_SphinxClient_query (ht=1, return_value=0x963c10, return_value_ptr=0x0, 
    this_ptr=0x9628d8, return_value_used=1) at /usr/local/src/sphinx-cvs/sphinx.c:1224
#2  0x00586e80 in zend_do_fcall_common_helper_SPEC (execute_data=0xffbff308)
    at /usr/local/src/php-5.2.6/Zend/zend_vm_execute.h:200
#3  0x00588140 in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER (execute_data=0xffbff308)
    at /usr/local/src/php-5.2.6/Zend/zend_vm_execute.h:322
#4  0x00586798 in execute (op_array=0x963000) at /usr/local/src/php-5.2.6/Zend/zend_vm_execute.h:92
#5  0x0054ecc8 in zend_execute_scripts (type=8, retval=0x0, file_count=3)
    at /usr/local/src/php-5.2.6/Zend/zend.c:1134
#6  0x004cc674 in php_execute_script (primary_file=0xffbffab8)
    at /usr/local/src/php-5.2.6/main/main.c:2005
#7  0x00605474 in main (argc=2, argv=0xffbffb5c)
    at /usr/local/src/php-5.2.6/sapi/cli/php_cli.c:1140
(gdb)
 [2008-11-21 04:09 UTC] tony at daylessday dot org
Much better now, thanks. Btw, you can skip these "Reading symbols from .. Loaded symbols ..", they're useless anyway.

Okay, please paste the output you get with these commands in GDB console (type them after the crash):
p mva
p mva[0]
p mva[k]
p k
p i
p *result

Thanks in advance.
 [2008-11-21 09:07 UTC] nobleclem at fatalexception dot us
Yea I wasn't sure if they would be of use or not.

Also we were digging into some of the libsphinxclient code and found a comment that might be causing some headache.

sphinxclient.c line 1499.
-------------------------
/*!COMMIT this is totally unsafe on some arches (eg. SPARC)*/
pval->mva_value = (unsigned int *) p;

Requested GDB Results:
----------------------
(gdb) p mva
$2 = (unsigned int *) 0xd732be
(gdb) p mva[0]
$3 = 1
(gdb) p mva[k]
$4 = 2775031812
(gdb) p k     
$5 = 1
(gdb) p i
$6 = 0
(gdb) p *result
$7 = {error = 0x0, warning = 0x0, status = 0, num_fields = 4, fields = 0xd6cca0, num_attrs = 22, 
  attr_names = 0xd70128, attr_types = 0xd70188, num_matches = 1, values_pool = 0xd701e8, 
  total = 1000, total_found = 2938, time_msec = 13, num_words = 0, words = 0xa78c60}
 [2008-11-21 09:48 UTC] tony at daylessday dot org
Please check if the following patch fixes it for you:
http://dev.daylessday.org/diff/sphinx_bug15033.diff
 [2008-11-21 10:18 UTC] nobleclem at fatalexception dot us
That patch worked perfectly. No more core dumps.

Thank you for your help figuring this out.
 [2008-11-21 10:19 UTC] nobleclem at fatalexception dot us
sorry should have set the status to closed.
 [2008-11-21 10:21 UTC] tony at daylessday dot org
Ok, thank you for your patience.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 20 01:01:28 2024 UTC