[Dovecot] Understanding fcntl() error messages

Timo Sirainen tss at iki.fi
Thu Feb 22 12:32:51 UTC 2007

On Thu, 2007-02-22 at 13:43 +1100, Dean Manners wrote:
> Hey guys,
> 		After many trials and tribulations I have now got some
> fairly stable NFS clients serving dovecot-lda and pop3/imap. Over a 9 hour
> postal/rabid stress test only saw 5 errors for the 4 servers.  Wondering if
> anyone can shed a bit more light on what they mean exactly.  I have tried to
> find "Resource temporarily unavailable" and "No locks available" in the src
> to get some understanding - however it appears these messages are from a
> lower level.

"Resource temporarily unavailable" means it timed out while waiting for
lock. It's logged because it normally shouldn't happen except with
really heavy load.

"No locks available" means just that. The kernel said there's no more
locks. Maybe for that user, or maybe globally, I'm not sure.

> Feb 22 13:07:27 mailget01 dovecot: POP3(test999 at mailtest06.com): fcntl()
> failed with file /mnt/mailstore/mailtest06.com/8/test999/dovecot.index:
> Resource temporarily unavailable
> Feb 22 13:07:27 mailget01 dovecot: POP3(test999 at mailtest06.com): Couldn't
> open INBOX: Internal error occurred. Refer to server log for more
> information. [2007-02-22 13:07:27]
> Feb 22 13:07:27 mailget01 dovecot: POP3(test999 at mailtest06.com): No INBOX
> for user top=0/0, retr=0/0, del=0/0, size=0
> ------------------
> Does this mean that pop3 was waiting for a lock, but timed out ? 


> What are
> the likely affects of this on a client POPing -  session times out and they
> need to reconnect?


> The "No INBOX" error is little more odd, the same user had successful login
> 90 minutes earlier.

Well, it's logged whenever opening the mailbox failed for any reason.
Although yes, with pop3_lock_session=yes it's a wrong error message.
I'll see if I can get it fixed.

> Feb 22 01:42:03 mailfilter01 deliver(test680 at mailtest04.com): fcntl() failed
> with file /mnt/mailstore/mailtest04.com/10/test680/dovecot.index: No locks
> available
> I assume this means deliver tried to obtain a lock on the index file
> (probably many times) but failed.

Just once.

> Are the likely affects that the message
> still gets saved to the maildir but the index doesn't get updated?

The effect is that the delivery fails and deliver exits with
EX_TEMPFAIL, so it should get delivered later. It could of course also
save without updating indexes, but currently the code doesn't support
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://dovecot.org/pipermail/dovecot/attachments/20070222/b9f34ea8/attachment.pgp 

More information about the dovecot mailing list