From:             
Operating system: Win XP Pro & Storage Server 2003
PHP version:      5.3.2
Package:          Reproducible crash
Bug Type:         Bug
Bug description:Using crypt() makes Apache hang or crash

Description:
------------
Several scripts in my PHP app occasionally hang: the page sits there on
'waiting for localhost' and never finishes. I'd guess this happens 3-4
times out of 10. The common element is the usage of crypt() to hash user
passwords.



The problem happens both on my development machine (Windows XP
Professional) and our server (Windows Storage Server 2003). Both are
running Apache 2.2.14 (Win32).



I created the simple test script below and confirmed that the problem still
happens, though I have to rapidly reload the page to reproduce it.



$foo = crypt('rasmuslerdorf','r1');

echo $foo;



When these pages hang, Apache's server-status page increments the number of
requests being processed and decrements the number of idle workers. The
requests being processed almost all have a status of 'Sending Reply,'
though sometimes for a moment they will show either 'Reading request' or
'keepalive (read).'



Eventually, Apache may crash. When it does, the Windows crash report looks
something like this:



szAppName: httpd.exe

szAppVer: 2.2.14.0

szModName: php5ts.dll

szModVer: 5.3.1.0 // This report was before I upgraded to PHP 5.3.2, 

                  // but that didn't fix it

offset: 00a2615



I did not compile PHP myself; I used the zip package.



CONFIGURATION

Starting from php.ini-development, I made the following changes:



short_open_tag = On

post_max_size = 30M

include_path = "c:\path\to\my\includes\folder"

extension_dir = "C:/php/ext"

upload_max_filesize = 15M

extension=php_mysqli.dll

extension=php_pdo_mysql.dll

date.timezone = "America/New_York"

SMTP = our-server.our-domain.vwpcs.com

sendmail_from = ad...@our-domain.com

sendmail_path = "C:\usr\lib\sendmail.exe"

Test script:
---------------
$foo = crypt('rasmuslerdorf','r1');

echo $foo;



Expected result:
----------------
I expect it to echo the hashed string and for the page load to complete
very quickly.

Actual result:
--------------
The page frequently (maybe 3 out of 10 rapid reloads) hangs - says 'waiting
for localhost' and never completes. (Tested mainly using Google Chrome.)
When this happens, I can reload apache's /server-status page and see that
the number of requests being processed has gone up and the number of idle
workers has gone down. Eventually, Apache may crash.

-- 
Edit bug report at http://bugs.php.net/bug.php?id=51666&edit=1
-- 
Try a snapshot (PHP 5.2):            
http://bugs.php.net/fix.php?id=51666&r=trysnapshot52
Try a snapshot (PHP 5.3):            
http://bugs.php.net/fix.php?id=51666&r=trysnapshot53
Try a snapshot (PHP 6.0):            
http://bugs.php.net/fix.php?id=51666&r=trysnapshot60
Fixed in SVN:                        
http://bugs.php.net/fix.php?id=51666&r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=51666&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=51666&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=51666&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=51666&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=51666&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=51666&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=51666&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=51666&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=51666&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=51666&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=51666&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=51666&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=51666&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=51666&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=51666&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=51666&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=51666&r=mysqlcfg

Reply via email to