You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Garrett Rooney <ro...@electricjellyfish.net> on 2004/05/01 17:55:01 UTC

[libsvn_fs_fs] 'Directory not empty' error when removing committed txn

So I've been playing around with libsvn_fs_fs a bit, and I'm seeing 
some odd errors when committing large numbers of changes (importing the 
subversion tree into a clean repository seems to be a good way to cause 
it).  Specifically, it's failing to remove the transaction directory 
once the commit has completed.

The commit succeeds just fine, but it dies with an error like this when 
removing the transaction:

subversion/libsvn_subr/io.c:1154: (apr_err=66)
svn: Can't remove '/tmp/repos/db/transactions/FTdTod.txn': Directory 
not empty

I don't have time to investigate further at the moment, but I figured 
I'd let people know...

-garrett


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [libsvn_fs_fs] 'Directory not empty' error when removing committed txn

Posted by Michael W Thelen <th...@cs.utah.edu>.
* Garrett Rooney <ro...@electricjellyfish.net> [2004-05-09 11:26]:
> It seems that a work around for the problem should probably be added to 
> APR, although I imagine we might want to include one in Subversion as 
> well for now, so that people are not forced to upgrade.

The discussion seems to have trailed off without a clear resolution as
to whether this workaround should be implemented in Subversion, so I've
filed this patch as issue #1896:
http://subversion.tigris.org/issues/show_bug.cgi?id=1896

-- Mike

-- 
Michael W. Thelen
He who asks is a fool for five minutes, but he who does not ask remains a fool
forever.        -- Chinese proverb

Re: [libsvn_fs_fs] 'Directory not empty' error when removing committed txn

Posted by Garrett Rooney <ro...@electricjellyfish.net>.
Josh Pieper wrote:

> Garrett Rooney wrote:
> 
>>No, this is on Mac OS X.  And on windows the error we get back is about 
>>access denied, not about the directory not being empty.
> 
> 
> Do you think it could a symptom of the problem described here?
> 
> http://www.mail-archive.com/bug-fileutils@gnu.org/msg02337.html

That seems likely.  Apparently the workaround is to call 'rewinddir' 
after removing an entry from the directory.  Sure enough, the following 
hack to io.c seems to work around the problem.

It seems that a work around for the problem should probably be added to 
APR, although I imagine we might want to include one in Subversion as 
well for now, so that people are not forced to upgrade.

-garrett

Re: [libsvn_fs_fs] 'Directory not empty' error when removing committed txn

Posted by rb...@rkbloom.net.

On Sun, 9 May 2004, Josh Pieper wrote:

> Josh Pieper wrote:
> > Garrett Rooney wrote:
> > > No, this is on Mac OS X.  And on windows the error we get back is about
> > > access denied, not about the directory not being empty.
> >
> > Do you think it could a symptom of the problem described here?
> >
> > http://www.mail-archive.com/bug-fileutils@gnu.org/msg02337.html
>
> And now that I look a little harder, this exact same problem has been
> seen in subversion before.
>
> http://www.contactor.se/~dast/svn/archive-2003-04/0770.shtml
>
> I think APR may need to have a workaround for OS X in order to handle
> this buggy readdir implementation.

Yes, this is definately something APR should work around.  I don't have a
Mac OS X box that I can use to fix this unfortunately, but I will post to
the APR dev list.

Ryan


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [libsvn_fs_fs] 'Directory not empty' error when removing committed txn

Posted by Josh Pieper <jj...@pobox.com>.
Josh Pieper wrote:
> Garrett Rooney wrote:
> > No, this is on Mac OS X.  And on windows the error we get back is about 
> > access denied, not about the directory not being empty.
> 
> Do you think it could a symptom of the problem described here?
> 
> http://www.mail-archive.com/bug-fileutils@gnu.org/msg02337.html

And now that I look a little harder, this exact same problem has been
seen in subversion before.

http://www.contactor.se/~dast/svn/archive-2003-04/0770.shtml

I think APR may need to have a workaround for OS X in order to handle
this buggy readdir implementation.

-Josh

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [libsvn_fs_fs] 'Directory not empty' error when removing committed txn

Posted by Josh Pieper <jj...@pobox.com>.
Garrett Rooney wrote:
> No, this is on Mac OS X.  And on windows the error we get back is about 
> access denied, not about the directory not being empty.

Do you think it could a symptom of the problem described here?

http://www.mail-archive.com/bug-fileutils@gnu.org/msg02337.html

-Josh



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [libsvn_fs_fs] 'Directory not empty' error when removing committed txn

Posted by Garrett Rooney <ro...@electricjellyfish.net>.
C.A.T.Magic wrote:
> Garrett Rooney wrote:
> [...]
> 
>> Garrett Rooney wrote:
>>
>> transaction directory succeeds after failing 6 times in a row.
> 
> [...]
> 
>> I'm totally confused as to what could cause this kind of behavior, but 
>> in case anyone's interested here's my current patch to work around it. 
>> I don't intend to commit this unless someone either explains to me 
>> what the underlying cause is or says they're seeing the same thing and 
>> votes in favor of this kind of work around.
> 
> 
> is this on a windows OS? if yes, then
> the effect of a file beeing locked several seconds
> without being able to delete it can be related to
> antivirus software.

No, this is on Mac OS X.  And on windows the error we get back is about 
access denied, not about the directory not being empty.

-garrett

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [libsvn_fs_fs] 'Directory not empty' error when removing committed txn

Posted by "C.A.T.Magic" <c....@gmx.at>.
Garrett Rooney wrote:
[...]
> Garrett Rooney wrote:
> 
> transaction directory succeeds after failing 6 times in a row.
[...]
> I'm totally confused as to what could cause this kind of behavior, but 
> in case anyone's interested here's my current patch to work around it. I 
> don't intend to commit this unless someone either explains to me what 
> the underlying cause is or says they're seeing the same thing and votes 
> in favor of this kind of work around.

is this on a windows OS? if yes, then
the effect of a file beeing locked several seconds
without being able to delete it can be related to
antivirus software.

======
c.a.t.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [libsvn_fs_fs] 'Directory not empty' error when removing committed txn

Posted by Garrett Rooney <ro...@electricjellyfish.net>.
Garrett Rooney wrote:

> So I've been playing around with libsvn_fs_fs a bit, and I'm seeing some 
> odd errors when committing large numbers of changes (importing the 
> subversion tree into a clean repository seems to be a good way to cause 
> it).  Specifically, it's failing to remove the transaction directory 
> once the commit has completed.
> 
> The commit succeeds just fine, but it dies with an error like this when 
> removing the transaction:
> 
> subversion/libsvn_subr/io.c:1154: (apr_err=66)
> svn: Can't remove '/tmp/repos/db/transactions/FTdTod.txn': Directory not 
> empty
> 
> I don't have time to investigate further at the moment, but I figured 
> I'd let people know...

Ok, I've had some time to play with this, and here's what I've figured 
out so far.

1) putting a 'if err == enotempty then retry' loop in 
svn_fs_fs__purge_txn seems to 'fix' the problem, removing the 
transaction directory succeeds after failing 6 times in a row.

2) commits involving less nodes in the filesystem (and thus less files 
in the transaction directory) do not seem to have this problem.

I'm totally confused as to what could cause this kind of behavior, but 
in case anyone's interested here's my current patch to work around it. I 
don't intend to commit this unless someone either explains to me what 
the underlying cause is or says they're seeing the same thing and votes 
in favor of this kind of work around.

-garrett