Git Product home page Git Product logo

Comments (4)

shukean avatar shukean commented on July 24, 2024

CentOS 6.4 64Bit
PHP 5.5.14(CLI / Nginx) (当前我的版本)
相关初始化代码:
monip_init(DATA_FILE);
register_shutdown_function(function() {echo "Start to clear.\n";monip_clear();echo "Cleared.\n";});
执行上述代码都没有发生如述错误.

from monip.

codeant avatar codeant commented on July 24, 2024

做了更多一些验证,包括发生问题的机器上。
MacOS Yosemite 上运行相同代码处理相同数据无此问题 / 发现问题的设备上单独拎出monip相关代码执行无问题 / 问题代码处理100w 行 IP 查找和处理1次查找无区别均会报错 / 问题代码去除 monip_find 也不会发生core dump。
且问题代码中,无任何 monip 外的非 php 自带的第三方扩展。

把 core dump 用 gdb 打开,看 backtrace,有以下和 monip 相关的行:
#3 0x00007f6cd1b165fa in php_monip_dtor (rsrc=) at /home/junzuo/php_ext_tmp/monip-master/monip.c:165

全部信息如下:
[lyhuang@lewa-dev-3 etl]$ gdb /usr/local/php/bin/php core.11424
GNU gdb (GDB) Red Hat Enterprise Linux (7.2-60.el6)
Copyright (C) 2010 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-redhat-linux-gnu".
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/...
Reading symbols from /usr/local/php_5.5/bin/php...done.
[New Thread 11424]
Missing separate debuginfo for /usr/local/php_5.5/lib/php/extensions/no-debug-non-zts-20121212/uuid.so
Try: yum --disablerepo='' --enablerepo='-debug_' install /usr/lib/debug/.build-id/5b/3269b370a58239c2a79e23d40b2bdd5be1c8e1
Missing separate debuginfo for /usr/local/php_5.5/lib/php/extensions/no-debug-non-zts-20121212/memcache.so
Try: yum --disablerepo='' --enablerepo='-debug_' install /usr/lib/debug/.build-id/6f/b9d688dd3248a222563db5340d06d1515a886c
Missing separate debuginfo for /usr/local/php_5.5/lib/php/extensions/no-debug-non-zts-20121212/gearman.so
Try: yum --disablerepo='' --enablerepo='-debug_' install /usr/lib/debug/.build-id/35/d772e71f21790678753198fba2332a07a78270
Missing separate debuginfo for /usr/local/php_5.5/lib/php/extensions/no-debug-non-zts-20121212/monip.so
Try: yum --disablerepo='' --enablerepo='-debug_' install /usr/lib/debug/.build-id/ed/3debdbae96693d5c6633dbc35edf99d53958ad
Missing separate debuginfo for /usr/local/php_5.5/lib/php/extensions/no-debug-non-zts-20121212/swoole.so
Try: yum --disablerepo='' --enablerepo='-debug_' install /usr/lib/debug/.build-id/fd/8dcd9cd9bc379c4c6ee5d5092822c1a58c6fb8
Missing separate debuginfo for
Try: yum --disablerepo='' --enablerepo='-debug_' install /usr/lib/debug/.build-id/b5/d86fbcf0ccb03331e6c7c73897b96845e0a4eb
Reading symbols from /lib64/libcrypt.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib64/libcrypt.so.1
Reading symbols from /lib64/libz.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib64/libz.so.1
Reading symbols from /usr/lib64/libexslt.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/lib64/libexslt.so.0
Reading symbols from /lib64/libreadline.so.6...(no debugging symbols found)...done.
Loaded symbols for /lib64/libreadline.so.6
Reading symbols from /lib64/libncurses.so.5...(no debugging symbols found)...done.
Loaded symbols for /lib64/libncurses.so.5
Reading symbols from /lib64/librt.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib64/librt.so.1
Reading symbols from /usr/lib64/libgmp.so.3...(no debugging symbols found)...done.
Loaded symbols for /usr/lib64/libgmp.so.3
Reading symbols from /usr/lib64/libpng12.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/lib64/libpng12.so.0
Reading symbols from /usr/lib64/libjpeg.so.62...(no debugging symbols found)...done.
Loaded symbols for /usr/lib64/libjpeg.so.62
Reading symbols from /usr/lib64/libcurl.so.4...(no debugging symbols found)...done.
Loaded symbols for /usr/lib64/libcurl.so.4
Reading symbols from /lib64/libbz2.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib64/libbz2.so.1
Reading symbols from /lib64/libm.so.6...(no debugging symbols found)...done.
Loaded symbols for /lib64/libm.so.6
Reading symbols from /lib64/libdl.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib64/libdl.so.2
Reading symbols from /lib64/libnsl.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib64/libnsl.so.1
Reading symbols from /usr/lib64/libxml2.so.2...(no debugging symbols found)...done.
Loaded symbols for /usr/lib64/libxml2.so.2
Reading symbols from /usr/lib64/libssl.so.10...(no debugging symbols found)...done.
Loaded symbols for /usr/lib64/libssl.so.10
Reading symbols from /usr/lib64/libcrypto.so.10...(no debugging symbols found)...done.
Loaded symbols for /usr/lib64/libcrypto.so.10
Reading symbols from /usr/lib64/libfreetype.so.6...(no debugging symbols found)...done.
Loaded symbols for /usr/lib64/libfreetype.so.6
Reading symbols from /usr/lib64/libxslt.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/lib64/libxslt.so.1
Reading symbols from /lib64/libc.so.6...(no debugging symbols found)...done.
Loaded symbols for /lib64/libc.so.6
Reading symbols from /lib64/libresolv.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib64/libresolv.so.2
Reading symbols from /lib64/libfreebl3.so...(no debugging symbols found)...done.
Loaded symbols for /lib64/libfreebl3.so
Reading symbols from /lib64/libgcrypt.so.11...(no debugging symbols found)...done.
Loaded symbols for /lib64/libgcrypt.so.11
Reading symbols from /lib64/libgpg-error.so.0...(no debugging symbols found)...done.
Loaded symbols for /lib64/libgpg-error.so.0
Reading symbols from /lib64/libtinfo.so.5...(no debugging symbols found)...done.
Loaded symbols for /lib64/libtinfo.so.5
Reading symbols from /lib64/libpthread.so.0...(no debugging symbols found)...done.
[Thread debugging using libthread_db enabled]
Loaded symbols for /lib64/libpthread.so.0
Reading symbols from /lib64/ld-linux-x86-64.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib64/ld-linux-x86-64.so.2
Reading symbols from /lib64/libidn.so.11...(no debugging symbols found)...done.
Loaded symbols for /lib64/libidn.so.11
Reading symbols from /lib64/libldap-2.4.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib64/libldap-2.4.so.2
Reading symbols from /lib64/libgssapi_krb5.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib64/libgssapi_krb5.so.2
Reading symbols from /lib64/libkrb5.so.3...(no debugging symbols found)...done.
Loaded symbols for /lib64/libkrb5.so.3
Reading symbols from /lib64/libk5crypto.so.3...(no debugging symbols found)...done.
Loaded symbols for /lib64/libk5crypto.so.3
Reading symbols from /lib64/libcom_err.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib64/libcom_err.so.2
Reading symbols from /usr/lib64/libssl3.so...(no debugging symbols found)...done.
Loaded symbols for /usr/lib64/libssl3.so
Reading symbols from /usr/lib64/libsmime3.so...(no debugging symbols found)...done.
Loaded symbols for /usr/lib64/libsmime3.so
Reading symbols from /usr/lib64/libnss3.so...(no debugging symbols found)...done.
Loaded symbols for /usr/lib64/libnss3.so
Reading symbols from /usr/lib64/libnssutil3.so...(no debugging symbols found)...done.
Loaded symbols for /usr/lib64/libnssutil3.so
Reading symbols from /lib64/libplds4.so...(no debugging symbols found)...done.
Loaded symbols for /lib64/libplds4.so
Reading symbols from /lib64/libplc4.so...(no debugging symbols found)...done.
Loaded symbols for /lib64/libplc4.so
Reading symbols from /lib64/libnspr4.so...(no debugging symbols found)...done.
Loaded symbols for /lib64/libnspr4.so
Reading symbols from /usr/lib64/libssh2.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/lib64/libssh2.so.1
Reading symbols from /lib64/liblber-2.4.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib64/liblber-2.4.so.2
Reading symbols from /usr/lib64/libsasl2.so.2...(no debugging symbols found)...done.
Loaded symbols for /usr/lib64/libsasl2.so.2
Reading symbols from /lib64/libkrb5support.so.0...(no debugging symbols found)...done.
Loaded symbols for /lib64/libkrb5support.so.0
Reading symbols from /lib64/libkeyutils.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib64/libkeyutils.so.1
Reading symbols from /lib64/libselinux.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib64/libselinux.so.1
Reading symbols from /usr/local/php_5.5/lib/php/extensions/no-debug-non-zts-20121212/uuid.so...done.
Loaded symbols for /usr/local/php_5.5/lib/php/extensions/no-debug-non-zts-20121212/uuid.so
Reading symbols from /lib64/libuuid.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib64/libuuid.so.1
Reading symbols from /usr/local/php_5.5/lib/php/extensions/no-debug-non-zts-20121212/memcache.so...done.
Loaded symbols for /usr/local/php_5.5/lib/php/extensions/no-debug-non-zts-20121212/memcache.so
Reading symbols from /usr/local/php_5.5/lib/php/extensions/no-debug-non-zts-20121212/gearman.so...done.
Loaded symbols for /usr/local/php_5.5/lib/php/extensions/no-debug-non-zts-20121212/gearman.so
Reading symbols from /usr/lib64/libgearman.so.8...(no debugging symbols found)...done.
Loaded symbols for /usr/lib64/libgearman.so.8
Reading symbols from /usr/lib64/libboost_system.so.5...(no debugging symbols found)...done.
Loaded symbols for /usr/lib64/libboost_system.so.5
Reading symbols from /usr/lib64/libstdc++.so.6...(no debugging symbols found)...done.
Loaded symbols for /usr/lib64/libstdc++.so.6
Reading symbols from /lib64/libgcc_s.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib64/libgcc_s.so.1
Reading symbols from /usr/local/php_5.5/lib/php/extensions/no-debug-non-zts-20121212/monip.so...done.
Loaded symbols for /usr/local/php_5.5/lib/php/extensions/no-debug-non-zts-20121212/monip.so
Reading symbols from /usr/local/php_5.5/lib/php/extensions/no-debug-non-zts-20121212/swoole.so...done.
Loaded symbols for /usr/local/php_5.5/lib/php/extensions/no-debug-non-zts-20121212/swoole.so
Core was generated by `php main.php last exception_ip --max-rows=1 -v'.
Program terminated with signal 11, Segmentation fault.
#0 0x00000000007bf589 in zend_hash_index_find (ht=0x1033170, h=18446744073709551615, pData=0x7fff4fb659c8)
at /home/junzuo/php-5.5.13/Zend/zend_hash.c:1021
1021 /home/junzuo/php-5.5.13/Zend/zend_hash.c: No such file or directory.
in /home/junzuo/php-5.5.13/Zend/zend_hash.c
Missing separate debuginfos, use: debuginfo-install boost-system-1.41.0-18.el6.x86_64 bzip2-libs-1.0.5-7.el6_0.x86_64 cyrus-sasl-lib-2.1.23-13.el6_3.1.x86_64 freetype-2.3.11-14.el6_3.1.x86_64 glibc-2.12-1.132.el6_5.2.x86_64 gmp-4.3.1-7.el6_2.2.x86_64 keyutils-libs-1.4-4.el6.x86_64 krb5-libs-1.10.3-15.el6_5.1.x86_64 libcom_err-1.41.12-18.el6_5.1.x86_64 libcurl-7.19.7-37.el6_5.3.x86_64 libgcc-4.4.7-4.el6.x86_64 libgcrypt-1.4.5-11.el6_4.x86_64 libgearman-1.1.8-2.el6.x86_64 libgpg-error-1.7-4.el6.x86_64 libidn-1.18-2.el6.x86_64 libjpeg-turbo-1.2.1-3.el6_5.x86_64 libpng-1.2.49-1.el6_2.x86_64 libselinux-2.0.94-5.3.el6_4.1.x86_64 libssh2-1.4.2-1.el6.x86_64 libstdc++-4.4.7-4.el6.x86_64 libuuid-2.17.2-12.14.el6_5.x86_64 libxml2-2.7.6-14.el6_5.2.x86_64 libxslt-1.1.26-2.el6_3.1.x86_64 ncurses-libs-5.7-3.20090208.el6.x86_64 nspr-4.9.2-1.el6.x86_64 nss-3.14.0.0-12.el6.x86_64 nss-softokn-freebl-3.14.3-10.el6_5.x86_64 nss-util-3.14.0.0-2.el6.x86_64 openldap-2.4.23-31.el6.x86_64 openssl-1.0.1e-16.el6_5.14.x86_64 readline-6.0-4.el6.x86_64 zlib-1.2.3-29.el6.x86_64
(gdb) bt
#0 0x00000000007bf589 in zend_hash_index_find (ht=0x1033170, h=18446744073709551615, pData=0x7fff4fb659c8)
at /home/junzuo/php-5.5.13/Zend/zend_hash.c:1021
#1 0x00000000007c35dc in _zend_list_delete (id=-1) at /home/junzuo/php-5.5.13/Zend/zend_list.c:54
#2 0x000000000076b598 in _php_stream_free (stream=, close_options=19) at /home/junzuo/php-5.5.13/main/streams/streams.c:470
#3 0x00007f6cd1b165fa in php_monip_dtor (rsrc=) at /home/junzuo/php_ext_tmp/monip-master/monip.c:165
#4 0x00000000007c32be in plist_entry_destructor (ptr=0x1c2df70) at /home/junzuo/php-5.5.13/Zend/zend_list.c:209
#5 0x00000000007bfcb5 in zend_hash_apply_deleter (ht=0x10331b8, p=0x1c2df00) at /home/junzuo/php-5.5.13/Zend/zend_hash.c:650
#6 0x00000000007bff48 in zend_hash_graceful_reverse_destroy (ht=0x10331b8) at /home/junzuo/php-5.5.13/Zend/zend_hash.c:687
#7 0x00000000007b3299 in zend_shutdown () at /home/junzuo/php-5.5.13/Zend/zend.c:816
#8 0x0000000000753e9a in php_module_shutdown () at /home/junzuo/php-5.5.13/main/main.c:2384
#9 0x0000000000863025 in main (argc=6, argv=0x19c91c0) at /home/junzuo/php-5.5.13/sapi/cli/php_cli.c:1393

from monip.

hanlicun avatar hanlicun commented on July 24, 2024

CentOS 6.3 64Bit
PHP 5.6.0(CLI / Apache) (当前我的版本)
相关初始化代码:

出现警告错误:
PHP Warning: Haven't call monip_init() method in /root/ip.php on line 10

Warning: Haven't call monip_init() method in /root/ip.php on line 10
string(3) "N/A"

from monip.

shukean avatar shukean commented on July 24, 2024

调用 monip_find前需要执行monip_init方法

from monip.

Related Issues (5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.