[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#413742: marked as done (linux-2.6: [NFS] Unlinked files still seen in directory stream after a rewinddir)



Your message dated Thu, 25 Dec 2008 23:12:05 +0100
with message-id <20081225221205.GA3638@galadriel.inutil.org>
and subject line Re: Bug#413742: unreproducible
has caused the Debian Bug report #413742,
regarding linux-2.6: [NFS] Unlinked files still seen in directory stream after a rewinddir
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
413742: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=413742
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: linux-2.6
Severity: important

[important since this affects a very common utility: "rm"]

The coreutils snapshot (upstream) does the following in a "rm -r":

* Files are unlinked in a first pass:

lstat("/proc/self/fd/4/config.h.in", {st_mode=S_IFREG|0644, st_size=27828, ...}) = 0
access("test/config.h.in", W_OK)        = 0
unlink("/proc/self/fd/4/config.h.in")   = 0
[...]

* A directory rewind:

lseek(4, 0, SEEK_SET)                   = 0

* The entries are still seen, though all the files have been unlinked:

getdents64(4, /* 15 entries */, 8192)   = 472

* The config.h.in is still seen:

lstat("/proc/self/fd/4/config.h.in", {st_mode=S_IFREG|0644, st_size=27828, ...}) = 0

* And the following errors are normal (since the file has already been
unlinked):

access("test/config.h.in", W_OK)        = -1 ESTALE (Stale NFS file handle)
unlink("/proc/self/fd/4/config.h.in")   = -1 ENOENT (No such file or directory)

The consequence is that "rm -r" fails, and the directory is not
removed (using the -f option doesn't produce such errors, but is
not an acceptable workaround because it will removed "protected"
files too, in which particular case I want an error).

Note: this behavior is not always reproducible. In the bug-coreutils
mailing-list, it has been claimed that this is an incorrect behavior
(the fact that unlinked files are still seen in the directory stream).
The following paragraph has been cited:

    The rewinddir() function shall reset the position of the directory
    stream to which dirp refers to the beginning of the directory. It shall
    also cause the directory stream to refer to the current state of the
    corresponding directory, as a call to opendir() would have done.

(but what is the exact meaning of "state" in the case of NFS, where
things may be different on the clients and server sides?)

-- System Information:
Debian Release: 4.0
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18custom-amd64
Locale: LANG=POSIX, LC_CTYPE=en_US.ISO8859-1 (charmap=ISO-8859-1)


--- End Message ---
--- Begin Message ---
Version: 2.6.24-1

On Thu, Dec 25, 2008 at 10:59:10PM +0100, Vincent Lefevre wrote:
> On 2008-12-25 19:12:34 +0100, Moritz Muehlenhoff wrote:
> > Does this error still occur with more recent kernel versions?
> 
> I haven't seen this problem since several months.
> 
> "uname -a" currently says:
> 
> Linux brocoli 2.6.23.17-server-amd64 #1 SMP Thu May 29 13:44:03 CEST 2008 x86_64 GNU/Linux

Thanks, marking 2.6.24 as closed.

Cheers,
        Moritz


--- End Message ---

Reply to: