#43114 [Opn->Bgs]: multiple servers outputting error_log onto shared NFS file include garbage byte
| From: | iliaa@php.net | Date: | Sun, 28 Oct 2007 13:07:17 +0000 |
| Subject: | #43114 [Opn->Bgs]: multiple servers outputting error_log onto shared NFS file include garbage byte | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-119006@lists.php.net to get a copy of this message | ||
ID: 43114
Updated by: iliaa@php.net
Reported By: tom at razz dot com
-Status: Open
+Status: Bogus
Bug Type: *General Issues
Operating System: Fedora 7
PHP Version: 5.2.4
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
NFS locking is not reliable, so file corruption is not entirely un-
expected.
Previous Comments:
------------------------------------------------------------------------
[2007-10-27 07:20:50] tom at razz dot com
Description:
------------
i'm attempting to log php errors from multiple web servers (3) to a
single nfs-mounted file:
error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT
display_errors = Off
log_errors = On
error_log = /mnt/logs/php/webprod-php-error.log
lines are written in production to this file perhaps 1-3 every minute
via error_log facility. there aren't logging collisions at the
moment.
nfs server is a netapp fas3020c.
fstab line is:
nyp-netapp-2:/vol/logs /mnt/logs nfs
rw,bg,soft,rsize=32768,wsize=32768,vers=3 0 0
Thanks for the help!
Reproduce code:
---------------
<?php
// run concurrently from multiple servers to see garbage appear
while(1) {
sleep(rand(1,5));
error_log("test error");
}
Expected result:
----------------
an error log without garbage ^@ entries in between lines.
interestingly, writing my own error_log which explicitly does:
$lfp=fopen("/mnt/logs/logfile.txt","a");
fwrite($lfp,$log_message);
fclose($lfp);
does not result in the garbage data being inserted.
Actual result:
--------------
log contents look similar to this:
[26-Oct-2007 23:57:20] /usr/local/www/web/common/php-
include/facebook/class.Movi
eLines.php : Using cached values
^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@
^@^@^@^@^@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@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@
^@^@^@^@^@
^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@
^@^@^@^@^@
^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@
^@^@^@^@^@
^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@[26-Oct-2007
23:57:44] /usr/
local/www/web/common/php-include/facebook/class.Movies.php : Using
cached values
[26-Oct-2007 23:57:44] /usr/local/www/web/common/php-
include/facebook/class.Movi
eLines.php : Using cached values
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=43114&edit=1