Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WOa41-0006uP-Ad for pgsql-bugs@arkaria.postgresql.org; Fri, 14 Mar 2014 21:54:49 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WOa40-00069U-QF for pgsql-bugs@arkaria.postgresql.org; Fri, 14 Mar 2014 21:54:48 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WOa3z-00067x-HH for pgsql-bugs@postgresql.org; Fri, 14 Mar 2014 21:54:47 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WOa3r-00028B-G6 for pgsql-bugs@postgresql.org; Fri, 14 Mar 2014 21:54:46 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id s2ELscaN027620; Fri, 14 Mar 2014 17:54:38 -0400 From: Tom Lane To: "James L. Morton" cc: pgsql-bugs@postgresql.org Subject: Re: BUG #9551: Hang in State "authentication" Prevents Vacuum from Freeing Dead Rows In-reply-to: References: <20140312232810.634.7997@wrigleys.postgresql.org> <7087.1394738351@sss.pgh.pa.us> Comments: In-reply-to "James L. Morton" message dated "Fri, 14 Mar 2014 13:54:01 -0700" Date: Fri, 14 Mar 2014 17:54:38 -0400 Message-ID: <27619.1394834078@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org "James L. Morton" 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 -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs