youzan/zan

php7.1进程自动重启的时候段错误

Opened this issue · 1 comments

sukui commented

服务器:

unbuntu 16.04 64

php环境

PHP 7.1.11 (cli) (built: Oct 30 2017 13:48:02) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies

root@iZbp1b4vjfjpq0y9gxwc7nZ:~/zanhttpdemo# php -m
[PHP Modules]
bcmath
Core
ctype
curl
date
dom
filter
ftp
gd
gettext
hash
iconv
intl
json
libxml
mbstring
mcrypt
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
pdo_sqlite
Phar
posix
Reflection
session
shmop
SimpleXML
soap
sockets
SPL
sqlite3
standard
sysvsem
tokenizer
xml
xmlreader
xmlrpc
xmlwriter
xsl
zan
zip
zlib

[Zend Modules]

在官方httpserver Demo 中设置了 进程5秒自动重启到时候.发生段错误

[2017-10-30 16:51:35 #0] close:workerId->0
[2017-10-30 16:51:35 #0] worker *0 stopping .....
[2017-10-30 16:51:35 #0] worker *0 still has 0 requests in progress...
[2017-10-30 16:51:35 #1] tcp client error [host=127.0.0.1, port=2280]
[2017-10-30 16:51:35 #1] redis client close [host=127.0.0.1, port=6379]
[2017-10-30 16:51:35 $2072.0]	ERROR	swManager_check_exit_status: worker#0[pid#2075] abnormal exit, exited=0, status=0, wifsignaled=1, signal=11
[2017-10-30 16:51:35 #] worker error happening [workerId=0, workerPid=2075, exitCode=0, signalNo=11]...
[2017-10-30 16:51:35 #] worker *0 still has 0 requests in progress...
[2017-10-30 16:51:35 #1] mysql connect fail [errno=1045, errmsg=#28000Access denied for user 'root'@'localhost' (using password: YES)] [host=127.0.0.1, port=3306]
[2017-10-30 16:51:35 #1] mysql connect fail [errno=1045, errmsg=#28000Access denied for user 'root'@'localhost' (using password: YES)] [host=127.0.0.1, port=3306]
[2017-10-30 16:51:35 #1] mysql client close (0) [host=127.0.0.1, port=3306]
[2017-10-30 16:51:35 #1] mysql client close (0) [host=127.0.0.1, port=3306]
[2017-10-30 16:51:35 #0] worker *0 starting .....

后经过重新编译php参数测试发现如果移除了curl 扩展编译参数则没发生段错误.

sukui commented

补充一下编译参数

./configure --prefix=/usr/local/php --with-libdir=lib64 --with-bz2  --with-jpeg-dir --with-gd --enable-shared --enable-mbstring --with-mcrypt --enable-mysqlnd --with-pdo-mysql=mysqlnd --with-mysqli=mysqlnd --disable-fpm --enable-phar --enable-bcmath --with-zlib --enable-zip --with-gettext --enable-sockets --with-freetype-dir  --with-config-file-path=/usr/local/php/etc --with-config-file-scan-dir=/usr/local/php/etc/conf.d --enable-pcntl --with-xsl --enable-inline-optimization --with-openssl --with-curl