3

在 PHP 5.5.9 (Ubuntu 14.04) 中运行 Yii ConsoleCommand 时,出现分段错误。

root@prod05:/var/www/www.dummy.com/current# ./yiic cmd createdevcopy                                                                                                                                                    


 START DB DEV DUMP CREATION
 Segmentation fault (core dumped)

dbg核心输出:

root@prod05:/var/www/www.dummy.com/current# gdb php core                                                                                                                                                               
GNU gdb (Ubuntu 7.7-0ubuntu3.1) 7.7
Copyright (C) 2014 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 "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from php...Reading symbols from /usr/lib/debug//usr/bin/php5...done.
done.

warning: core file may not match specified executable file.
[New LWP 18309]

warning: .dynamic section for "/usr/lib/php5/20121212/newrelic.so" is not at the expected address (wrong library or version mismatch?)
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

warning: the debug information found in "/usr/lib/debug//usr/lib/php5/20121212/mysql.so" does not match "/usr/lib/php5/20121212/mysql.so" (CRC mismatch).


warning: the debug information found in "/usr/lib/debug/usr/lib/php5/20121212/mysql.so" does not match "/usr/lib/php5/20121212/mysql.so" (CRC mismatch).


warning: the debug information found in "/usr/lib/debug//usr/lib/php5/20121212/mysqli.so" does not match "/usr/lib/php5/20121212/mysqli.so" (CRC mismatch).


warning: the debug information found in "/usr/lib/debug/usr/lib/php5/20121212/mysqli.so" does not match "/usr/lib/php5/20121212/mysqli.so" (CRC mismatch).


warning: the debug information found in "/usr/lib/debug//usr/lib/php5/20121212/pdo_mysql.so" does not match "/usr/lib/php5/20121212/pdo_mysql.so" (CRC mismatch).


warning: the debug information found in "/usr/lib/debug/usr/lib/php5/20121212/pdo_mysql.so" does not match "/usr/lib/php5/20121212/pdo_mysql.so" (CRC mismatch).

Core was generated by `php ./yiic cmd createdevcopy'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x0000000000717446 in execute_ex (execute_data=0x1f38808) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_vm_execute.h:363
363     /build/buildd/php5-5.5.9+dfsg/Zend/zend_vm_execute.h: No such file or directory.
(gdb) quit

加载的php模块:

bcmath bz2 calendar Core ctype curl date dba dom ereg exif fileinfo filter ftp gd geoip gettext hash iconv imagick json libxml mbstring memcache memcached mhash mongo mysql mysqli OAuth openssl pcntl pcre PDO pdo_mysql Phar posix readline Reflection session shmop SimpleXML soap sockets solr SPL standard sysvmsg sysvsem sysvshm tokenizer wddx xml xmlreader xmlwriter Zend OPcache zip

值得一提的是,在成功向 AWS 发出 API 调用后会立即发生段错误。

回溯输出:

#0  0x0000000000717446 in execute_ex (execute_data=0x1f38808) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_vm_execute.h:363
#1  0x00000000006dd5b9 in dtrace_execute_ex (execute_data=<optimised out>) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_dtrace.c:73
#2  0x000000000079dd60 in zend_do_fcall_common_helper_SPEC (execute_data=0x1f38680) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_vm_execute.h:584
#3  0x0000000000717448 in execute_ex (execute_data=0x1f38680) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_vm_execute.h:363
#4  0x00000000006dd5b9 in dtrace_execute_ex (execute_data=<optimised out>) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_dtrace.c:73
#5  0x00000000006df8f1 in zend_call_function (fci=fci@entry=0x7fff1d9773f0, fci_cache=<optimised out>, fci_cache@entry=0x7fff1d9773c0) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_execute_API.c:939
#6  0x0000000000704895 in zend_call_method (object_pp=object_pp@entry=0x7fff1d977498, obj_ce=<optimised out>, obj_ce@entry=0x7ff8a1a63940, fn_proxy=fn_proxy@entry=0x7ff8a1a63aa8, 
    function_name=function_name@entry=0xb38308 "__tostring", function_name_len=function_name_len@entry=10, retval_ptr_ptr=retval_ptr_ptr@entry=0x7fff1d9774a8, param_count=param_count@entry=0, arg1=arg1@entry=0x0, 
    arg2=arg2@entry=0x0) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_interfaces.c:97
#7  0x0000000000710993 in zend_std_cast_object_tostring (readobj=0x7ff8a1aa50b8, writeobj=0x7fff1d977530, type=type@entry=6) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_object_handlers.c:1533
#8  0x00000000006ee6c2 in zend_make_printable_zval (expr=expr@entry=0x7ff8a1aa50b8, expr_copy=expr_copy@entry=0x7fff1d977530, use_copy=use_copy@entry=0x7fff1d97752c) at /build/buildd/php5-5.5.9+dfsg/Zend/zend.c:258
#9  0x000000000075092a in ZEND_CAST_SPEC_CV_HANDLER (execute_data=0x1f38578) at /build/buildd/php5-5.5.9+dfsg/Zend/zend_vm_execute.h:30830

想法?

4

0 回答 0