You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Bardo Bakker <ba...@gmail.com> on 2012/01/28 13:16:28 UTC

[users@httpd] Proces killed after http post without ConentType header

Hi,

I wrote some software which post a binary (image) to our server.
After a reboot (due to resize HDD), the server has some post issues.
It hangs at the end of a http post without the content type header set.

I would like to know: is this a bug, configuration mistake, or miss
interpertation of http post protocol...

Tank you!



Version apache:
[root@www ~]# /usr/sbin/httpd -V
Server version: Apache/2.2.3
Server built:   Oct 20 2011 17:00:12
Server's Module Magic Number: 20051115:3
Server loaded:  APR 1.2.7, APR-Util 1.2.7
Compiled using: APR 1.2.7, APR-Util 1.2.7
Architecture:   64-bit
Server MPM:     Prefork
  threaded:     no
    forked:     yes (variable process count)
Server compiled with....
 -D APACHE_MPM_DIR="server/mpm/prefork"
 -D APR_HAS_SENDFILE
 -D APR_HAS_MMAP
 -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
 -D APR_USE_SYSVSEM_SERIALIZE
 -D APR_USE_PTHREAD_SERIALIZE
 -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
 -D APR_HAS_OTHER_CHILD
 -D AP_HAVE_RELIABLE_PIPED_LOGS
 -D DYNAMIC_MODULE_LIMIT=128
 -D HTTPD_ROOT="/etc/httpd"
 -D SUEXEC_BIN="/usr/sbin/suexec"
 -D DEFAULT_PIDLOG="run/httpd.pid"
 -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
 -D DEFAULT_LOCKFILE="logs/accept.lock"
 -D DEFAULT_ERRORLOG="logs/error_log"
 -D AP_TYPES_CONFIG_FILE="conf/mime.types"
 -D SERVER_CONFIG_FILE="conf/httpd.conf"

On kill/error/fault I found in error_log:

Sat Jan 28 12:56:09 2012] [notice] child pid 17077 exit signal Segmentation
fault (11), possible coredump in /tmp

So made a coredump: gdb: bt all:

Core was generated by `/usr/sbin/httpd -k start'.
Program terminated with signal 11, Segmentation fault.
#0  0x00007fe25c5696c0 in zend_hash_num_elements () from
/etc/httpd/modules/libphp5.so
(gdb) bt full
#0  0x00007fe25c5696c0 in zend_hash_num_elements () from
/etc/httpd/modules/libphp5.so
No symbol table info available.
#1  0x00007fe25c519606 in php_register_variable_ex () from
/etc/httpd/modules/libphp5.so
No symbol table info available.
#2  0x00007fe25c432625 in ?? () from /etc/httpd/modules/libphp5.so
No symbol table info available.
#3  0x00007fe25c51a0e9 in php_std_post_handler () from
/etc/httpd/modules/libphp5.so
No symbol table info available.
#4  0x00007fe25c513dd3 in sapi_handle_post () from
/etc/httpd/modules/libphp5.so
No symbol table info available.
#5  0x00007fe25c519d2b in php_default_treat_data () from
/etc/httpd/modules/libphp5.so
No symbol table info available.
#6  0x00007fe257248134 in mbstr_treat_data () from
/usr/lib64/php/modules/mbstring.so
No symbol table info available.
#7  0x00007fe25c51a2a1 in ?? () from /etc/httpd/modules/libphp5.so
No symbol table info available.
#8  0x00007fe25c50ab65 in php_request_startup () from
/etc/httpd/modules/libphp5.so
No symbol table info available.
#9  0x00007fe25c5e66d8 in ?? () from /etc/httpd/modules/libphp5.so
No symbol table info available.
#10 0x00007fe268e89aca in ap_run_handler ()
No symbol table info available.
#11 0x00007fe268e8cf58 in ap_invoke_handler ()
No symbol table info available.
#12 0x00007fe268e97a18 in ap_process_request ()
No symbol table info available.
#13 0x00007fe268e94c50 in ?? ()
No symbol table info available.
#14 0x00007fe268e90d52 in ap_run_process_connection ()
No symbol table info available.
#15 0x00007fe268e9be49 in ?? ()
No symbol table info available.
#16 0x00007fe268e9c0da in ?? ()
No symbol table info available.
#17 0x00007fe268e9c190 in ?? ()
No symbol table info available.
#18 0x00007fe268e9ce7b in ap_mpm_run ()
No symbol table info available.
#19 0x00007fe268e76e48 in main ()
No symbol table info available.

Re: [users@httpd] Proces killed after http post without ConentType header

Posted by Bardo Bakker <ba...@gmail.com>.
Runs perfect!

Op 29 jan. 2012 om 15:46 heeft Yehuda Katz <ye...@ymkatz.net> het volgende geschreven:

> On Sun, Jan 29, 2012 at 6:36 AM, Bardo Bakker <ba...@gmail.com> wrote:
> Tanx for reply!
>  
> In run on CentOS 5.7 (Latest). CentOS' policy is to have most stable versions which is apache 2.2.3... And this is not stable behaviour.
>  
> PHP Version => 5.3.9
> mysql  Ver 14.14 Distrib 5.5.20, for Linux (x86_64) using readline 5.1
>  
> Acording to this version info only my httpd is a out of date but should be stable. 
> 
> Were you able to run php -i ?
> That will usually tell you why PHP is crashing.
> 
> - Y

Re: [users@httpd] Proces killed after http post without ConentType header

Posted by Bardo Bakker <ba...@gmail.com>.
The server is currently in commercial use. I can't afford downgrading php.
If I want to do it with yum I need to remove php first (also with
downgrade) and plesk gets removed as well...
So, how would you replicate the problem? How would you do a binary post to
a server without setting the content type header? If there is a bug in php
5.3.9 how could we test this?
There are some somewhat similar bugs in php. I think we can indeed conclude
it is a php thing. So lets remove the discussion from this mailing list.
I'll post my findings on php mailing list.
tanx!

2012/1/29 Yehuda Katz <ye...@ymkatz.net>

> On Sun, Jan 29, 2012 at 9:46 AM, Yehuda Katz <ye...@ymkatz.net> wrote:
>
>> On Sun, Jan 29, 2012 at 6:36 AM, Bardo Bakker <ba...@gmail.com>wrote:
>>
>>> Tanx for reply!
>>>
>>> In run on CentOS 5.7 (Latest). CentOS' policy is to have most stable
>>> versions which is apache 2.2.3... And this is not stable behaviour.
>>>
>>> PHP Version => 5.3.9
>>> mysql  Ver 14.14 Distrib 5.5.20, for Linux (x86_64) using readline 5.1
>>>
>>> Acording to this version info only my httpd is a out of date but should
>>> be stable.
>>>
>>
>>  Were you able to run php -i ?
>> That will usually tell you why PHP is crashing.
>>
>
> If php -i does not segfault, you should check that it is actually loading
> all of your extensions. Compare he output of php -i with the expected
> information from your php.ini . Sometimes the PHP CLI will not load MySQL
> and mod_php will, so you will miss the errors that are caused by that
> extension.
>
> It looks like you updated PHP and MySQL some time since January 10 (since
> that is when 5.3.9 and 5.5.20 where released).
> I would suggest that you downgrade to the previous versions (try the ones
> that ship with CentOS, since as you mentioned, they are supposed to be
> stable) and see if you still have the problem. Or, rebuild PHP, making sure
> that it is using the correct MySQL libraries.
>
> As I mentioned, the segfault is in mod_php, not in the Apache core.
> If you want you can send me (privately if you want) the PHP script you use
> and your php.ini (and any included ini files) and I can see if I can
> replicate the problem and file an official PHP bug if necessary.
>
> - Y
>

Re: [users@httpd] Proces killed after http post without ConentType header

Posted by Yehuda Katz <ye...@ymkatz.net>.
On Sun, Jan 29, 2012 at 9:46 AM, Yehuda Katz <ye...@ymkatz.net> wrote:

> On Sun, Jan 29, 2012 at 6:36 AM, Bardo Bakker <ba...@gmail.com>wrote:
>
>> Tanx for reply!
>>
>> In run on CentOS 5.7 (Latest). CentOS' policy is to have most stable
>> versions which is apache 2.2.3... And this is not stable behaviour.
>>
>> PHP Version => 5.3.9
>> mysql  Ver 14.14 Distrib 5.5.20, for Linux (x86_64) using readline 5.1
>>
>> Acording to this version info only my httpd is a out of date but should
>> be stable.
>>
>
>  Were you able to run php -i ?
> That will usually tell you why PHP is crashing.
>

If php -i does not segfault, you should check that it is actually loading
all of your extensions. Compare he output of php -i with the expected
information from your php.ini . Sometimes the PHP CLI will not load MySQL
and mod_php will, so you will miss the errors that are caused by that
extension.

It looks like you updated PHP and MySQL some time since January 10 (since
that is when 5.3.9 and 5.5.20 where released).
I would suggest that you downgrade to the previous versions (try the ones
that ship with CentOS, since as you mentioned, they are supposed to be
stable) and see if you still have the problem. Or, rebuild PHP, making sure
that it is using the correct MySQL libraries.

As I mentioned, the segfault is in mod_php, not in the Apache core.
If you want you can send me (privately if you want) the PHP script you use
and your php.ini (and any included ini files) and I can see if I can
replicate the problem and file an official PHP bug if necessary.

- Y

Re: [users@httpd] Proces killed after http post without ConentType header

Posted by Yehuda Katz <ye...@ymkatz.net>.
On Sun, Jan 29, 2012 at 6:36 AM, Bardo Bakker <ba...@gmail.com> wrote:

> Tanx for reply!
>
> In run on CentOS 5.7 (Latest). CentOS' policy is to have most stable
> versions which is apache 2.2.3... And this is not stable behaviour.
>
> PHP Version => 5.3.9
> mysql  Ver 14.14 Distrib 5.5.20, for Linux (x86_64) using readline 5.1
>
> Acording to this version info only my httpd is a out of date but should be
> stable.
>

Were you able to run php -i ?
That will usually tell you why PHP is crashing.

- Y

Re: [users@httpd] Proces killed after http post without ConentType header

Posted by Bardo Bakker <ba...@gmail.com>.
Tanx for reply!

In run on CentOS 5.7 (Latest). CentOS' policy is to have most stable
versions which is apache 2.2.3... And this is not stable behaviour.

PHP Version => 5.3.9
mysql  Ver 14.14 Distrib 5.5.20, for Linux (x86_64) using readline 5.1

Acording to this version info only my httpd is a out of date but should be
stable.

2012/1/29 Yehuda Katz <ye...@ymkatz.net>

> On Sat, Jan 28, 2012 at 7:16 AM, Bardo Bakker <ba...@gmail.com>wrote:
>
>> Hi,
>>
>> I wrote some software which post a binary (image) to our server.
>> After a reboot (due to resize HDD), the server has some post issues.
>> It hangs at the end of a http post without the content type header set.
>>
>> I would like to know: is this a bug, configuration mistake, or miss
>> interpertation of http post protocol...
>>
>> Tank you!
>>
>>
>>
>> Version apache:
>> [root@www ~]# /usr/sbin/httpd -V
>> Server version: Apache/2.2.3
>>
> This is a very old version with known security issues. You should upgrade.
>
>
>> On kill/error/fault I found in error_log:
>>
>> Sat Jan 28 12:56:09 2012] [notice] child pid 17077 exit signal
>> Segmentation fault (11), possible coredump in /tmp
>>
>> So made a coredump: gdb: bt all:
>>
>> Core was generated by `/usr/sbin/httpd -k start'.
>> Program terminated with signal 11, Segmentation fault.
>> #0  0x00007fe25c5696c0 in zend_hash_num_elements () from
>> /etc/httpd/modules/libphp5.so
>>
> Pretty obvious that the problem is with PHP. My guess is that you updated
> some library on the system (maybe MySQL) and PHP is now first trying to use
> it.
> You did not include which PHP version you are using. I suggest you check
> your php configuration.
> As long as you are not using different configuration files for mod_php and
> php-cli, you should be able to run "php -i" to check that PHP is working
> properly.
>
> - Y
>

Re: [users@httpd] Proces killed after http post without ConentType header

Posted by Yehuda Katz <ye...@ymkatz.net>.
On Sat, Jan 28, 2012 at 7:16 AM, Bardo Bakker <ba...@gmail.com> wrote:

> Hi,
>
> I wrote some software which post a binary (image) to our server.
> After a reboot (due to resize HDD), the server has some post issues.
> It hangs at the end of a http post without the content type header set.
>
> I would like to know: is this a bug, configuration mistake, or miss
> interpertation of http post protocol...
>
> Tank you!
>
>
>
> Version apache:
> [root@www ~]# /usr/sbin/httpd -V
> Server version: Apache/2.2.3
>
This is a very old version with known security issues. You should upgrade.


> On kill/error/fault I found in error_log:
>
> Sat Jan 28 12:56:09 2012] [notice] child pid 17077 exit signal
> Segmentation fault (11), possible coredump in /tmp
>
> So made a coredump: gdb: bt all:
>
> Core was generated by `/usr/sbin/httpd -k start'.
> Program terminated with signal 11, Segmentation fault.
> #0  0x00007fe25c5696c0 in zend_hash_num_elements () from
> /etc/httpd/modules/libphp5.so
>
Pretty obvious that the problem is with PHP. My guess is that you updated
some library on the system (maybe MySQL) and PHP is now first trying to use
it.
You did not include which PHP version you are using. I suggest you check
your php configuration.
As long as you are not using different configuration files for mod_php and
php-cli, you should be able to run "php -i" to check that PHP is working
properly.

- Y