ID:               33281
 User updated by:  jimmy dot makela at loopia dot se
 Reported By:      jimmy dot makela at loopia dot se
 Status:           Open
 Bug Type:         Apache related
 Operating System: FreeBSD 4.9-RELEASE-p10
 PHP Version:      4.3.11
 New Comment:

When it happened again yesterday the last request before the problem
occured (and the process started looping) was a script using
GD-functions for creating thumbnails, so GD is the prime suspect.

The version of the GD-port installed is gd-2.0.33_1,1

The GD-library is not stripped either, and it is compiled with standard
options. We have verified that the dynamic symbols look ok, I'm guessing
that it is GDB which is confused by the dlopen'ed library?

I'll try to create a small script for reproducing the problem and
stress-testing that script.


Previous Comments:
------------------------------------------------------------------------

[2005-06-09 22:17:42] jimmy dot makela at loopia dot se

Regarding your questions:

1. I don't know, I was hoping for a suggestion to that part. The
library have not been stripped manually, and doesn't seem to be
stripped. A recompile could be done if that would help, just specify
what to change.

# file /usr/local/libexec/apache/libphp4.so 
/usr/local/libexec/apache/libphp4.so: ELF 32-bit LSB shared object,
Intel 80386, version 1 (FreeBSD), not stripped

objdump -T does show symbols, but I have no idea of what object.11 maps
to. I can provide a complete list of the dynamic symbol table if that
helps.

2. A list of the loaded extensions follows:
php4-bcmath-4.3.11_1
php4-calendar-4.3.11_1
php4-ctype-4.3.11_1
php4-curl-4.3.11_1
php4-domxml-4.3.11_1
php4-exif-4.3.11_1
php4-extensions-1.0
php4-ftp-4.3.11_1
php4-gd-4.3.11_1
php4-gettext-4.3.11_1
php4-iconv-4.3.11_1
php4-imap-4.3.11_1
php4-mcrypt-4.3.11_1
php4-mysql-4.3.11_1
php4-overload-4.3.11_1
php4-pcre-4.3.11_1
php4-posix-4.3.11_1
php4-session-4.3.11_1
php4-tokenizer-4.3.11_1
php4-xml-4.3.11_1
php4-zlib-4.3.11_1

Let me know if you need additional information.

------------------------------------------------------------------------

[2005-06-09 16:45:55] [EMAIL PROTECTED]

A couple of questions.

1. Why is gdb just reporting object.11 instead of a real symbol?  Have
the symbols been stripped from your libphp4.so?  Could you recompile
and put them back to get a better backtrace?

2. Do you have any custom extensions loaded?  And if you do, are they
in C++?  The FreeBSD4 rtld has notoriously bad support for C++ shared
libraries.

------------------------------------------------------------------------

[2005-06-09 09:49:42] jimmy dot makela at loopia dot se

Description:
------------
Periodically on one of our webservers one apache-process starts using
up all CPU until it is killed.

A ktrace of the process gives the output:
 63458 httpd    CALL  sigprocmask(0x1,0x280a1060,0xbfbff540)
 63458 httpd    RET   sigprocmask 0
 63458 httpd    CALL  sigprocmask(0x3,0xbfbff540,0)
 63458 httpd    RET   sigprocmask 0
 63458 httpd    CALL  sigprocmask(0x1,0x280a1060,0xbfbff540)
 63458 httpd    RET   sigprocmask 0
 63458 httpd    CALL  sigprocmask(0x3,0xbfbff540,0)
 63458 httpd    RET   sigprocmask 0

ad infinitum.

When attaching to the process with GDB and doing a backtrace, we get
the following update:
#0  0x28092648 in symlook_obj () from /usr/libexec/ld-elf.so.1
#1  0x28091032 in dlclose () from /usr/libexec/ld-elf.so.1
#2  0x283b3251 in object.11 () from
/usr/local/libexec/apache/libphp4.so
#3  0x283b4bfc in object.11 () from
/usr/local/libexec/apache/libphp4.so
#4  0x283b4d3a in object.11 () from
/usr/local/libexec/apache/libphp4.so
#5  0x283b0a00 in object.11 () from
/usr/local/libexec/apache/libphp4.so
#6  0x2838cb7a in object.11 () from
/usr/local/libexec/apache/libphp4.so
#7  0x2838cb57 in object.11 () from
/usr/local/libexec/apache/libphp4.so
#8  0x283c911d in object.11 () from
/usr/local/libexec/apache/libphp4.so
#9  0x80557e8 in ap_child_exit_modules ()
#10 0x805a7b1 in clean_child_exit ()
#11 0x805bba2 in just_die ()
#12 0xbfbfffac in ?? ()
#13 0x28091f83 in r_debug_state () from /usr/libexec/ld-elf.so.1
#14 0x28091e1e in r_debug_state () from /usr/libexec/ld-elf.so.1
#15 0x2809021b in find_symdef () from /usr/libexec/ld-elf.so.1
#16 0x2808fa78 in _rtld_bind () from /usr/libexec/ld-elf.so.1
#17 0x2808f461 in _rtld_bind_start () from /usr/libexec/ld-elf.so.1
#18 0x805d3dd in make_child ()
#19 0x805d64c in perform_idle_server_maintenance ()
#20 0x805db5d in standalone_main ()
#21 0x805e0a7 in main ()
#22 0x804fd0e in _start ()

which to me suggest that something in the PHP cleanup code is
deadlocking.

Any help in getting to the bottom of this would be greatly appreciated.
If you need any additional information, we will provide it.



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=33281&edit=1

Reply via email to