I get no php error messages. Is there a way to find it out any other way?
The process tree looked like
Code:
11045 root 15:27 ./lshttpd
11048 root 15:27 lscgid
11049 nobody 15:27 ./lshttpd
11051 nobody 15:27 lsphp -c ../php
11894 nobody 15:35 admin_php
11050 nobody 15:27 ./lshttpd
11428 nobody 15:30 lsphp -c ../php
12040 nobody 15:36 lsphp -c ../php
11052 nobody 15:27 ./lshttpd
11624 nobody 15:32 lsphp -c ../php
11625 nobody 15:32 lsphp -c ../php
11053 nobody 15:27 ./lshttpd
I tried strace (never used that, I program only php
) while it was running. I just guessed which PID's to follow.
[root@main includes]# /usr/bin/strace -p 11052
Process 11052 attached - interrupt to quit
epoll_wait(7, {}, 256, 100) = 0
recvfrom(6, 0x7fff06ec372f, 1, 2, 0, 0) = -1 EAGAIN (Resource temporarily unavailable)
epoll_wait(7, {}, 256, 100) = 0
epoll_wait(7, {}, 256, 100) = 0
epoll_wait(7, {}, 256, 100) = 0
epoll_wait(7, {}, 256, 100) = 0
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=3543, ...}) = 0
stat("/opt/lsws/logs/access.log", {st_mode=S_IFREG|0644, st_size=216576, ...}) = 0
stat("/opt/lsws/logs/error.log", {st_mode=S_IFREG|0644, st_size=2835, ...}) = 0
stat("/opt/lsws/logs/stderr.log", {st_mode=S_IFREG|0644, st_size=11720, ...}) = 0
open("/tmp/lshttpd/.rtreport.3.tmp", O_WRONLY|O_CREAT|O_TRUNC, 0644) = 14
fstat(14, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
fcntl(14, F_SETFD, FD_CLOEXEC) = 0
write(14, "VERSION: LiteSpeed Web Server/En"..., 64) = 64
write(14, "BPS_IN: 0, BPS_OUT: 0, SSL_BPS_I"..., 216) = 216
write(14, "REQ_RATE [xxxxx.net"..., 82) = 82
write(14, "REQ_RATE [xxxxx.net]: REQ"..., 76) = 76
write(14, "REQ_RATE [_AdminVHost]: REQ_PROC"..., 71) = 71
write(14, "REQ_RATE [Example]: REQ_PROCESSI"..., 67) = 67
write(14, "EXTAPP [LSAPI] [] [phpLsapi]: CM"..., 147) = 147
write(14, "EOF\n", 4) = 4
close(14) = 0
(repeating indefinitely)
and
[root@main includes]# /usr/bin/strace -p 11024
attach: ptrace(PTRACE_ATTACH, ...): No such process
[root@main includes]# /usr/bin/strace -p 11624
Process 11624 attached - interrupt to quit
select(1, [0], NULL, NULL, {0, 839000}) = 0 (Timeout)
kill(11052, SIG_0) = 0
select(1, [0], NULL, NULL, {1, 0}) = 0 (Timeout)
kill(11052, SIG_0) = 0
and
[root@main includes]# /usr/bin/strace -p 11428
Process 11428 attached - interrupt to quit
select(1, [0], NULL, NULL, {0, 583000}) = 0 (Timeout)
kill(11050, SIG_0) = 0
select(1, [0], NULL, NULL, {1, 0}) = 0 (Timeout)
kill(11050, SIG_0) = 0
Php process 11625 change pid all the time and just gave:
[root@main includes]# /usr/bin/strace -p 12681
Process 12681 attached - interrupt to quit
read(4, <unfinished ...>
Process 12681 detached
Just
read(4,
and nothing else, like it was hanged.
Now the script simply stopped and gave blank page at 10 minutes, and I got logged
2007-06-28 15:45:53.250 NOTICE [AutoRestarter] child process with pid=11050 received signal=11, a core file is created!
2007-06-28 15:45:53.282 NOTICE [AutoRestarter] cleanup children processes and unix sockets belong to process 11050 !
2007-06-28 15:45:53.383 NOTICE [AutoRestarter] child process with pid=11052 received signal=11, a core file is created!
2007-06-28 15:45:53.388 NOTICE [AutoRestarter] cleanup children processes and unix sockets belong to process 11052 !
and I did as you adviced in http://litespeedtech.com/support/forum/showthread.php?t=1041&highlight=core+dump
[root@main bak_core]# gdb /opt/lsws/bin/lshttpd core.11050
GNU gdb Red Hat Linux (6.5-16.el5rh)
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu"...Using host libthread_db library "/lib64/libthread_db.so.1".
Reading symbols from /lib64/libm.so.6...done.
Loaded symbols for /lib64/libm.so.6
Reading symbols from /lib64/libc.so.6...done.
Loaded symbols for /lib64/libc.so.6
Reading symbols from /lib64/libcrypt.so.1...done.
Loaded symbols for /lib64/libcrypt.so.1
Reading symbols from /lib64/libdl.so.2...done.
Loaded symbols for /lib64/libdl.so.2
Reading symbols from /lib64/ld-linux-x86-64.so.2...done.
Loaded symbols for /lib64/ld-linux-x86-64.so.2
Reading symbols from /lib64/libnss_files.so.2...done.
Loaded symbols for /lib64/libnss_files.so.2
Core was generated by `./lshttpd'.
Program terminated with signal 11, Segmentation fault.
#0 0x0000003df2675330 in strlen () from /lib64/libc.so.6
(gdb) bt
#0 0x0000003df2675330 in strlen () from /lib64/libc.so.6
#1 0x0000003df2645b88 in vfprintf () from /lib64/libc.so.6
#2 0x0000003df266669a in vsnprintf () from /lib64/libc.so.6
#3 0x0000000000468903 in log4cxx:
atternLayout::format ()
#4 0x0000000000467b3e in log4cxx::Appender::append ()
#5 0x0000000000467ed9 in log4cxx::Logger::vlog ()
#6 0x0000000000434036 in HttpLog::debug ()
#7 0x000000000044cf5a in HttpConnection:
rocessNewReq ()
#8 0x000000000044d8cb in HttpConnection:
nReadEx ()
#9 0x000000000044125b in HttpIOLink:
nReadT ()
#10 0x0000000000440bab in HttpIOLink::handleEvents ()
#11 0x0000000000466056 in epoll::waitAndProcessEvents ()
#12 0x000000000043a8b7 in EventDispatcher::run ()
#13 0x0000000000418091 in HttpServerImpl::start ()
#14 0x0000000000407ec9 in LshttpdMain::main ()
#15 0x0000000000404e21 in main ()
(gdb) quit
[root@main bak_core]# gdb /opt/lsws/bin/lshttpd core.11052
GNU gdb Red Hat Linux (6.5-16.el5rh)
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu"...Using host libthread_db library "/lib64/libthread_db.so.1".
Reading symbols from /lib64/libm.so.6...done.
Loaded symbols for /lib64/libm.so.6
Reading symbols from /lib64/libc.so.6...done.
Loaded symbols for /lib64/libc.so.6
Reading symbols from /lib64/libcrypt.so.1...done.
Loaded symbols for /lib64/libcrypt.so.1
Reading symbols from /lib64/libdl.so.2...done.
Loaded symbols for /lib64/libdl.so.2
Reading symbols from /lib64/ld-linux-x86-64.so.2...done.
Loaded symbols for /lib64/ld-linux-x86-64.so.2
Reading symbols from /lib64/libnss_files.so.2...done.
Loaded symbols for /lib64/libnss_files.so.2
Core was generated by `./lshttpd'.
Program terminated with signal 11, Segmentation fault.
#0 0x0000003df2675330 in strlen () from /lib64/libc.so.6
(gdb) bt
#0 0x0000003df2675330 in strlen () from /lib64/libc.so.6
#1 0x0000003df2645b88 in vfprintf () from /lib64/libc.so.6
#2 0x0000003df266669a in vsnprintf () from /lib64/libc.so.6
#3 0x0000000000468903 in log4cxx:
atternLayout::format ()
#4 0x0000000000467b3e in log4cxx::Appender::append ()
#5 0x0000000000467ed9 in log4cxx::Logger::vlog ()
#6 0x0000000000434036 in HttpLog::debug ()
#7 0x000000000044cf5a in HttpConnection:
rocessNewReq ()
#8 0x000000000044d8cb in HttpConnection:
nReadEx ()
#9 0x000000000044125b in HttpIOLink:
nReadT ()
#10 0x0000000000440bab in HttpIOLink::handleEvents ()
#11 0x0000000000466056 in epoll::waitAndProcessEvents ()
#12 0x000000000043a8b7 in EventDispatcher::run ()
#13 0x0000000000418091 in HttpServerImpl::start ()
#14 0x0000000000407ec9 in LshttpdMain::main ()
#15 0x0000000000404e21 in main ()
Hopefully these are useful.
Last edited: Jun 28, 2007