Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:28786 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 55723 invoked by uid 1010); 13 Apr 2007 12:55:54 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 55708 invoked from network); 13 Apr 2007 12:55:54 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Apr 2007 12:55:54 -0000 Authentication-Results: pb1.pair.com header.from=ilia@prohost.org; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=ilia@prohost.org; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain prohost.org from 64.233.166.183 cause and error) X-PHP-List-Original-Sender: ilia@prohost.org X-Host-Fingerprint: 64.233.166.183 py-out-1112.google.com Linux 2.4/2.6 Received: from [64.233.166.183] ([64.233.166.183:21014] helo=py-out-1112.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 41/AB-43231-7DD7F164 for ; Fri, 13 Apr 2007 08:55:52 -0400 Received: by py-out-1112.google.com with SMTP id a25so665458pyi for ; Fri, 13 Apr 2007 05:55:49 -0700 (PDT) Received: by 10.35.127.7 with SMTP id e7mr5161745pyn.1176468949064; Fri, 13 Apr 2007 05:55:49 -0700 (PDT) Received: from ?192.168.1.162? ( [204.101.63.110]) by mx.google.com with ESMTP id z80sm1941288pyg.2007.04.13.05.55.48; Fri, 13 Apr 2007 05:55:48 -0700 (PDT) In-Reply-To: <10845a340704130333i17921209pad4538b5a3a43e7@mail.gmail.com> References: <007b01c77735$89410420$0201a8c0@pc1> <46148933.7030709@lerdorf.com> <646617A7-86A7-4E64-94CE-8E5D5766741A@prohost.org> <10845a340704050742n38ef04c0t7f6f2ad85e2711b5@mail.gmail.com> <46151547.6000505@lerdorf.com> <10845a340704050830p6611aa73n6f81806618d5072a@mail.gmail.com> <46153A67.3010208@ctindustries.net> <461541C1.4080404@lerdorf.com> <46155EC9.1020402@ctindustries.net> <10845a340704130333i17921209pad4538b5a3a43e7@mail.gmail.com> Mime-Version: 1.0 (Apple Message framework v752.3) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-ID: <3FD3996A-6E63-44BF-88EF-CEB174254995@prohost.org> Cc: "Rob Richards" , "Rasmus Lerdorf" , "Matt Wilmas" , internals@lists.php.net Content-Transfer-Encoding: 7bit Date: Fri, 13 Apr 2007 08:55:47 -0400 To: RQuadling@GoogleMail.com X-Mailer: Apple Mail (2.752.3) Subject: Re: [PHP-DEV] Build failure From: ilia@prohost.org (Ilia Alshanetsky) 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 wrote: >> No 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. >> >> Rob >> > > Using 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!" Ilia Alshanetsky