[prev in list] [next in list] [prev in thread] [next in thread] 

List:       info-cyrus
Subject:    SIGCHLD vs process_msg, on 2.0.16 - linux (a bug?)
From:       "Mehrdad Fatemi" <fatemi () afranet ! com>
Date:       2002-01-28 18:09:20
[Download RAW message or body]

Hi everybody
I'm running cyrus-imapd-2.0.16 on redhat linux 7.1, but there is a strange
behaviour in cyrus that I figured out that it might be a bug, at least on
linux.
imagine the following situation:
we have a used(as stated in service.c) service and its idle for 60 seconds,
when select() returns indicating there is no new request pending for the
service, it will send a MASTER_SERVICE_UNAVAILABLE(=2) to the master process
which is belived to call process_msg to decrement the number of
ready_workers so the server can keep track of the "ready for work" services.
but as I found out when tracking the process flow, because it(the service)
calls service_abort() after that the SIGCHLD is being received prior to
process of the message sent via stat file descriptor, as result of this
sequence of operations the service aborts without having ready_workers
variable decremented, I had to add the following line to the reap_child
function to have this problem solved:
/*in block:decrement active count for service */
c->s->ready_workers--;

please let me know if I'm right and if there is another survey to this
problem.

Best Regards
Mehrdad Fatemi
R&D Manager

AFR@NET Co. Ltd.
Web: http://www.afranet.com
email: fatemi@afranet.com
Phone: +98 21 8741956-9

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic