zzjin / php-ext-trie-filter

php extension for spam word filter based on Double-Array Trie tree, it can detect if a spam word exists in a text message. 关键词过滤扩展,用于检查一段文本中是否出现敏感词,基于Double-Array Trie 树实现。
55 stars 12 forks source link

CentOS上报错 php: realloc(): invalid next size #2

Open yuan1994 opened 7 years ago

yuan1994 commented 7 years ago
// 系统版本
# cat /etc/system-release
CentOS release 6.9 (Final)

// PHP 版本
# php --version
PHP 7.1.9 (cli) (built: Aug 31 2017 08:18:56) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies
    with Zend OPcache v7.1.9, Copyright (c) 1999-2017, by Zend Technologies
    with Xdebug v2.5.5, Copyright (c) 2002-2017, by Derick Rethans

// gcc 版本
# gcc --version
gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-18)
Copyright © 2010 Free Software Foundation, Inc.
本程序是自由软件;请参看源代码的版权声明。本软件没有任何担保;
包括没有适销性和某一专用目的下的适用性担保

// libdatrie 版本
# /usr/local/libdatrie/bin/trietool --version
0.2.10

// 错误trace
*** glibc detected *** php: realloc(): invalid next size: 0x000000000272c7f0 ***
======= Backtrace: =========
/lib64/libc.so.6(+0x75dee)[0x7f83c067edee]
/lib64/libc.so.6(+0x7bcca)[0x7f83c0684cca]
/lib64/libc.so.6(realloc+0x158)[0x7f83c0684f08]
/usr/local/libdatrie/lib/libdatrie.so.1(+0x1efc)[0x7f83ac3d8efc]
/usr/local/libdatrie/lib/libdatrie.so.1(+0x1fd8)[0x7f83ac3d8fd8]
/usr/local/libdatrie/lib/libdatrie.so.1(+0x252f)[0x7f83ac3d952f]
/usr/local/libdatrie/lib/libdatrie.so.1(+0x372d)[0x7f83ac3da72d]
/usr/local/libdatrie/lib/libdatrie.so.1(+0x38a6)[0x7f83ac3da8a6]
/usr/lib64/php/modules/trie_filter.so(zif_trie_filter_store+0xed)[0x7f83ac5debed]
/usr/lib64/php/modules/xdebug.so(xdebug_execute_internal+0x2fc)[0x7f83b8ed51bc]
php[0x66d4c0]
php(execute_ex+0x28)[0x64bf78]
/usr/lib64/php/modules/xdebug.so(xdebug_execute_ex+0x397)[0x7f83b8ed5657]
php(zend_execute+0x1c0)[0x697d80]
php(zend_execute_scripts+0xb3)[0x5f0353]
php(php_execute_script+0x2f0)[0x58eca0]
php[0x69b08a]
php[0x69b88a]
/lib64/libc.so.6(__libc_start_main+0xfd)[0x7f83c0627d1d]
php[0x42ad31]
======= Memory map: ========
00400000-00764000 r-xp 00000000 fc:01 1973813                            /usr/bin/php
00964000-009ef000 rw-p 00364000 fc:01 1973813                            /usr/bin/php
009ef000-00a0c000 rw-p 00000000 00:00 0 
0248f000-0273e000 rw-p 00000000 00:00 0                                  [heap]
7f83a4000000-7f83a4021000 rw-p 00000000 00:00 0 
7f83a4021000-7f83a8000000 ---p 00000000 00:00 0 
7f83abd95000-7f83abf96000 rw-s 00000000 00:04 41373596                   /dev/zero (deleted)
7f83abf96000-7f83abf98000 r-xp 00000000 fc:01 1973964                    /usr/lib64/php/modules/apc.so
7f83abf98000-7f83ac198000 ---p 00002000 fc:01 1973964                    /usr/lib64/php/modules/apc.so
yuan1994 commented 7 years ago

libdatrie的版本过高会导致此错误,我安装 libdatrie-0.2.5 终于成功了

zzjin commented 6 years ago

libdatrie 我看官网写的是最新的只到0.2.9 我这边测试到0.2.9都是ok的,你的0.2.10是怎么安装的?

visoeclipse commented 6 years ago

[06-Dec-2017 10:52:53] WARNING: [pool www] child 19 said into stderr: " glibc detected php-fpm: pool www: free(): invalid next size (fast): 0x00000000031d5a60 ***" [06-Dec-2017 10:52:53] WARNING: [pool www] child 19 said into stderr: "======= Backtrace: =========" [06-Dec-2017 10:52:53] WARNING: [pool www] child 19 said into stderr: "/lib64/libc.so.6(+0x75dee)[0x7fa0ce883dee]" [06-Dec-2017 10:52:53] WARNING: [pool www] child 19 said into stderr: "/lib64/libc.so.6(+0x78c80)[0x7fa0ce886c80]" [06-Dec-2017 10:52:53] WARNING: [pool www] child 19 said into stderr: "/usr/local/lib/libdatrie.so.1(alpha_map_free+0x44)[0x7fa0ca1810b4]" [06-Dec-2017 10:52:53] WARNING: [pool www] child 19 said into stderr: "/usr/local/php7.1.9/lib/php/extensions/no-debug-non-zts-20160303/trie_filter.so(zif_trie_filter_new+0x4b)[0x7fa0ca384c7b]" [06-Dec-2017 10:52:53] WARNING: [pool www] child 19 said into stderr: "php-fpm: pool www[0x8b0340]" [06-Dec-2017 10:52:53] WARNING: [pool www] child 19 said into stderr: "php-fpm: pool www(execute_ex+0x28)[0x88f978]" [06-Dec-2017 10:52:53] WARNING: [pool www] child 19 said into stderr: "php-fpm: pool www(zend_call_function+0x600)[0x825990]" [06-Dec-2017 10:52:53] WARNING: [pool www] child 19 said into stderr: "php-fpm: pool www[0x72f62c]" [06-Dec-2017 10:52:53] WARNING: [pool www] child 19 said into stderr: "php-fpm: pool www[0x8afc97]" [06-Dec-2017 10:52:53] WARNING: [pool www] child 19 said into stderr: "php-fpm: pool www(execute_ex+0x28)[0x88f978]" [06-Dec-2017 10:52:53] WARNING: [pool www] child 19 said into stderr: "php-fpm: pool www(zend_execute+0x1c0)[0x8db4c0]" [06-Dec-2017 10:52:53] WARNING: [pool www] child 19 said into stderr: "php-fpm: pool www(zend_execute_scripts+0xb3)[0x834063]" [06-Dec-2017 10:52:53] WARNING: [pool www] child 19 said into stderr: "php-fpm: pool www(php_execute_script+0x290)[0x7d3ab0]" [06-Dec-2017 10:52:53] WARNING: [pool www] child 19 said into stderr: "php-fpm: pool www[0x8e83fe]" [06-Dec-2017 10:52:53] WARNING: [pool www] child 19 said into stderr: "/lib64/libc.so.6(__libc_start_main+0xfd)[0x7fa0ce82cd1d]"

visoeclipse commented 6 years ago

0.2.9和最新版还是有问题