Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dz8IT-00074P-MA for pgsql-hackers@arkaria.postgresql.org; Mon, 02 Oct 2017 21:30:41 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dz8IS-0005cu-ND for pgsql-hackers@arkaria.postgresql.org; Mon, 02 Oct 2017 21:30:40 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dz8IR-0005bq-Fi for pgsql-hackers@postgresql.org; Mon, 02 Oct 2017 21:30:39 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dz8IK-0004yL-JF for pgsql-hackers@postgresql.org; Mon, 02 Oct 2017 21:30:38 +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 v92LUPdr000460; Mon, 2 Oct 2017 17:30:25 -0400 From: Tom Lane To: Andres Freund cc: Andreas Seltenreich , pgsql-hackers@postgresql.org, Alvaro Herrera , Michael Paquier Subject: Re: [sqlsmith] stuck spinlock in pg_stat_get_wal_receiver after OOM In-reply-to: <20171002210805.x4lxxmarluen6rfg@alap3.anarazel.de> References: <87h8vhtgj2.fsf@ansel.ydns.eu> <20171002210805.x4lxxmarluen6rfg@alap3.anarazel.de> Comments: In-reply-to Andres Freund message dated "Mon, 02 Oct 2017 14:08:05 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <458.1506979825.1@sss.pgh.pa.us> Date: Mon, 02 Oct 2017 17:30:25 -0400 Message-ID: <459.1506979825@sss.pgh.pa.us> List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Andres Freund writes: > On 2017-10-02 22:56:49 +0200, Andreas Seltenreich wrote: >> low-memory testing with REL_10_STABLE at 1f19550a87 produced the >> following PANIC: >> stuck spinlock detected at pg_stat_get_wal_receiver, walreceiver.c:1397 > Ugh. Egad. > Yes, that'd be a bad idea. It's not great to have memcpys in a critical > section, but it's way better than pallocs. So we need to use some local > buffers that this get copied to. Or replace the spinlock with an LWLock? In any case, I think it would be a good idea to look at every other critical section touching that lock to see if there are any other blatant coding-rule violations. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers