|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[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 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 23:00:01 2025 UTC |
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}