Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1brqmn-0002ho-9S for pgsql-hackers@arkaria.postgresql.org; Wed, 05 Oct 2016 18:19:21 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1brqmm-0008GW-8U for pgsql-hackers@arkaria.postgresql.org; Wed, 05 Oct 2016 18:19:20 +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 1brqlO-0006hN-NE for pgsql-hackers@postgreSQL.org; Wed, 05 Oct 2016 18:17:54 +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 1brqlI-0004ZK-2w for pgsql-hackers@postgreSQL.org; Wed, 05 Oct 2016 18:17:53 +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 u95IHj6O022367; Wed, 5 Oct 2016 14:17:45 -0400 From: Tom Lane To: Andres Freund cc: pgsql-hackers@postgreSQL.org Subject: Re: Our "fallback" atomics implementation doesn't actually work In-reply-to: <20161005180510.qopm4lbm7d7zzllt@alap3.anarazel.de> References: <14947.1475690465@sss.pgh.pa.us> <20161005180510.qopm4lbm7d7zzllt@alap3.anarazel.de> Comments: In-reply-to Andres Freund message dated "Wed, 05 Oct 2016 11:05:10 -0700" Date: Wed, 05 Oct 2016 14:17:45 -0400 Message-ID: <22366.1475691465@sss.pgh.pa.us> X-Pg-Spam-Score: -4.5 (----) 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 2016-10-05 14:01:05 -0400, Tom Lane wrote: >> I think what is happening is that there are circular assumptions that end >> up trying to implement a spinlock in terms of a spinlock, or otherwise >> somehow recursively use the process's semaphore. It's a bit hard to tell >> though because the atomics code is such an underdocumented rat's nest of >> #ifdefs. > I don't think that should be the case, but I'll look into it. How long > did it take for you to reproduce the issue? It hangs up within 10 or 20 seconds for me. I didn't try hard to get a census of where, but at least some of the callers are trying to acquire buffer partition locks. 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