Ghost folders & imapd segfaults
Andrew Morgan
morgan at orst.edu
Wed Jan 20 12:38:11 EST 2010
On Wed, 20 Jan 2010, Jukka Huhta wrote:
> We've had two tricky special cases of folders created by users. The
> folder names contain an exclamation mark, which, I presume, isn't
> handled as it should be.
>
> The symptom is that the ghost folders get somehow created on a
> different host than the "real" mailbox. That results in an annoying
> error from a quota listing script: "This mailbox hierarchy does not
> exist on a single backend server".
>
> The first one was like
>
> user.username1.fdasf!
>
> which equals (according to cyradm) to fdasf at user.username1 with
> permissions "anyone lrs". I could just add deletion permission to an
> admin account and dm it.
>
> But the other one is trickier. From mailbox list dump:
>
> user.username2 1 i16!nkpd username2 lrswipkxtecda anyone p
> user.username2.Drafts 1 i16!nkpd username2 lrswipkxtecda anyone p
> user.username2.Folder 1 i16!nkpd username2 lrswipkxtecda anyone p
> user.username2.Folder! 1 p01!default anyone lrs
>
> "Folder" is a regular, working folder. "i16" is the backend server of
> username2, "nkpd" is her partition, but p01 is a front end host, a
> proxy! How could this happen? Through some failed folder rename?
> How come there's "default" as partition? I cannot reproduce this on
> purpose, but I cannot delete the "Folder! " folder (yes, there seems
> to be a space) either: imapd process segfaults when trying. See:
>
> cyradm> lm user.username2.Folder
> user.username2.Folder (\HasNoChildren)
> cyradm> lm "user.username2.Folder! "
> @user.username2.Folder (\HasNoChildren)
> cyradm> lm " @user.username2.Folder"
> @user.username2.Folder (\HasNoChildren)
> cyradm> sam " @user.username2.Folder" admin all
> setaclmailbox: admin: lrswipkxtea:
> cyradm> lm " @user.username2.Folder"
>
> cyradm> lm " @user.username2.Folder"
> [returned to shell, cyradm dies]
>
> Maillog has this:
> Jan 20 15:58:57 pcn7 admin/master[11756]: process 9773 exited,
> signaled to death by 11
>
> And syslog:
> Jan 20 15:58:57 pcn7 kernel: imapd[9773]: segfault at 0000000000000000
> rip 00000039746796f0 rsp 00007fff0ba77da8 error 4
>
> According to gdb, imapd segfaults in strlen(). Of course I don't have
> debug symbols compiled in...
>
> Any hints?
I've seen this segfault happen to me in a similar situation where the
mailbox was listed as created on the frontend. Note - don't try to create
a new top-level mailbox on a frontend server! :)
Since it was my own fault, I just removed the offending mailbox and didn't
worry about the segfault.
I think the question here is - does Cyrus allow a non-admin to create a
new folder on whatever backend they want? Only admins should be allowed
to specify a partition.
> (I must admit that cyradm is connecting to another frontend than p01
> because I currently can't login to that one as admin without a
> service break (don't ask).)
I'm pretty sure you can only fix this by issuing "dm <folder>" on p01.
Andy
More information about the Info-cyrus
mailing list