[Openais] [PATCH-COROSYNC] If syslog() blocked, node-leave events were incorrectly reported

Steven Dake sdake at redhat.com
Wed Sep 17 10:26:22 PDT 2008


Andrew

I intend to investigate that right now.

Regards
-stevge
On Wed, 2008-09-17 at 11:43 +0200, Andrew Beekhof wrote:
> Is this relevant to whitetank too?
> 
> On Wed, Sep 17, 2008 at 11:32, Angus & Anna Salkeld <ahsalkeld at gmail.com> wrote:
> > In some cases, the syslog() call may block. If this happened, the AIS worker
> > thread would block waiting on the syslog() call. However, the worker thread
> > is still holding a logsys mutex, which is needed to enqueue any more log
> > messages from the other AIS threads. So the main AIS thread blocks waiting
> > on the logsys mutex. This can then cause aisexec on other nodes to detect
> > the node as leaving the cluster.
> >
> > Author: Tim Beale <tim.beale at alliedtelesis.co.nz>
> > ---
> >  exec/logsys.c |    6 ++++--
> >  1 files changed, 4 insertions(+), 2 deletions(-)
> >
> > diff --git a/exec/logsys.c b/exec/logsys.c
> > index bc519f1..425d0e2 100644
> > --- a/exec/logsys.c
> > +++ b/exec/logsys.c
> > @@ -274,6 +274,10 @@ static void log_printf_worker_fn (void
> > *thread_data, void *work_item)
> >                fflush (stdout);
> >        }
> >
> > +       /* release mutex here in case syslog blocks */
> > +       if (logsys_wthread_active)
> > +               pthread_mutex_unlock (&logsys_config_mutex);
> > +
> >        if ((logsys_mode & LOG_MODE_OUTPUT_SYSLOG_THREADED) &&
> >                (!((logsys_mode & LOG_MODE_FILTER_DEBUG_FROM_SYSLOG) &&
> >                   (log_data->priority == LOG_LEVEL_DEBUG)))) {
> > @@ -281,8 +285,6 @@ static void log_printf_worker_fn (void
> > *thread_data, void *work_item)
> >                        &log_data->log_string[log_data->syslog_pos]);
> >        }
> >        free (log_data->log_string);
> > -       if (logsys_wthread_active)
> > -               pthread_mutex_unlock (&logsys_config_mutex);
> >  }
> >
> >  static void _log_printf (
> > --
> > _______________________________________________
> > Openais mailing list
> > Openais at lists.linux-foundation.org
> > https://lists.linux-foundation.org/mailman/listinfo/openais
> >
> _______________________________________________
> Openais mailing list
> Openais at lists.linux-foundation.org
> https://lists.linux-foundation.org/mailman/listinfo/openais



More information about the Openais mailing list