LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices



Reply
 
Search this Thread
Old 06-12-2014, 07:36 AM   #1
rpedrica
Member
 
Registered: Nov 2008
Location: Cape Town
Distribution: Slackware64 -current
Posts: 208

Rep: Reputation: 27
Courier IMAP + GAM server problems - Slack gamin package has patch?


I have a courier imap server which has been running along pretty nicely for a while but as user count has grown, I'm starting to get the following issues more often:

imapd: FAMPending: timeout

Access to Courier seems sluggish at times, and the clients will shows timeout errors on occasion. The Courier/GAM issue seems to be a well known and old issue but the fixes aren't necessarily clear.

The following bug report indicates the problem:

https://bugzilla.gnome.org/show_bug.cgi?id=667230

The slackware14 64-bit package for gamin ( gamin-0.1.10-x86_64-5 ) seems to have ( part of ) the patch included but the problem still occurs. I noticed slackware's patch is:


fix-double-lock-in-inotify-helper-c.patch.gz

Quote:
diff -rupN gamin-0.1.10/server/inotify-helper.c gamin-0.1.10-new/server/inotify-helper.c
--- gamin-0.1.10/server/inotify-helper.c 2008-11-12 21:45:28.000000000 +0100
+++ gamin-0.1.10-new/server/inotify-helper.c 2012-02-02 23:11:47.247757385 +0100
@@ -127,9 +127,6 @@ ih_sub_add (ih_sub_t * sub)
gboolean
ih_sub_cancel (ih_sub_t * sub)
{
- G_LOCK(inotify_lock);
-
-
if (!sub->cancelled)
{
IH_W("cancelling %s\n", sub->pathname);
@@ -140,7 +137,6 @@ ih_sub_cancel (ih_sub_t * sub)
sub_list = g_list_remove (sub_list, sub);
}

- G_UNLOCK(inotify_lock);
return TRUE;
}
But the patch in the above bug report includes an additional section:

Quote:
---
server/inotify-helper.c | 7 ++-----
server/inotify-helper.h | 1 -
2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/server/inotify-helper.c b/server/inotify-helper.c
index d77203e..0789fa4 100644
--- a/server/inotify-helper.c
+++ b/server/inotify-helper.c
@@ -123,13 +123,11 @@ ih_sub_add (ih_sub_t * sub)

/**
* Cancels a subscription which was being monitored.
+ * inotify_lock must be held when calling.
*/
-gboolean
+static gboolean
ih_sub_cancel (ih_sub_t * sub)
{
- G_LOCK(inotify_lock);
-
-
if (!sub->cancelled)
{
IH_W("cancelling %s\n", sub->pathname);
@@ -140,7 +138,6 @@ ih_sub_cancel (ih_sub_t * sub)
sub_list = g_list_remove (sub_list, sub);
}

- G_UNLOCK(inotify_lock);
return TRUE;
}

diff --git a/server/inotify-helper.h b/server/inotify-helper.h
index 5d3b6d0..d36b5fd 100644
--- a/server/inotify-helper.h
+++ b/server/inotify-helper.h
@@ -34,7 +34,6 @@ gboolean ih_startup (event_callback_t ecb,
found_callback_t fcb);
gboolean ih_running (void);
gboolean ih_sub_add (ih_sub_t *sub);
-gboolean ih_sub_cancel (ih_sub_t *sub);

/* Return FALSE from 'f' if the subscription should be cancelled */
void ih_sub_foreach (void *callerdata, gboolean (*f)(ih_sub_t *sub, void *callerdata));
--
1.7.7.2
As you can see, Slackware's patch affects inotify-helper.c only while the above patch affects inotify-helper.c and inotify-helper.h.

Does anyone have experience with this issue? Should I just remove gamin temporarily while I recompile courier ( without fam/gam support )?

Regards, Robby
 
Old 06-15-2014, 08:20 PM   #2
dijetlo
Member
 
Registered: Jan 2009
Location: RHELtopia....
Distribution: Slackware Current 64bit Multi-Lib/RHEL
Posts: 742

Rep: Reputation: Disabled
Quote:
IMAP_ENHANCEDIDLE to 1 in /etc/courier/imapd
You might try setting the enhanced idle to 0 (disable it).
Users wont be able to see updates to their mail folders in real time, they'll have to close and re-open to see new mail, however it seems to resolve the locking issue.
I though this might be useful as well.
Quote:
IMAP_USELOCKS

This setting in /etc/courier/imapd must be enabled. This setting uses dot-lock files to synchronize updates to folder indexes between multiple IMAP clients that have the same folder opened.

This setting is safe to use with NFS, as it does not use actual file locking calls, and does not require the services of the problematic NFS lock daemon.
Source
 
Old 06-19-2014, 03:06 AM   #3
rpedrica
Member
 
Registered: Nov 2008
Location: Cape Town
Distribution: Slackware64 -current
Posts: 208

Original Poster
Rep: Reputation: 27
Thanks dijetlo,

The default for IMAP_ENHANCEDIDLE is already 0, and USELOCKS is 1. But the issue still happens. I have since rebuilt courier imap with the gamin package removed. The FAMPending errors are gone and no more timeouts. Is gamin really used for anything else? ( KDE? ). Can it not be removed from the distro?

Robby
 
Old 06-19-2014, 01:14 PM   #4
dijetlo
Member
 
Registered: Jan 2009
Location: RHELtopia....
Distribution: Slackware Current 64bit Multi-Lib/RHEL
Posts: 742

Rep: Reputation: Disabled
One of the really nice things about Slackware that separates it from other distros is the design groups consideration for existing implementations. There are, no doubt, IMAP servers running gamin with no issues and pulling it out of the distro would make the admins of those machines lives miserable for no good reason.
If we know the solution is to move to FAM for heavier traffic servers, it's probably just better we help each other out and share it.
Thanks for doing that, BTW, Rob.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
courier-imap login problems winterprgrmr Linux - General 0 11-27-2006 09:21 PM
Problems with Courier IMAP connecting to virtual users HGeneAnthony Linux - Software 0 11-05-2006 08:02 PM
Courier Imap Problems madunix General 2 02-19-2006 10:34 AM
Postfix+Courier-IMAP Login Problems kasb Linux - Software 1 11-02-2003 08:15 AM
Courier IMAP Server latino Linux - Newbie 2 08-19-2003 10:35 PM


All times are GMT -5. The time now is 06:24 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration