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的開發(fā)環(huán)境以及使用php8.1打包,但是依舊出現(xiàn)上述相同的錯(cuò)誤,參考以下社區(qū)答案,切換成php8.0,依舊報(bào)錯(cuò)。
http://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ò)展,測試打包二進(jìn)制,打包后執(zhí)行二進(jìn)制文件,雖然沒有zend_mm_heap corrupted
錯(cuò)誤,但是ctrl+C還是會有exit with status 139
錯(cuò)誤,查看社區(qū)得知是php-cli的擴(kuò)展有關(guān),這是我的擴(kuò)展,嘗試先調(diào)試php-cli擴(kuò)展,先解決這個(gè)問題。
執(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)問題
通過移除composer包來排查
多次嘗試,發(fā)現(xiàn)webman-tech/laravel-http-client
會導(dǎo)致出現(xiàn)zend_mm_heap corrupted
錯(cuò)誤。
通過控制變量,重新克隆新webman項(xiàng)目到本地,僅安裝webman/console
,webman-tech/laravel-http-client
兩個(gè)包,依舊報(bào)錯(cuò)。 基本可以確定是http-client包導(dǎo)致的問題,請問大佬有解決方法么,這個(gè)包是真的好用啊 @krissss
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 可以解決
這是我查閱的文檔,希望對你有幫助
https://cloud.tencent.com/developer/ask/sof/93873
這個(gè)問題我之前也遇到過,可能和 phpmicro 本身有關(guān)系。我先去和 phpmicro 的作者反饋一下,如果有人有一個(gè)簡單復(fù)現(xiàn)的 demo 的話感激不盡!