Slackware This Forum is for the discussion of Slackware Linux.
|
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
06-12-2014, 06:36 AM
|
#1
|
Member
Registered: Nov 2008
Location: Cape Town
Distribution: Slackware64 -current
Posts: 281
Rep:
|
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
|
|
|
06-15-2014, 07:20 PM
|
#2
|
Senior Member
Registered: Jan 2009
Location: RHELtopia....
Distribution: Solaris 11.2/Slackware/RHEL/
Posts: 1,491
Rep:
|
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
|
|
|
06-19-2014, 02:06 AM
|
#3
|
Member
Registered: Nov 2008
Location: Cape Town
Distribution: Slackware64 -current
Posts: 281
Original Poster
Rep:
|
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
|
|
|
06-19-2014, 12:14 PM
|
#4
|
Senior Member
Registered: Jan 2009
Location: RHELtopia....
Distribution: Solaris 11.2/Slackware/RHEL/
Posts: 1,491
Rep:
|
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.
|
|
|
All times are GMT -5. The time now is 07:43 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|