Re: Build failure
| From: | Ilia Alshanetsky | Date: | Fri, 13 Apr 2007 12:55:47 +0000 |
| Subject: | Re: Build failure | ||
| References: | 1 2 3 4 5 6 7 8 9 10 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-28786@lists.php.net to get a copy of this message | ||
The new implementation does not use any locks, instead it uses direct io, where locks are not necessary for append operations.
On 13-Apr-07, at 6:33 AM, Richard Quadling wrote:
On 05/04/07, Rob Richards <rrichards@ctindustries.net> wrote:Ilia AlshanetskyNo difference using sprintf()/fwrite() instead of fprintf(). I did come across a similar issue from apache: http://mail-archives.apache.org/mod_mbox/httpd-dev/199503.mbox/%3C9502272049.aa02036@paris.ics.uci.edu%3E Changing to use VCWD_OPEN_MODE, write() and close() seems to work. RobUsing PHP 5.2.2RC2-dev (cli) (built: Apr 13 2007 04:03:02) on Windows with for %x in (A B C D E F G H I J K L M N O P Q R S T U V W X Y Z) do start php -r "ini_set('error_log','/tmp/test.log');for($i=0;$i<1000;$i++)error_log(str_repeat('%x',5000));"`; And then doing some analysis of the log file I'm finding that not all the data has been written. Array ( [A] => 4965993 [B] => 4590918 [C] => 4525905 [D] => 4695939 [E] => 4495899 [F] => 4710942 [G] => 4495899 [H] => 4645929 [I] => 4540908 [J] => 4580916 [K] => 4535907 [L] => 4470894 [M] => 4480896 [N] => 4550910 [O] => 4610922 [P] => 4500900 [Q] => 4630926 [R] => 4480896 [S] => 4500900 [T] => 4535907 [U] => 4630926 [V] => 4470894 [W] => 4645929 [X] => 4825965 [Y] => 4845969 [Z] => 4920984 ) Lines (Should be 26 * 1000) : 23973 Longest (Should be 5024) : 5024 Shortest (Should be 5024) : 5024 Out of the 26,000 lines expected we are missing 2027 lines. So no corruption of the lines, just missing ones. The only explanation I can think of is that the locking is working, but nothing is waiting for the lock to become available. Richard. ------- Richard Quadling Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731 "Standing on the shoulders of some very clever giants!"