php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #52608 child process exited with status 3221225477 (*or 128) -- Restarting.
Submitted: 2010-08-15 03:44 UTC Modified: 2010-08-15 05:46 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: svimik at mail dot ru Assigned:
Status: Not a bug Package: Apache2 related
PHP Version: 5.2.14 OS: Windows XP, Windows Server 2003
Private report: No CVE-ID: None
 [2010-08-15 03:44 UTC] svimik at mail dot ru
Description:
------------
This script causes apache crash.
In CLI this script works well, so I put it as apache related bug.
Bug is reproducable with php versions:
5.2.14
5.2.13
Bug is NOT exists in php 5.2.6

Bug is reproducable with any php.ini config, including my own configuration, "php.ini-dist" and "php.ini-recommended"

I'm using Apache/2.2.8 on Windows XP SP3
and Apache/2.2.11 on Windows Server 2003
Bug is reproducable on both.
PHP is configured as php5_module with php5apache2_2.dll (dll is from original PHP zip package for win32).

Summary:
PHP 5.2.14 + Apache/2.2.8 + Windows XP = CRASH
PHP 5.2.14 + Apache/2.2.11 + Windows Server 2003 = CRASH
PHP 5.2.13 + Apache/2.2.8 + Windows XP = CRASH
PHP 5.2.6 + Apache/2.2.8 + Windows XP = OK
PHP 5.2.6 + Apache/2.2.11 + Windows Server 2003 = OK

Test script:
---------------
<?
$preg="\<td\>((?<!\<\/td\>).)*";
$str="<td>bug appears only with a long text here bug appears only with a long text here bug appears only with a long text here bug appears only with a long text here bug appearsbug appears only with a long text here bug appears only with a long text here bug appears only with a long text here bug appears only with a long... exactly this size.</td>";
//at least 343 bytes (334 bytes without tags)
preg_match_all("/$preg/", $str, $m);
?>

Actual result:
--------------
on Windows XP SP3:
[notice] Parent: child process exited with status 3221225477 -- Restarting.
[notice] Apache/2.2.8 (Win32) PHP/5.2.14 configured -- resuming normal operations

on Windows Server 2003:
[notice] Parent: child process exited with status 128 -- Restarting.
[notice] Apache/2.2.11 (Win32) DAV/2 PHP/5.2.14 configured -- resuming normal operations

----------
here is backtrace for Windows XP SP3:

Thread 64 - System ID 1284
Entry point   msvcrt!_endthreadex+3a 
Create time   2010/08/15 4:39:20 
Time spent in user mode   0 Days 0:0:0.0 
Time spent in kernel mode   0 Days 0:0:0.0 

Function     Arg 1     Arg 2     Arg 3   Source 
php5ts!php_pcre_exec+d16     8e255000     00001902     00000100    
0x00016100     00001902     00000100     00000600    
0x80000000`00000000     00000100     00000600     00001900    

PHP5TS!PHP_PCRE_EXEC+D16WARNING - DebugDiag was not able to locate debug symbols for php5ts.dll, so the information below may be incomplete.

In httpd__PID__2492__Date__08_15_2010__Time_04_40_10AM__584__Second_Chance_Exception_C00000FD.dmp the assembly instruction at php5ts!php_pcre_exec+d16 in C:\Apache\php\php5ts.dll from The PHP Group has caused a stack overflow exception (0xC00000FD) when trying to write to memory location 0x02812f38 on thread 64



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-08-15 05:46 UTC] pajoye@php.net
-Status: Open +Status: Bogus
 [2010-08-15 05:46 UTC] pajoye@php.net
You have to increase the stack used by Apache (so PHP's pcre won'r crash due to a too smal stack). There is another report about this issue, with an explanation about how to increase the stack of an executable (sorry, I don't have the # at hand).
 [2010-08-15 14:03 UTC] svimik at mail dot ru
I have found similar bugs, but can't find any acceptable solution.
In #47689 (did you mean this report?) I see tips to recompile php (sorry, I use binaries only, don't have compilation skills), or patch apache with VC Express (too large program. maybe there is some easier way to patch it?)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 20 03:01:28 2024 UTC