On 12-09-14 01:10, Sam Varshavchik wrote:
> Ángel González writes:
>
>> Kees Bakker wrote:
>> > * maildir/maildirwatch.c (maildirwatch_alloc): Use alarm() to kill
>> >     the process if FAMOpen() takes more than 15 seconds to return.
>> >     Should prevent a hung process if FAM/Gamin is fubared.
>>
>> Seems that a signal(SIGALRM, SIG_IGN); would have been a appropiate. 
>> If FAMOpen
>> failed with EINTR, courier would have been able to continue without 
>> dying.
>
> No. The process is stuck somewhere in the innards of the gamin 
> library. Something is fundamentally broken with gamin on some Linux 
> distros, but not on others. Gamin on Fedora is just fine, but, 
> apparently, on Debian and Debian derivatives it keeps getting hung 
> when opening a domain socket. The process will hang forever, until 
> something kills it.
>
> The alarm is set by Courier, to kill the process if it's hung. It's 
> better to do this, since hung processes will accumulate, and will 
> eventually kill the box entirely.

Before coming to this mailing list I did searched the web and saw notes
about fam and gamin but the "solutions" all sounded too much like voodoo.
So I didn't pay much attention to them. For example these threads
and this Ubuntu bug.
   http://ubuntuforums.org/archive/index.php/t-1970712.html
   https://bbs.archlinux.org/viewtopic.php?id=141937
   https://bugs.launchpad.net/ubuntu/+source/courier/+bug/890756

In my case it would have been helpful if something useful had been
written in a log file, any log file. Now, I was completely in the dark
about the failure. On my system the mentioned "FAMPending: timeout"
was not in the log.
So, if possible, write an error message in the log that imapd died due to
timeout. Is the alarm(15) signal handled at all, or does the program simply
die? If so, that seems like a misfeature.
-- 
Kees

------------------------------------------------------------------------------
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
_______________________________________________
Courier-imap mailing list
Courier-imap@lists.sourceforge.net
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-imap

Reply via email to