Hi folks:
There's a problem that I've been trying to figure out since
PHP 4.3.5. My last try was with yesterday PHP's snapshot (200404221230).
Using domxml extension compiled as a module, PHP exits with
"Illegal Instruction". Apache breaks out and even remove it's pid
file. When I don't load this extension, everything works fine.
The problem shows up only using PHP with apache (1.3.29, EAPI),
using PHP's cli everything works fine (with domxml extension).
I'm trying to debug it with gdb, but as there's no segfault
I can't generate a backtrace. How can I trace it? I'm
almost a gdb newbie, I just use most common commands of it
(break, continue, bt, up, down,...)
This problem is platform specific. I didn't get it on i386, using
same libxml, libxslt and zlib versions.
Let's go to the informations:
RedHat 7.2 (s390)
GCC 2.95.3
GLIBC 2.2.4
Kernel 2.4.9
libxml2 2.6.6
libxslt 1.1.3
zlib 1.1.4
PHP compile options:
./configure --prefix=$PREFIX
--with-config-file-path=$PREFIX/etc
--enable-debug
--disable-ipv6
--with-apxs=$APACHE_DIR/bin/apxs
--enable-force-cgi-redirect
--enable-ftp=shared
--enable-dbase=shared
--with-dom=shared
--with-dom-xslt=shared
--with-dom-exslt=shared
--with-zlib-dir
--without-mysql
Apache compile options (after EAPI patching)
./configure --prefix=$PREFIX
--enable-shared=max
--enable-module=so
--enable-rule=EAPI
--enable-suexec
--suexec-caller=apache
Apache's error log:
[Fri Apr 23 08:24:13 2004] [notice] Apache/1.3.29 (Unix) PHP/4.3.7-dev
configured -- resuming normal operations
[Fri Apr 23 08:24:13 2004] [notice] suEXEC mechanism enabled (wrapper:
/home/wwwdisco2/local/apache/bin/suexec)
[Fri Apr 23 08:24:13 2004] [notice] Accept mutex: sysvsem (Default: sysvsem)
[Fri Apr 23 08:24:31 2004] [notice] child pid 13860 exit signal Illegal
instruction (4)
GDB:
[root@cohab local]# gdb ./apache/bin/httpd
GNU gdb Red Hat Linux (5.1-1)
Copyright 2001 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 "s390-redhat-linux"...
(gdb) handle SIGTRAP
nopass nostop noprint
SIGTRAP
is used by the debugger.
Are you sure you want to change it? (y or n) y
Signal Stop Print Pass to program Description
SIGTRAP
No No No Trace/breakpoint trap
(gdb) break main
Breakpoint 1 at 0x4247a4
(gdb) run -X
Starting program: ./apache/bin/httpd -X
Breakpoint 1, 0x004247a4 in main ()
(gdb) continue
Continuing.
[New Thread 1024 (LWP 13913)]
Program received signal SIGILL, Illegal instruction.
[Switching to Thread 1024 (LWP 13913)]
0x00000000 in ?? ()
(gdb)
Any ideas how can I face this problem, or how can I debug it ?
thanks a lot in advance.
--
[]'s
Lucas Brasilino
brasilino@recife.pe.gov.br
http://www.recife.pe.gov.br
Emprel - Empresa Municipal de Informatica (pt_BR)
Municipal Computing Enterprise (en_US)
Recife - Pernambuco - Brasil
Fone: +55-81-34167078