7 messages in net.sourceforge.lists.courier-usersRe: [courier-users] Re: Folder deleti...
FromSent OnAttachments
Ben BeuchlerApr 10, 2001 8:32 am 
Sam VarshavchikApr 10, 2001 3:58 pm 
Ben BeuchlerApr 10, 2001 7:53 pm 
Ben BeuchlerApr 10, 2001 8:19 pm 
Sam VarshavchikApr 10, 2001 8:53 pm 
Ben BeuchlerApr 10, 2001 10:27 pm 
Sam VarshavchikApr 10, 2001 10:57 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [courier-users] Re: Folder deletion bug?Actions...
From:Ben Beuchler (ins@emt-p.org)
Date:Apr 10, 2001 10:27:56 pm
List:net.sourceforge.lists.courier-users

On Wed, Apr 11, 2001 at 03:54:02AM +0000, Sam Varshavchik wrote:

I'm attempting to delete large folders containing 2000-3000 messages each. I'm using mutt as my MUA. Here's a dump of the session, obtained with Ethereal:

a0033 NOOP a0033 OK NOOP completed a0034 DELETE "INBOX.read-200009" a0034 OK Folder deleted. a0035 NOOP a0035 OK NOOP completed

The thing is, the folder was not actually deleted. Initially there were 2800 messages in the box, after the above transaction the folder was still there with around 1200 messages. I repeated the delete command and this time it took it down to 575. The only way I've found to completely delete the folder is to change into it and delete all the messages, then delete the folder.

I'm running Courier-IMAP 1.0.

What filesystem are you on? Can you run strace/truss on the process, to see what it's doing?

Courier is running on FreeBSD with the Maildirs mounted via NFS off a NetApp filer. I will truss the process tonight and see if I can duplicate it.

I attached truss the the Courier process and attempted to delete a folder named 'testing' containing 1998 messages. Then I left the listing of folders. When I reopened the list, the 'testing' folder was still there and contained 979 messages.

Can you get any ore detail on a trace? I'd like to see the contents of the arguments read(), write(), unlink(), and getdirentries() logged. You can kinda guess what they are, but you really have to be sure...

Unfortunately, the FreeBSD truss doesn't have that capability. It's quite limited...

I'm guessing that this is rmdir(".testing/cur"). So, it finished reading cur, didn't find any errors deleting stuff from cur, but after deleting everything it read, but rmdir() failed.

Doing a web search brings up a couple of interesting results:

http://linux-xfs.sgi.com/projects/xfs/indexed/msg00049.html

Subject: Re: NFS readdir seems to be broken

...

... I have my suspicions about the readdir interface at the moment, I have seen rm -r -f miss a file...

[ Sounds similar ]

I may have misunderstood the message, but it appeared to me that the problem they were discussing was specific to xfs exports under Linux.

I'm wondering whether reading the directory and simultaneously deleting files from the same directory causes NFS to lose its mind.

Very possible. NFS is weird.

Try populating a directory with a couple of thousand dummy files, then do rm -rf on it and see what happens.

That worked just fine. I created a Maildir with 4635 messages in it and 'rm -rf' worked perfectly. It also may be worth noting that if I change to a copy of that mailbox with 4635 messages in it, I can tag and delete the messages just fine. Then, of course, I can delete the mailbox without any problems.

Ah well...

Ben