- 积分
- 184
- 威望
-
- 金钱
-
- 注册时间
- 2013-9-3
- 在线时间
- 小时
- 最后登录
- 1970-1-1
|
网站打开正常,ocp.php看了也正常,有击中,这个问题跟opcache有关的。看了 php-fpm.log 日志。而且是刚刚重启好 php-fpm ,日志提示准备握手马上就会出下面的这些警告。
[01-Jun-2014 22:55:22] NOTICE: using inherited socket fd=8, "/tmp/php-cgi.sock"
[01-Jun-2014 22:55:22] NOTICE: fpm is running, pid 3452
[01-Jun-2014 22:55:22] NOTICE: ready to handle connections
[01-Jun-2014 22:55:23] WARNING: [pool www] child 3453 exited on signal 11 (SIGSEGV) after 1.013509 seconds from start
[01-Jun-2014 22:55:23] NOTICE: [pool www] child 3454 started
[01-Jun-2014 22:55:24] WARNING: [pool www] child 3454 exited on signal 11 (SIGSEGV) after 1.005096 seconds from start
[01-Jun-2014 22:55:24] NOTICE: [pool www] child 3455 started
[01-Jun-2014 22:55:25] WARNING: [pool www] child 3455 exited on signal 11 (SIGSEGV) after 1.004855 seconds from start
……
中间略去一万个字……
……
[01-Jun-2014 23:16:00] NOTICE: [pool www] child 4358 started
[01-Jun-2014 23:16:03] WARNING: [pool www] child 4358 exited on signal 6 (SIGABRT) after 3.010518 seconds from start
[01-Jun-2014 23:16:03] NOTICE: [pool www] child 4359 started
[01-Jun-2014 23:16:06] WARNING: [pool www] child 4359 exited on signal 6 (SIGABRT) after 3.352217 seconds from start
[01-Jun-2014 23:16:06] NOTICE: [pool www] child 4360 started
[01-Jun-2014 23:16:09] WARNING: [pool www] child 4360 exited on signal 6 (SIGABRT) after 3.008839 seconds from start
[01-Jun-2014 23:16:09] NOTICE: [pool www] child 4361 started
……
未完待续,略NNNNN个字……
全是这样的,不断的在刷新。然后我如果在 php.ini 里面将 opcache 关闭,重启php后,就不会有上面的这些错误了。确定是因opcache引发的问题。
首先我查了slow.log,无内容。
然后我将 php-fpm 工作进程设置成一个。
执行
kill -USR2 `cat /usr/local/php/var/run/php-fpm.pid`
ps -aux | grep php-fpm
获得进程数时,
strace -p 4250 当时因为php-fpm工作进程在开启,进程数都不断的在刷新。获得下面数据,麻烦军哥看看到底哪里出问题了。
Process 4250 attached - interrupt to quit
restart_syscall(<... resuming interrupted call ...>) = 0
open("/proc/stat", O_RDONLY) = 5
fstat(5, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
lseek(5, 0, SEEK_CUR) = 0
fstat(5, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
read(5, "cpu 5394 0 2157 1556612 602 1 5"..., 8192) = 388
read(5, "", 8192) = 0
read(5, "", 8192) = 0
close(5) = 0
open("/proc/cpuinfo", O_RDONLY) = 5
fstat(5, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
lseek(5, 0, SEEK_CUR) = 0
fstat(5, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
read(5, "processor\t: 0\nvendor_id\t: Genuin"..., 8192) = 1486
read(5, "", 8192) = 0
read(5, "", 8192) = 0
close(5) = 0
open("/proc/uptime", O_RDONLY) = 5
fstat(5, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
lseek(5, 0, SEEK_CUR) = 0
fstat(5, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
read(5, "7839.33 15593.73\n", 8192) = 17
read(5, "", 8192) = 0
read(5, "", 8192) = 0
close(5) = 0
open("/proc/meminfo", O_RDONLY) = 5
fstat(5, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
lseek(5, 0, SEEK_CUR) = 0
fstat(5, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
read(5, "MemTotal: 2040896 kB\nMemF"..., 8192) = 1014
read(5, "", 8192) = 0
read(5, "", 8192) = 0
close(5) = 0
open("/proc/loadavg", O_RDONLY) = 5
fstat(5, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
lseek(5, 0, SEEK_CUR) = 0
fstat(5, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
read(5, "0.00 0.01 0.05 1/108 4251\n", 8192) = 26
read(5, "", 8192) = 0
read(5, "", 8192) = 0
close(5) = 0
open("/dev/tty", O_RDWR|O_NOCTTY|O_NONBLOCK) = -1 ENXIO (No such device or address)
writev(2, [{"*** glibc detected *** ", 23}, {"php-fpm: pool www", 17}, {": ", 2}, {"free(): invalid pointer", 23}, {": 0x", 4}, {"00007f39add26848", 16}, {" ***\n", 5}], 7) = 90
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f39add46000
open("/etc/ld.so.cache", O_RDONLY) = 5
fstat(5, {st_mode=S_IFREG|0644, st_size=30530, ...}) = 0
mmap(NULL, 30530, PROT_READ, MAP_PRIVATE, 5, 0) = 0x7f39adb95000
close(5) = 0
open("/lib64/libgcc_s.so.1", O_RDONLY) = 5
read(5, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\20)\0\0\0\0\0\0"..., 832) = 832
fstat(5, {st_mode=S_IFREG|0755, st_size=90880, ...}) = 0
mmap(NULL, 2186584, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 5, 0) = 0x7f399912e000
mprotect(0x7f3999144000, 2093056, PROT_NONE) = 0
mmap(0x7f3999343000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 5, 0x15000) = 0x7f3999343000
close(5) = 0
munmap(0x7f39adb95000, 30530) = 0
futex(0x7f39ab617620, FUTEX_WAKE_PRIVATE, 2147483647) = 0
futex(0x7f3999343af0, FUTEX_WAKE_PRIVATE, 2147483647) = 0
write(2, "======= Backtrace: =========\n", 29) = 29
writev(2, [{"/lib64/libc.so.6", 16}, {"(", 1}, {"+0x", 3}, {"76166", 5}, {")", 1}, {"[0x", 3}, {"7f39ab2fb166", 12}, {"]\n", 2}], 8) = 43
writev(2, [{"php-fpm: pool www", 17}, {"(", 1}, {"zend_hash_destroy", 17}, {"+0x", 3}, {"20", 2}, {")", 1}, {"[0x", 3}, {"7e2410", 6}, {"]\n", 2}], 9) = 52
writev(2, [{"php-fpm: pool www", 17}, {"(", 1}, {"_zval_dtor_func", 15}, {"+0x", 3}, {"8b", 2}, {")", 1}, {"[0x", 3}, {"7d40bb", 6}, {"]\n", 2}], 9) = 50
writev(2, [{"php-fpm: pool www", 17}, {"[0x", 3}, {"803c6a", 6}, {"]\n", 2}], 4) = 28
writev(2, [{"php-fpm: pool www", 17}, {"(", 1}, {"execute_ex", 10}, {"+0x", 3}, {"40", 2}, {")", 1}, {"[0x", 3}, {"848660", 6}, {"]\n", 2}], 9) = 45
writev(2, [{"php-fpm: pool www", 17}, {"(", 1}, {"zend_execute_scripts", 20}, {"+0x", 3}, {"199", 3}, {")", 1}, {"[0x", 3}, {"7d43e9", 6}, {"]\n", 2}], 9) = 56
writev(2, [{"php-fpm: pool www", 17}, {"(", 1}, {"php_execute_script", 18}, {"+0x", 3}, {"1a9", 3}, {")", 1}, {"[0x", 3}, {"7760d9", 6}, {"]\n", 2}], 9) = 54
writev(2, [{"php-fpm: pool www", 17}, {"[0x", 3}, {"88d5e2", 6}, {"]\n", 2}], 4) = 28
writev(2, [{"/lib64/libc.so.6", 16}, {"(", 1}, {"__libc_start_main", 17}, {"+0x", 3}, {"fd", 2}, {")", 1}, {"[0x", 3}, {"7f39ab2a3d1d", 12}, {"]\n", 2}], 9) = 57
writev(2, [{"php-fpm: pool www", 17}, {"[0x", 3}, {"42e9b9", 6}, {"]\n", 2}], 4) = 28
write(2, "======= Memory map: ========\n", 29) = 29
open("/proc/self/maps", O_RDONLY) = 5
read(5, "00400000-00b02000 r-xp 00000000 "..., 1024) = 1024
write(2, "00400000-00b02000 r-xp 00000000 "..., 1024) = 1024
read(5, "9a1548000-7f39a1549000 r--p 0000"..., 1024) = 1024
write(2, "9a1548000-7f39a1549000 r--p 0000"..., 1024) = 1024
read(5, "000000 ca:00 24743 "..., 1024) = 1024
write(2, "000000 ca:00 24743 "..., 1024) = 1024
read(5, "rw-p 00016000 ca:00 573962 "..., 1024) = 1024
write(2, "rw-p 00016000 ca:00 573962 "..., 1024) = 1024
read(5, "000 ca:00 24758 "..., 1024) = 1024
write(2, "000 ca:00 24758 "..., 1024) = 1024
read(5, "c000-7f39a89ab000 ---p 00019000 "..., 1024) = 1024
write(2, "c000-7f39a89ab000 ---p 00019000 "..., 1024) = 1024
read(5, "9a8de4000 rw-p 00000000 00:00 0 "..., 1024) = 1024
write(2, "9a8de4000 rw-p 00000000 00:00 0 "..., 1024) = 1024
read(5, "r--p 00002000 ca:00 24749 "..., 1024) = 1024
write(2, "r--p 00002000 ca:00 24749 "..., 1024) = 1024
read(5, "a:00 806 "..., 1024) = 1024
write(2, "a:00 806 "..., 1024) = 1024
read(5, " /lib64/libc"..., 1024) = 1024
write(2, " /lib64/libc"..., 1024) = 1024
read(5, " /lib64/libgssa"..., 1024) = 1024
write(2, " /lib64/libgssa"..., 1024) = 1024
read(5, "/lib64/libidn.so.11.6.1\n7f39aabd"..., 1024) = 1024
write(2, "/lib64/libidn.so.11.6.1\n7f39aabd"..., 1024) = 1024
read(5, "0016000 ca:00 24653 "..., 1024) = 1024
write(2, "0016000 ca:00 24653 "..., 1024) = 1024
read(5, "cal/lib/libiconv.so.2.5.1\n7f39ab"..., 1024) = 1024
write(2, "cal/lib/libiconv.so.2.5.1\n7f39ab"..., 1024) = 1024
read(5, "7f39ac1df000 r--p 00061000 ca:00"..., 1024) = 1024
write(2, "7f39ac1df000 r--p 00061000 ca:00"..., 1024) = 1024
read(5, " /lib64/libdl-"..., 1024) = 1024
write(2, " /lib64/libdl-"..., 1024) = 1024
read(5, "-xp 00000000 ca:00 163880 "..., 1024) = 1024
write(2, "-xp 00000000 ca:00 163880 "..., 1024) = 1024
read(5, "ad4dd000 r-xp 00000000 ca:00 246"..., 1024) = 1024
write(2, "ad4dd000 r-xp 00000000 ca:00 246"..., 1024) = 1024
read(5, "o\n7f39adafc000-7f39adafd000 rw-p"..., 1024) = 1024
write(2, "o\n7f39adafc000-7f39adafd000 rw-p"..., 1024) = 1024
read(5, " [vsyscall]\n", 1024) = 24
write(2, " [vsyscall]\n", 24) = 24
read(5, "", 1024) = 0
close(5) = 0
rt_sigprocmask(SIG_UNBLOCK, [ABRT], NULL, 8) = 0
tgkill(4250, 4250, SIGABRT) = 0
--- SIGABRT (Aborted) @ 0 (0) ---
Process 4250 detached
[ 本帖最后由 ldlbf 于 2014-6-1 23:31 编辑 ] |
|