php8.0 webman build:bin
執(zhí)行./build/sentences-core-1.0.0.bin start
ctrl+C退出,出現(xiàn)錯(cuò)誤 zend_mm_heap corrupted
執(zhí)行./build/sentences-core-1.0.0.bin start -d 正常
執(zhí)行./build/sentences-core-1.0.0.bin stop 同樣報(bào)錯(cuò)
Workerman[./build/sentences-core-1.0.0.bin] stop
Workerman[./build/sentences-core-1.0.0.bin] is stopping ...
zend_mm_heap corrupted
zend_mm_heap corrupted
zend_mm_heap corrupted
zend_mm_heap corrupted
zend_mm_heap corrupted
zend_mm_heap corrupted
zend_mm_heap corrupted
zend_mm_heap corrupted
zend_mm_heap corrupted
zend_mm_heap corrupted
Workerman[./build/sentences-core-1.0.0.bin] stop success
zend_mm_heap corrupted
原本是php8.1的開(kāi)發(fā)環(huán)境以及使用php8.1打包,但是依舊出現(xiàn)上述相同的錯(cuò)誤,參考以下社區(qū)答案,切換成php8.0,依舊報(bào)錯(cuò)。
http://www.wtbis.cn/q/10197
操作系統(tǒng):Ubuntu 18.04.3 LTS
php版本:PHP 8.0.28 (cli)
workerman/webman-framework:v1.5.2
webman/console:v1.2.33
重新拉取初始化webman項(xiàng)目,僅安裝了webman/console擴(kuò)展,測(cè)試打包二進(jìn)制,打包后執(zhí)行二進(jìn)制文件,雖然沒(méi)有zend_mm_heap corrupted
錯(cuò)誤,但是ctrl+C還是會(huì)有exit with status 139
錯(cuò)誤,查看社區(qū)得知是php-cli的擴(kuò)展有關(guān),這是我的擴(kuò)展,嘗試先調(diào)試php-cli擴(kuò)展,先解決這個(gè)問(wèn)題。
執(zhí)行php8.0 -m
[PHP Modules]
bcmath
bz2
calendar
Core
ctype
curl
date
dba
dom
enchant
exif
FFI
fileinfo
filter
ftp
gd
gettext
gmp
hash
iconv
igbinary
imap
intl
json
ldap
libxml
mbstring
memcached
msgpack
mysqli
mysqlnd
odbc
openssl
pcntl
pcre
PDO
pdo_dblib
PDO_Firebird
pdo_mysql
PDO_ODBC
pdo_pgsql
pdo_sqlite
pgsql
Phar
posix
pspell
readline
redis
Reflection
session
shmop
SimpleXML
snmp
soap
sockets
sodium
SPL
sqlite3
standard
sysvmsg
sysvsem
sysvshm
tidy
tokenizer
xdebug
xml
xmlreader
xmlrpc
xmlwriter
xsl
Zend OPcache
zip
zlib
[Zend Modules]
Xdebug
Zend OPcache
以上并未發(fā)現(xiàn)問(wèn)題
通過(guò)移除composer包來(lái)排查
多次嘗試,發(fā)現(xiàn)webman-tech/laravel-http-client
會(huì)導(dǎo)致出現(xiàn)zend_mm_heap corrupted
錯(cuò)誤。
通過(guò)控制變量,重新克隆新webman項(xiàng)目到本地,僅安裝webman/console
,webman-tech/laravel-http-client
兩個(gè)包,依舊報(bào)錯(cuò)。 基本可以確定是http-client包導(dǎo)致的問(wèn)題,請(qǐng)問(wèn)大佬有解決方法么,這個(gè)包是真的好用啊 @krissss
可以提供最小復(fù)現(xiàn)代碼嘛?
老哥我新拉取的webman項(xiàng)目,執(zhí)行ctrl+c還是會(huì)報(bào)錯(cuò),雖然報(bào)錯(cuò)的原因換了??赡芎臀襭hp-cli的擴(kuò)展有關(guān)么? 我的擴(kuò)展已經(jīng)在問(wèn)題上列出來(lái)了
opcache擴(kuò)展沒(méi)開(kāi),而且把xdebug擴(kuò)展注釋了,還是會(huì)出現(xiàn)exit with status 139錯(cuò)誤
目前排查是因?yàn)榘惭b了webman-tech/laravel-http-client
這個(gè)HTTP包,卸載了就不會(huì)報(bào)錯(cuò)了,但是這個(gè)包很好用,看看還有沒(méi)有解決方法
Input "php ./build/webman.bin stop" to stop. Start success.
rooté97dc6763f808:/var/www/webman# ./build/webman.bin stop
Workerman?./build/webman.bin? stop
Workerman?./build/webman.bin? is stopping ...
Workerman?./build/webman.bin? stop success
Segmentation fault
rooté97dc6763f808:/var/www/webman#
嘗試在命令行中使用 export USE_ZEND_ALLOC=0 可以解決
這是我查閱的文檔,希望對(duì)你有幫助
https://cloud.tencent.com/developer/ask/sof/93873
這個(gè)問(wèn)題我之前也遇到過(guò),可能和 phpmicro 本身有關(guān)系。我先去和 phpmicro 的作者反饋一下,如果有人有一個(gè)簡(jiǎn)單復(fù)現(xiàn)的 demo 的話感激不盡!