我正在尝试运行使用nohup php file.php&解析.torrent文件的脚本。几秒钟后,它表示分段故障核心被丢弃。我试过了:
gdb / usr / bin / php core.19242
[root@prod1 home]# gdb /usr/bin/php core.19242
GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-64.el7
Copyright (C) 2013 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/bin/php...Reading symbols from /usr/lib/debug/usr/bin/php.debug...done.
done.
[New LWP 19242]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `php parse_files.php'.
Program terminated with signal 11, Segmentation fault.
#0 __find_specmb (format=0x7f5a29cc2c3e "%s\n") at printf-parse.h:109
109 return (const unsigned char *) __strchrnul ((const char *) format, '%');
Missing separate debuginfos, use: debuginfo-install libcurl-7.43.0-1.0.cf.rhel7.x86_64 libssh2-1.6.0-2.0.cf.rhel7.x86_64
我已尝试安装许多gdb建议我使用
安装的软件包debuginfo-install --enablerepo=webtatic-debuginfo bzip2-libs-1.0.6-12.el7.x86_64 cyrus-sasl-lib-2.1.26-17.el7.x86_64 freetype-2.4.11-10.el7_1.1.x86_64 gmp-6.0.0-11.el7.x86_64 keyutils-libs-1.5.8-3.el7.x86_64 libX11-1.6.0-2.1.el7.x86_64 libXau-1.0.8-2.1.el7.x86_64 libXpm-3.5.10-5.1.el7.x86_64 libcurl-7.43.0-1.0.cf.rhel7.x86_64 libidn-1.28-3.el7.x86_64 libjpeg-turbo-1.2.90-5.el7.x86_64 libpng-1.5.13-5.el7.x86_64 libselinux-2.2.2-6.el7.x86_64 libssh2-1.6.0-2.0.cf.rhel7.x86_64 libxcb-1.9-5.el7.x86_64 nspr-4.10.8-1.el7_1.x86_64 nss-3.19.1-3.el7_1.x86_64 nss-softokn-freebl-3.16.2.3-9.el7.x86_64 nss-util-3.19.1-1.el7_1.x86_64 openldap-2.4.39-6.el7.x86_64 pcre-8.32-14.el7.x86_64 sqlite-3.7.17-4.el7.x86_64 t1lib-5.1.2-14.el7.x86_64 xz-libs-5.1.2-9alpha.el7.x86_64
但现在我正在做的事情:
debuginfo-install libcurl-7.43.0-1.0.cf.rhel7.x86_64 libssh2-1.6.0-2.0.cf.rhel7.x86_64
[root@prod1 home]# debuginfo-install libcurl-7.43.0-1.0.cf.rhel7.x86_64 libssh2-1.6.0-2.0.cf.rhel7.x86_64
Loaded plugins: auto-update-debuginfo, fastestmirror
enabling epel-debuginfo
enabling base-debuginfo
Loading mirror speeds from cached hostfile
* base: centos.mirror.netelligent.ca
* epel: mirror.cogentco.com
* epel-debuginfo: mirror.cogentco.com
* extras: centos.mirror.ca.planethoster.net
* updates: centos.mirrors.atwab.net
Could not find debuginfo for main pkg: libcurl-7.43.0-1.0.cf.rhel7.x86_64
Package glibc-debuginfo-2.17-78.el7.x86_64 already installed and latest version
Package e2fsprogs-debuginfo-1.42.9-7.el7.x86_64 already installed and latest version
Package krb5-debuginfo-1.12.2-14.el7.x86_64 already installed and latest version
Package libidn-debuginfo-1.28-3.el7.x86_64 already installed and latest version
Package openldap-debuginfo-2.4.39-6.el7.x86_64 already installed and latest version
Package nspr-debuginfo-4.10.8-1.el7_1.x86_64 already installed and latest version
Package nss-debuginfo-3.19.1-3.el7_1.x86_64 already installed and latest version
Package nss-util-debuginfo-3.19.1-1.el7_1.x86_64 already installed and latest version
Could not find debuginfo pkg for dependency package libssh2-1.6.0-2.0.cf.rhel7.x86_64
Package zlib-debuginfo-1.2.7-13.el7.x86_64 already installed and latest version
Package 1:openssl-debuginfo-1.0.1e-42.el7.9.x86_64 already installed and latest version
No debuginfo packages available to install
我甚至试过
debuginfo-install --enablerepo=webtatic libcurl-7.43.0-1.0.cf.rhel7.x86_64 libssh2-1.6.0-2.0.cf.rhel7.x86_64
我如何知道导致此分段错误的原因?当我使用nohup执行PHP脚本时,我有nohup.out文件包含许多像这样的行 tail nohup.out
[root@prod1 home]# tail nohup.out
Notice: String offset cast occurred in /home/data/nginx/html/admin/Bcode.php on line 145
PHP Notice: String offset cast occurred in /home/data/nginx/html/admin/Bcode.php on line 118
Notice: String offset cast occurred in /home/data/nginx/html/admin/Bcode.php on line 118
PHP Notice: String offset cast occurred in /home/data/nginx/html/admin/Bcode.php on line 168
Notice: String offset cast occurred in /home/data/nginx/html/admin/Bcode.php on line 168
PHP Notice: String offset cast occurred in /home/data/nginx/html/admin/Bcode.php on line 170
Notice: String offset cast occurred in /home/data/nginx/html/admin/Bcode.php on line 170
是否会导致php出现段错误?
我使用较旧的TorrentParse GTK库来解析torrent文件。