Bug #74900 [Opn]: Random file not found on multiple processes

From: Date: Fri, 14 Jul 2017 13:50:55 +0000
Subject: Bug #74900 [Opn]: Random file not found on multiple processes
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-210057@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=74900&edit=1

 ID:                 74900
 User updated by:    falk dot aaron85 at gmail dot com
 Reported by:        falk dot aaron85 at gmail dot com
 Summary:            Random file not found on multiple processes
 Status:             Open
 Type:               Bug
 Package:            *Directory/Filesystem functions
 Operating System:   Windows Server 2012 R2
 PHP Version:        Irrelevant
 Block user comment: N
 Private report:     N

 New Comment:

I found out that this problem does only occurs if in the path of the file to read is a symbolic link
(/D or /J) inside.

Without symbolic links, I am not able to reproduce the issue.
Could you please try it with the use of symbolic link(s) in the path of the file to read?


Previous Comments:
------------------------------------------------------------------------
[2017-07-12 16:57:22] falk dot aaron85 at gmail dot com

Tried it with 7.0.14RC1 on Windows 10 and cannot reproduce it.

------------------------------------------------------------------------
[2017-07-12 16:52:52] ab@php.net

Ok, lets see. Perhaps someone else has better luck reproducing this of finding a better reproducer.

Thanks.

------------------------------------------------------------------------
[2017-07-12 16:41:05] falk dot aaron85 at gmail dot com

I tried it on 3 different windows machines with php 5.5, 5.6, 7.0 and 7.1. It can reproduce it on
all systems with all php versions.

Randomly the file_get_contents gets the error failes to open stream: no such file or directory...

------------------------------------------------------------------------
[2017-07-12 16:21:44] ab@php.net

Still no luck. I've changed your code to a bit shorter version

<?php
ini_set('display_errors', 1);
error_reporting( E_ALL );
$path = 'C:\path\to\file';
for ($i = 0; $i < 100; $i++) {
        if (!file_exists($path)) {
                die("Doesn't exist");
        }
        if (!file_get_contents($path)) {
                die("No content");
        }
}

echo "all clean";

and used up to 32 processes, but all i get is "all clean" outputs. You told you've
used other PHP versions, have you tried latest versions or just some? Also, does this reproduce on
another machine?

Thanks.

------------------------------------------------------------------------
[2017-07-12 16:01:30] falk dot aaron85 at gmail dot com

No, i use a absolute path like C:/file.zip.
The path in the script.is an absolute path for unix systems.

I am able fto reproduce the problem on windows systems with different php versions. You could maybe
try to increase the size of the for loop and the amount of php processes started in parallel.

------------------------------------------------------------------------


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    https://bugs.php.net/bug.php?id=74900


--
Edit this bug report at https://bugs.php.net/bug.php?id=74900&edit=1


Thread (10 messages)

« previous php.bugs (#210057) next »