ID: 35791
User updated by: jgmtfia at gmail dot com
Reported By: jgmtfia at gmail dot com
-Status: Feedback
+Status: Open
Bug Type: Filesystem function related
Operating System: Linux
PHP Version: 5.1.1
New Comment:
I have trimmed the strace output, but I can provide full output if
necessary.
It works in with PHP 4.3.10-15 on debian stable:
access("C", F_OK) = 0
pipe([3, 7]) = 0
vfork() = 10336
--- SIGCHLD (Child exited) @ 0 (0) ---
close(7) = 0
fstat64(3, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb79d8000
read(3, "lrwxr-xr-x 1 1 Jan 2 09:48 C -"..., 4096) = 36
read(3, "", 4096) = 0
read(3, "", 4096) = 0
close(3) = 0
waitpid(10336, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0) = 10336
munmap(0xb79d8000, 4096) = 0
fstat64(1, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb79d8000
write(1, "File \'C\' exists:\n\t\tlrwxr-xr-x 1"..., 56) = 56
unlink("C") = 0
pipe([3, 7]) = 0
vfork() = 10338
close(7) = 0
fstat64(3, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb79d7000
read(3, "ls: ", 4096) = 4
--- SIGCHLD (Child exited) @ 0 (0) ---
read(3, "C: No such file or directory\n", 4096) = 29
read(3, "", 4096) = 0
read(3, "", 4096) = 0
close(3) = 0
waitpid(10338, [{WIFEXITED(s) && WEXITSTATUS(s) == 1}], 0) = 10338
munmap(0xb79d7000, 4096) = 0
write(1, "Deleted \'C\'\n\t\tls: C: No such fil"..., 48) = 48
access("C", F_OK) = -1 ENOENT (No such file or
directory)
write(1, "(PASS) PHP sees the file as dele"..., 37) = 37
With php5.1-200601021330:
The link /home/user/C gets translated to /home/user/x/A and what should
be accesses to /home/user/C are accesses to /home/user/A as seen in the
second last line of the following strace.
lstat64("/home", {st_mode=S_IFDIR|S_ISGID|0775, st_size=4096, ...}) =
0
lstat64("/home/user", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat64("/home/user/x", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat64("/home/user/x/C", {st_mode=S_IFLNK|0755, st_size=1, ...}) = 0
readlink("/home/user/x/C", "A", 4096) = 1
lstat64("/home/user/x/A", {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
access("/home/user/x/A", F_OK) = 0
pipe([3, 4]) = 0
vfork() = 10221
close(4) = 0
fstat64(3, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
mmap2(NULL, 0, PROT_READ, MAP_SHARED, 3, 0) = -1 ENODEV (No such
device)
fstat64(3, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
read(3, "lrwxr-xr-x 1 1 Jan 2 09:23 C -"..., 8192) = 36
read(3, "", 8192) = 0
close(3) = 0
waitpid(10221, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0) = 10221
--- SIGCHLD (Child exited) @ 0 (0) ---
fstat64(1, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb7fe8000
write(1, "File \'C\' exists:\n\t\tlrwxr-xr-x 1"..., 56) = 56
unlink("/home/user/x/C") = 0
pipe([3, 4]) = 0
vfork() = 10223
close(4) = 0
fstat64(3, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
mmap2(NULL, 0, PROT_READ, MAP_SHARED, 3, 0) = -1 ENODEV (No such
device)
fstat64(3, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
read(3, "ls: ", 8192) = 4
read(3, "C", 8192) = 1
read(3, ": No such file or directory", 8192) = 27
read(3, "\n", 8192) = 1
read(3, "", 8192) = 0
close(3) = 0
waitpid(10223, [{WIFEXITED(s) && WEXITSTATUS(s) == 1}], 0) = 10223
--- SIGCHLD (Child exited) @ 0 (0) ---
write(1, "Deleted \'C\'\n\t\tls: C: No such fil"..., 48) = 48
time(NULL) = 1136219020
access("/home/user/x/A", F_OK) = 0
write(1, "(FAIL) File \'C\' deleted as seen "..., 40) = 40
Previous Comments:
------------------------------------------------------------------------
[2006-01-02 17:15:11] [EMAIL PROTECTED]
You can strace the script and see what files are actually being
accessed.
------------------------------------------------------------------------
[2006-01-02 17:10:27] jgmtfia at gmail dot com
I tested the "lastest" version (php5.1-200601021330) on debian stable
and it failed. Over the holidays I tried 5.1.1 with debian testing and
it passed.
A summary of results:
4.3.10 - debian stable - pass
5.1.0b3 - debian stable - fail
5.1.0 - debian stable - fail
5.1.1 - debian stable - fail
5.1.1 - debian testing - pass
php5.1-200601021330 - debian stable - fail
5.1.2RC2-dev - SUSE Linux 10 x86_64 - pass
Common to all failures is Debian stable. Do you have any suggestions
on how to approach finding what is causing the fault?
------------------------------------------------------------------------
[2006-01-01 01:00:07] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
------------------------------------------------------------------------
[2005-12-24 01:45:42] [EMAIL PROTECTED]
Please try using this CVS snapshot:
http://snaps.php.net/php5.1-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5.1-win32-latest.zip
------------------------------------------------------------------------
[2005-12-24 01:07:44] judas dot iscariote at gmail dot com
File 'C' exists:
lrwxrwxrwx 1 1 2005-12-23 21:10 C -> A
Deleted 'C'
ls: C: No such file or directory
(PASS) PHP sees the file as deleted.
php -v
PHP 5.1.2RC2-dev (cli) (built: Dec 23 2005 17:37:05)
SUSE Linux 10 x86_64
------------------------------------------------------------------------
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
http://bugs.php.net/35791
--
Edit this bug report at http://bugs.php.net/?id=35791&edit=1