Re: BUG #9551: Hang in State "authentication" Prevents Vacuum from Freeing Dead Rows - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #9551: Hang in State "authentication" Prevents Vacuum from Freeing Dead Rows
Date
Msg-id 27619.1394834078@sss.pgh.pa.us
Whole thread Raw
In response to BUG #9551: Hang in State "authentication" Prevents Vacuum from Freeing Dead Rows  (jmorton@gmail.com)
List pgsql-bugs
"James L. Morton" <jmorton@gmail.com> writes:
>  We've added monitoring for this particular problem and saw this happen
> once more today.  We noticed that this seems to correlate with a burst of
> log messages from auditd:
> ...
> When auditd exhausts its buffer, by default it begins logging to printk(),
> which in turn gets picked up by syslog.  Perhaps this burst of messages is
> causing syslog to pause long enough to reach authentication_timeout?  It
> seems odd, especially given that we have our Postgres syslog facility set
> to async.

Interesting.  Yeah, you'd certainly imagine that it shouldn't wait if
properly configured, but that's what seems to be happening.

I've committed a fix (which will appear in next week's releases) that
prevents the recursive call of syslog() by delaying processing of the
authentication_timeout interrupt until elog() is done.  That should fix
your problem as long as syslog's load-induced pause is transient.
However, if syslog() is getting wedged for some reason, you're still
going to have a stuck backend, because authentication_timeout won't
unwedge it.

            regards, tom lane

pgsql-bugs by date:

Previous
From: Kevin Grittner
Date:
Subject: Re: Re: BUG #9301: INSERT WHERE NOT EXISTS on table with UNIQUE constraint in concurrent SERIALIZABLE transactions
Next
From: "James L. Morton"
Date:
Subject: Re: BUG #9551: Hang in State "authentication" Prevents Vacuum from Freeing Dead Rows