Hello,

I'm seeing a problem with an installation of PHP4/Apache2 and I don't
know where the cause of the problem is.

I'm using the Debian Sarge versions of apache2/php4 which are

ii  libapache2-mod-php4           4.3.10-16
ii  apache2-mpm-prefork           2.0.54-5

I have the problem that sometimes an apache-Process is locking a
PHP-Session file and is "hanging" in a poll() without releasing the
lock. All other apache processes are trying to FLOCK the file and hang
too. I don't know what is causing that effect, two backtraces of the
apache2 processes showed the following:

(gdb) bt
#0  0xb7bfe4d9 in poll () from /lib/tls/libc.so.6
#1  0xb7ccc4fd in apr_poll () from /usr/lib/libapr-0.so.0
#2  0xb7cccc33 in apr_wait_for_io_or_timeout () from /usr/lib/libapr-0.so.0
#3  0xb7cc224f in apr_socket_sendv () from /usr/lib/libapr-0.so.0
#4  0xb7cc26c4 in apr_sendv () from /usr/lib/libapr-0.so.0
#5  0x0808da52 in ap_add_output_filters_by_type ()
#6  0x0808eff7 in ap_core_translate ()
#7  0x08086111 in ap_pass_brigade ()
#8  0x08086111 in ap_pass_brigade ()
#9  0x080676d1 in ap_http_header_filter ()
#10 0x08086111 in ap_pass_brigade ()
#11 0x08088bae in ap_content_length_filter ()
#12 0x08086111 in ap_pass_brigade ()
#13 0x08069128 in ap_byterange_filter ()
#14 0x08086111 in ap_pass_brigade ()
#15 0xb7e11c94 in apr_brigade_write () from /usr/lib/libaprutil-0.so.0
#16 0x08088f8d in ap_old_write_filter ()
#17 0x0808909b in ap_rwrite ()
#18 0xb7857128 in execute () from /usr/lib/apache2/modules/libphp4.so
#19 0xb7826585 in php_ob_get_length () from /usr/lib/apache2/modules/libphp4.so
#20 0x0888fbac in ?? ()
#21 0x000063d7 in ?? ()
#22 0xbfdb0608 in ?? ()
#23 0xb79e8274 in ?? () from /usr/lib/apache2/modules/libphp4.so
#24 0xb79ed4a0 in phpinfo_logo_hash () from /usr/lib/apache2/modules/libphp4.so
#25 0xbfdb0690 in ?? ()
#26 0xbfdb0628 in ?? ()
#27 0xb782664f in php_ob_get_length () from /usr/lib/apache2/modules/libphp4.so
#28 0x0888fbac in ?? ()
#29 0x000063d7 in ?? ()
#30 0xb7c61840 in __after_morecore_hook () from /lib/tls/libc.so.6
#31 0xb7c61840 in __after_morecore_hook () from /lib/tls/libc.so.6
#32 0xb79e8274 in ?? () from /usr/lib/apache2/modules/libphp4.so
#33 0x087ebe5c in ?? ()
#34 0xbfdb0648 in ?? ()
#35 0xb78253b9 in php_body_write () from /usr/lib/apache2/modules/libphp4.so
Previous frame inner to this frame (corrupt stack?)

and

(gdb) bt
#0  0xb7bfe4d9 in poll () from /lib/tls/libc.so.6
#1  0xb7ccc4fd in apr_poll () from /usr/lib/libapr-0.so.0
#2  0xb7cccc33 in apr_wait_for_io_or_timeout () from /usr/lib/libapr-0.so.0
#3  0xb7cc224f in apr_socket_sendv () from /usr/lib/libapr-0.so.0
#4  0xb7cc26c4 in apr_sendv () from /usr/lib/libapr-0.so.0
#5  0x0808da52 in ap_add_output_filters_by_type ()
#6  0x0808eff7 in ap_core_translate ()
#7  0x08086111 in ap_pass_brigade ()
#8  0x08086111 in ap_pass_brigade ()
#9  0x080676d1 in ap_http_header_filter ()
#10 0x08086111 in ap_pass_brigade ()
#11 0x08088bae in ap_content_length_filter ()
#12 0x08086111 in ap_pass_brigade ()
#13 0x08069128 in ap_byterange_filter ()
#14 0x08086111 in ap_pass_brigade ()
#15 0xb7e11c94 in apr_brigade_write () from /usr/lib/libaprutil-0.so.0
#16 0x08088f8d in ap_old_write_filter ()
#17 0x0808909b in ap_rwrite ()
#18 0xb7857128 in execute () from /usr/lib/apache2/modules/libphp4.so
#19 0xb7826585 in php_ob_get_length () from /usr/lib/apache2/modules/libphp4.so
#20 0x0891a674 in ?? ()
#21 0x00006c93 in ?? ()
#22 0xbfdb3108 in ?? ()
#23 0xb79e8274 in ?? () from /usr/lib/apache2/modules/libphp4.so
#24 0xb79ed4a0 in phpinfo_logo_hash () from /usr/lib/apache2/modules/libphp4.so
#25 0x00000000 in ?? ()
#26 0xbfdb3128 in ?? ()
#27 0xb782664f in php_ob_get_length () from /usr/lib/apache2/modules/libphp4.so
#28 0x0891a674 in ?? ()
#29 0x00006c93 in ?? ()
#30 0xb7ba1e24 in mallopt () from /lib/tls/libc.so.6


After 3-5 minutes the process will return from the poll and deliver
the site.

Has anyone any ideas how to solve that problem?  I've never seen such
a problem before.


With kind regards,

Sebastian

-- 
GPG Key-ID: 0x76B79F20 (0x1B6034F476B79F20)
Wehret den Anfaengen: http://odem.org/informationsfreiheit/
'Are you Death?' ... IT'S THE SCYTHE, ISN'T IT? PEOPLE ALWAYS NOTICE THE SCYTHE.
            -- Terry Pratchett, The Fifth Elephant

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to