From:             
Operating system: Linux
PHP version:      trunk-SVN-2011-03-09 (SVN)
Package:          Compile Failure
Bug Type:         Bug
Bug description:race condition in shtool's mkdir -p implementation. AND shtool 
2.0.8

Description:
------------
Previous bug #51076

http://bugs.php.net/bug.php?id=51076

was fixed by:

svn commit r295225 (
http://svn.php.net/viewvc?view=revision&revision=295225 )



but later, commit r295230 ( http://svn.php.net/viewvc?

view=revision&revision=295230)

updated shtool to version 2.0.8 without backporting the previous patch.

(In upstream, nothing changed regarding mkdir between 2.0.6 and  2.0.8)



And so, the race condition with -j>1 is still there. (In my case, it
appeared 

during the "make install" step processing the installation of the
extensions)



Error was: "mkdir: cannot create directory ... : File exists"





So, the patch in r295225 should be reapplied to shtool 2.0.8.





In a second time, why not replacing all the mkdir code block of shtool by 

something like:

if opt_p = no:

   mkdir ...

   chmod ...

   chown ...

   chgrp ...

   ...

else:

   mkdir -p ...

   chmod -R ...

   chown -R ...

   chgrp -R ...

   ...



That would be safer I think ...






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

Reply via email to