courier-imap, gamin: FAMPending: timeout

Bug #890756 reported by Markus
132
This bug affects 27 people
Affects Status Importance Assigned to Milestone
courier (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Description: Ubuntu 10.04.3 LTS
Release: 10.04

courier-imap:
  Installed: 4.6.0-2.1ubuntu1
  Candidate: 4.6.0-2.1ubuntu1
  Version table:
 *** 4.6.0-2.1ubuntu1 0
        500 http://ftp.uni-kl.de/pub/linux/ubuntu/ lucid/universe Packages
        100 /var/lib/dpkg/status

Originally, I had installed courier-ssl with all it's dependencies. It also installed gamin.

Using the enhanced idle with courier led to the following error messages:

Nov 15 16:17:07 lea imapd-ssl: FAMPending: timeout
Nov 15 16:17:16 lea imapd: FAMPending: timeout
Nov 15 16:17:17 lea imapd: FAMPending: timeout
Nov 15 16:17:23 lea imapd-ssl: FAMPending: timeout
Nov 15 16:17:25 lea imapd: FAMPending: timeout

Netstat was filled, too, with 50+ of

unix 3 [ ] STREAM CONNECTED 6923820 @/tmp/fam-Debian-exim-

Mail-clients were lagging and hanging extemely when conneciton count to courier got high.

Then I simply forced uninstall of "gamin" and replaced it with "fam". Now the errors do not happen anymore and client's connection feel very fast.

Looks like courier-imap has a bug with gamin in lucid.

Markus (doits)
description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in courier (Ubuntu):
status: New → Confirmed
Revision history for this message
Chris Kuehl (chris-0zxvj9hhx) wrote :

This just recently became an issue after upgrading from 11.10 to 12.04. syslog indicated that authentication succeeded, but courier then apparently dropped the connection after authentication (diagnosed via telnet). The solution proposed by ginoputrino solved the issue:

apt-get install fam
apt-get install courier-imap courier-imap-ssl

(see http://ubuntuforums.org/showpost.php?s=7460080f58fa5ea3c972281a710baea0&p=11874468&postcount=10 )

Revision history for this message
Wladimir Mutel (mwg) wrote :

courier-imap has hardcoded dependency on gamin which asks to remove fam when courier packages are reinstalled.

And yes, I started to have this problem on my x86_64 system after upgrading Oneiric to Precise.
I added GAM_DEBUG=1 and see a lot of 'FAMPending: timeout' in Courier /var/log/mail.log
Now it is very inconvenient to access my mail by IMAP. Have to run 'mutt' on local Maildir instead.

Revision history for this message
Wladimir Mutel (mwg) wrote :

(mean, added GAM_DEBUG=1 t my /etc/default/courier)

now, tried to replace gam_server with an strace wrapper and got some logs as a result.
gam_server blocks somewhere in futex() syscall but I don't have debug information to it
and so can't clearly determine what is its call stack at the moment.

Revision history for this message
Wladimir Mutel (mwg) wrote :

ok, I had 12293 files in my ~/Maildir/cur , and got FAM timeouts.
now I moved aside some old files, and timeouts have gone.
3211 files in my 'cur' now.
I will try to find a limit which causes gam_server timeouts.

anyone who is having the same problem, could you please tell how many files do you have in your Maildir/cur ?

Revision history for this message
Mike Novice (mike434) wrote :

I had IMAP connection drops and also switched from gamin to FAM (see http://ubuntuforums.org/showthread.php?t=1970712).

It's working stable now for a few days, these are my accounts:

root@cartman:/var/mail/virtual/..1/cur# ls -l | wc -l
1592
root@cartman:/var/mail/virtual/..2/cur# ls -l | wc -l
5798
root@cartman:/var/mail/virtual/..3/cur# ls -l | wc -l
1796

Revision history for this message
Wladimir Mutel (mwg) wrote :

I think there is some limit like 12288

could anyone please confirm my guess ?
I have only 1 Courier-IMAP server on this version of Ubuntu under my control.

Revision history for this message
Wladimir Mutel (mwg) wrote :

Mike, how did you manage to install courier-imap together with fam without dependency conflict ?
Should one take some specially-built packages ?

And overall, how to fix gamin behaviour ? I copied my 12293 files into different subfolder (just by cp -al, not by IMAP), and now when I click on this subfolder in Seamonkey mail, courier-imap reproducibly hangs (due to inability to connect to gam_server, I suppose).

Revision history for this message
Mike Novice (mike434) wrote :

courier-imap can be dependent on FAM or gamin. I've switched like this:

sudo apt-get purge gamin
sudo apt-get install fam
sudo apt-get install courier-imap-ssl courier-ssl courier-imap courier-base

Others have also done this, see: http://ubuntuforums.org/showthread.php?t=1970712 for more information.
(There are no special repos, packages, or manual compiles involved.)

I dont think there is a gamin fix yet, that is what this bug is for IMO.

Revision history for this message
Wladimir Mutel (mwg) wrote :

apparently fixed in lp:926862
at least my courier-imap now works. after 3-month downtime :>

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.