public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* RE: rm -rf -> Circular directory structure
@ 1997-08-11 14:01 Igor V. Kovalenko
  1997-08-12  0:35 ` Fergus Henderson
  0 siblings, 1 reply; 7+ messages in thread
From: Igor V. Kovalenko @ 1997-08-11 14:01 UTC (permalink / raw)
  To: gnu-win32

Looking at ...include/sys/types.h I found that ino_t is actually
unsigned short, that is only 16 bit in size. Thus, we (in 'rm' etc..)
do compare the lower 16 bits of prepared by hash_path_name()
32-bit integer.
  I think this is a main cause for $subj$, though the hashing
function itself is not as perfect as it could be (in theory).

PS: Or do I have incorrect header file?
--
Igor V. Kovalenko   mailto:iko@crec.mipt.ru
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: rm -rf -> Circular directory structure
  1997-08-11 14:01 rm -rf -> Circular directory structure Igor V. Kovalenko
@ 1997-08-12  0:35 ` Fergus Henderson
  0 siblings, 0 replies; 7+ messages in thread
From: Fergus Henderson @ 1997-08-12  0:35 UTC (permalink / raw)
  To: gnu-win32

"Igor V. Kovalenko" <iko@crec.mipt.ru> writes:

>Looking at ...include/sys/types.h I found that ino_t is actually
>unsigned short, that is only 16 bit in size. Thus, we (in 'rm' etc..)
>do compare the lower 16 bits of prepared by hash_path_name()
>32-bit integer.
>  I think this is a main cause for $subj$, though the hashing
>function itself is not as perfect as it could be (in theory).

The whole idea of using a hash function to compute inode numbers
is fundamentally broken.  Perhaps it would be better to think
about a solution that works rather than making a fundamentally
broken one slightly less broken.

--
Fergus Henderson <fjh@cs.mu.oz.au>   |  "I have always known that the pursuit
WWW: < http://www.cs.mu.oz.au/~fjh >   |  of excellence is a lethal habit"
PGP: finger fjh@128.250.37.3         |     -- the last words of T. S. Garp.
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: rm -rf -> Circular directory structure
@ 1997-08-07 23:58 Sergey Okhapkin
  0 siblings, 0 replies; 7+ messages in thread
From: Sergey Okhapkin @ 1997-08-07 23:58 UTC (permalink / raw)
  To: gnu-win32, 'Michael A. Chase'

Michael A. Chase wrote:
>  I'm using Sergey's cygwin.dll dated 31 July and bash.exe dated 4 July.
> When I try to delete a large directory tree, I still see this problem.
> 

The hash function used to convert filename to inode number is very simple. Do you know any fast and good hash?

-- 
Sergey Okhapkin, http://www.lexa.ru/sos
Moscow, Russia
Looking for a job.


-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: rm -rf -> Circular directory structure
@ 1997-08-07  9:45 Michael A. Chase
  0 siblings, 0 replies; 7+ messages in thread
From: Michael A. Chase @ 1997-08-07  9:45 UTC (permalink / raw)
  To: Christoph Kukulies, gnu-win32, Larry Hall

 I'm using Sergey's cygwin.dll dated 31 July and bash.exe dated 4 July.
When I try to delete a large directory tree, I still see this problem.

Mac :})

-----Original Message-----
From: Larry Hall <lhall@rfk.com>
To: Christoph Kukulies <kuku@gilberto.physik.RWTH-Aachen.DE>;
gnu-win32@cygnus.com <gnu-win32@cygnus.com>
Date: Wednesday, August 06, 1997 10:54
Subject: Re: rm -rf -> Circular directory structure



>At 11:19 AM 8/6/97 +0200, Christoph Kukulies wrote:
>>I'm having a weird problem under NT 4.0 (I remember to
>>have seen this with b17 and NT3.51 also):
>>
>>D:\>rm -rf somedir
>>rm: WARNING: Circular directory structure.
>>This almost certainly means that you have a corrupted file system.
>>NOTIFY YOUR SYSTEM MANAGER.
>>Cycle detected:
>>somedir/FOO/FOO
>>is the same file as
>>somedir
>>
>>CHKDSK doesn't flag any errors on the filesystem and I tend to believe
>>this isn't the cause anyway.
>>
>>The interesting thing is: When I remove the file somedir/FOO/FOO
>>the rm command is able to run through without errors.
>>
>>
>>--
>>Chris Christoph P. U. Kukulies kuku@gil.physik.rwth-aachen.de
>
>Chris,
>
>This should be in the FAQ (I expect its not at the moment).  The problem
>is caused by a faulty inode mapping algorithm in all the betas.  There
is
>no problem with your file system.  It merely means that the faulty inode
>mapping for files and directories thinks there's more than 1 file and/or
>directory for the generated inode number, which is certainly a bad thing
>for traditional UNIX file systems.  The error hinders rm from working
>correctly but does not indicate file system problems.  You'll just need
>to delete the intended files/directories another way (most likely via
>Windows or DOS tools).  I believe Sergey's latest DLL has some fixes to
>mitigate this problem.  I don't think there's a complete fix yet
(correct
>me if I'm wrong folks).
>
>Larry Hall                              lhall@rfk.com
>RFK Partners, Inc.                      (617) 239-1053
>8 Grove Street                          (617) 239-1655 - FAX
>Wellesley, MA  02181
>
>-
>For help on using this list (especially unsubscribing), send a message
to
>"gnu-win32-request@cygnus.com" with one line of text: "help".
>

-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: rm -rf -> Circular directory structure
  1997-08-06  2:16 Christoph Kukulies
@ 1997-08-06 13:20 ` Fergus Henderson
  0 siblings, 0 replies; 7+ messages in thread
From: Fergus Henderson @ 1997-08-06 13:20 UTC (permalink / raw)
  To: gnu-win32

Christoph Kukulies <kuku@gilberto.physik.RWTH-Aachen.DE> writes:

>I'm having a weird problem under NT 4.0 (I remember to
>have seen this with b17 and NT3.51 also):
>
>D:\>rm -rf somedir
>rm: WARNING: Circular directory structure.
>This almost certainly means that you have a corrupted file system.
>NOTIFY YOUR SYSTEM MANAGER.
>Cycle detected:
>somedir/FOO/FOO
>is the same file as
>somedir

This is because the algorithm that cygwin uses to compute inode numbers
just hashes the file name (or something like that) rather than
actually figuring out a properly unique number.  When you get a hash
collision, `rm' gets confused.

--
Fergus Henderson <fjh@cs.mu.oz.au>   |  "I have always known that the pursuit
WWW: < http://www.cs.mu.oz.au/~fjh >   |  of excellence is a lethal habit"
PGP: finger fjh@128.250.37.3         |     -- the last words of T. S. Garp.
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: rm -rf -> Circular directory structure
@ 1997-08-06  8:19 Larry Hall
  0 siblings, 0 replies; 7+ messages in thread
From: Larry Hall @ 1997-08-06  8:19 UTC (permalink / raw)
  To: Christoph Kukulies, gnu-win32

At 11:19 AM 8/6/97 +0200, Christoph Kukulies wrote:
>I'm having a weird problem under NT 4.0 (I remember to
>have seen this with b17 and NT3.51 also):
>
>D:\>rm -rf somedir
>rm: WARNING: Circular directory structure.
>This almost certainly means that you have a corrupted file system.
>NOTIFY YOUR SYSTEM MANAGER.
>Cycle detected:
>somedir/FOO/FOO
>is the same file as
>somedir
>
>CHKDSK doesn't flag any errors on the filesystem and I tend to believe
>this isn't the cause anyway.
>
>The interesting thing is: When I remove the file somedir/FOO/FOO
>the rm command is able to run through without errors.
>
>
>-- 
>Chris Christoph P. U. Kukulies kuku@gil.physik.rwth-aachen.de

Chris,

This should be in the FAQ (I expect its not at the moment).  The problem
is caused by a faulty inode mapping algorithm in all the betas.  There is
no problem with your file system.  It merely means that the faulty inode
mapping for files and directories thinks there's more than 1 file and/or
directory for the generated inode number, which is certainly a bad thing
for traditional UNIX file systems.  The error hinders rm from working 
correctly but does not indicate file system problems.  You'll just need
to delete the intended files/directories another way (most likely via 
Windows or DOS tools).  I believe Sergey's latest DLL has some fixes to 
mitigate this problem.  I don't think there's a complete fix yet (correct
me if I'm wrong folks).

Larry Hall                              lhall@rfk.com
RFK Partners, Inc.                      (617) 239-1053
8 Grove Street                          (617) 239-1655 - FAX
Wellesley, MA  02181                             

-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 7+ messages in thread

* rm -rf -> Circular directory structure
@ 1997-08-06  2:16 Christoph Kukulies
  1997-08-06 13:20 ` Fergus Henderson
  0 siblings, 1 reply; 7+ messages in thread
From: Christoph Kukulies @ 1997-08-06  2:16 UTC (permalink / raw)
  To: gnu-win32

I'm having a weird problem under NT 4.0 (I remember to
have seen this with b17 and NT3.51 also):

D:\>rm -rf somedir
rm: WARNING: Circular directory structure.
This almost certainly means that you have a corrupted file system.
NOTIFY YOUR SYSTEM MANAGER.
Cycle detected:
somedir/FOO/FOO
is the same file as
somedir

CHKDSK doesn't flag any errors on the filesystem and I tend to believe
this isn't the cause anyway.

The interesting thing is: When I remove the file somedir/FOO/FOO
the rm command is able to run through without errors.


-- 
Chris Christoph P. U. Kukulies kuku@gil.physik.rwth-aachen.de
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~1997-08-12  0:35 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-08-11 14:01 rm -rf -> Circular directory structure Igor V. Kovalenko
1997-08-12  0:35 ` Fergus Henderson
  -- strict thread matches above, loose matches on Subject: below --
1997-08-07 23:58 Sergey Okhapkin
1997-08-07  9:45 Michael A. Chase
1997-08-06  8:19 Larry Hall
1997-08-06  2:16 Christoph Kukulies
1997-08-06 13:20 ` Fergus Henderson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).