From:             
Operating system: Linux 2.4.35.4 mips
PHP version:      5.3.2
Package:          Session related
Bug Type:         Bug
Bug description:session_start() blocks execution

Description:
------------
Hi, i'm running PHP 5.3.2 via FastCGI with lighttpd 1.4.25 and uclibc
0.9.29. I experienced that after a period of time, all session driven pages
hang and deliver no content to the client. But all static content like
images are accessible. Below i appended a little script, how the problem
can be reproduced.



Here are the options from the php.ini:



session.save_handler = files

session.save_path = "/tmp"

session.gc_probability = 1

session.gc_divisor     = 100

session.gc_maxlifetime = 1440



Here is the configure line:



'./configure' '--target=mipsel-linux' '--host=mipsel-linux'
'--build=i486-linux-gnu' '--program-prefix=' '--program-suffix='
'--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin'
'--sbindir=/usr/sbin' '--libexecdir=/usr/lib' '--sysconfdir=/etc'
'--datadir=/usr/share' '--localstatedir=/var' '--mandir=/usr/man'
'--infodir=/usr/info' '--disable-nls' '--enable-shared' '--disable-static'
'--disable-rpath' '--disable-debug' '--without-pear'
'--with-config-file-path=/etc' '--enable-magic-quotes'
'--disable-short-tags' '--without-gettext' '--disable-simplexml'
'--with-zlib=/home/10_openwrt/staging_dir/mipsel/usr'
'--with-zlib-dir=/home/10_openwrt/staging_dir/mipsel/usr'
'--with-pcre-regex=/home/10_openwrt/staging_dir/mipsel/usr'
'--disable-phar' '--enable-ctype=shared' '--without-curl'
'--disable-fileinfo' '--disable-dom' '--disable-exif' '--disable-ftp'
'--without-gd' '--without-gmp' '--disable-hash' '--without-iconv'
'--enable-json=shared' '--without-ldap' '--disable-mbstring'
'--without-mcrypt' '--without-mysql' '--without-openssl'
'--enable-pdo=shared' '--without-pdo-mysql' '--without-pdo-pgsql'
'--with-pdo-sqlite=shared,/home/10_openwrt/staging_dir/mipsel/usr'
'--without-pgsql' '--enable-session=shared' '--disable-soap'
'--enable-sockets=shared' '--without-sqlite'
'--with-sqlite3=shared,/home/10_openwrt/staging_dir/mipsel/usr'
'--disable-tokenizer'
'--enable-xml=shared,/home/10_openwrt/staging_dir/mipsel/usr'
'--with-libexpat-dir=/home/10_openwrt/staging_dir/mipsel/usr'
'--disable-xmlreader' '--disable-xmlwriter' '--disable-apc'
'--disable-filter' '--disable-libxml' '--enable-sysvsem' '--enable-sysvshm'
'--enable-sysvmsg' '--enable-pcntl' '--disable-cli' '--enable-cgi'



The filesystem behind /tmp is tmpfs.



After that i played a little bit with option session.gc_divisor. If i set
the option to 2, then the problem happend immediately. But if i set the
option to 100000, the problem is not reproducable.



Is this a dead lock caused by the session garbage collector?

Test script:
---------------
<?php

session_start();

session_write_close();  

?>

<html><body>Content</body></html>

Expected result:
----------------
PHP delivers "Content" to the browser.

Actual result:
--------------
The browser didn't get "Content" and wait for a response.

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

Reply via email to