Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gsz4G-0002xI-Ey for pgsql-hackers@arkaria.postgresql.org; Mon, 11 Feb 2019 00:03:24 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gsz3G-0001rT-N0 for pgsql-hackers@arkaria.postgresql.org; Mon, 11 Feb 2019 00:02:22 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gsz3G-0001rM-At for pgsql-hackers@lists.postgresql.org; Mon, 11 Feb 2019 00:02:22 +0000 Received: from mail-it1-x12b.google.com ([2607:f8b0:4864:20::12b]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gsz3D-0002xg-Sa for pgsql-hackers@lists.postgresql.org; Mon, 11 Feb 2019 00:02:21 +0000 Received: by mail-it1-x12b.google.com with SMTP id r6so22160263itk.0 for ; Sun, 10 Feb 2019 16:02:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=eRjKQGwHiqCKtounPjmPc+dildQhboYdw/aQINAT1yg=; b=WTq9Mv+VZjDlIIpWWvAkQ57JP1P77RqQOSGcE43J36UPunbg0+1nSM4RQtJUbwjHSs GUI0b71O/Aygqb714KUwsZpCJ1PavXoKZs9RUrsIa2q+D82tU7josPYP0iOgYGcHl97r A3dFX4YVLI3Ns7vFV6PCpdzelsHUky8zBzt8cbkzqpMrYKyKA22qMI0lI54CmtSkgvES L5bRtyGJNFU7ZjJIGIb6Y+vTJT91JzsrvPpfMPlZ0K0bquTZA2MEjlqtjKocMNYFNom8 g98yPTiww5t9x9vjqFvvDlwWHCfoGXeS0fdj+c9CLHdQq2zpraTpHvtkpq1LoNx08GwR IyxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=eRjKQGwHiqCKtounPjmPc+dildQhboYdw/aQINAT1yg=; b=NUNSlu/IM1yoHv6Tih/0jc7GSlHnVzmZkU2rTJoBsnWO3YM+f90+b+IfToLEZDqluN 5Gm7lH+dTtub73KwvY5O1fUmDaOXe9dvln5qeWLVN2TPcXjNGZHzB/sJihZgCf9EGsdU 4eC+v6UWa6OSf/Pyw9AB7MlXg830Av6bWVoJz3h25QO+BDit6dSei5LoyanXl8/Xy0TZ aA9lQ1GRGcyniQtRvApYseEuz0J+EZKiPYSLvxsyQzTR1iqGuZzJOLdCHf0iLHcFELNz ZwwybWuZ7ACPqeQ5xKQI5SOBU05W1yVLMS12g/vFYeojzBE2X2fwa7EyYvI8inMzgWOj n6Aw== X-Gm-Message-State: AHQUAuZCnQsTiw/YvgBpTkC7yqagooFQAM71QFJdLgcqrXe3AQwoodTp kltb7deve3Y0nOw88LCl50nqUw== X-Google-Smtp-Source: AHgI3Ia5Dmk1hevwdUP9x1HbfBrRdgjvO5hGjgv705kASRlnWoFSa5p6H7aQrOJnXBRpHUg9mOe8RQ== X-Received: by 2002:a5e:d804:: with SMTP id l4mr11219354iok.18.1549843337564; Sun, 10 Feb 2019 16:02:17 -0800 (PST) Received: from pryzbyj (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id u18sm3715200ioc.64.2019.02.10.16.02.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 10 Feb 2019 16:02:16 -0800 (PST) Received: by pryzbyj (Postfix, from userid 1000) id 30651800B9A; Sun, 10 Feb 2019 18:02:15 -0600 (CST) Date: Sun, 10 Feb 2019 18:02:15 -0600 From: Justin Pryzby To: Thomas Munro Cc: Robert Haas , Jakub Glapa , Fabio Isabettini , Arne Roland , Sand Stone , Rick Otten , PostgreSQL Hackers Subject: Re: dsa_allocate() faliure Message-ID: <20190211000215.GU31721@telsasoft.com> References: <20190206232110.GH29720@telsasoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Mon, Feb 11, 2019 at 09:45:07AM +1100, Thomas Munro wrote: > Ouch. Yeah, that'd do it and matches the evidence. With this change, > I couldn't reproduce the problem after 90 minutes with a test case > that otherwise hits it within a couple of minutes. ... > Note that this patch addresses the error "dsa_allocate could not find > %zu free pages". (The error "dsa_area could not attach to segment" is > something else and apparently rarer.) "could not attach" is the error reported early this morning while stress-testing this patch with queued_alters queries in loops, so that's consistent with your understanding. And I guess it preceded getting stuck on lock; although I don't how long between the first happened and the second, I'm guess not long and perhaps immedidately; since the rest of the processes were all stuck as in bug#15585 rather than ERRORing once every few minutes. I mentioned that "could not attach to segment" occurs in leader either/or parallel worker. And most of the time causes an ERROR only, and doesn't wedge all future parallel workers. Maybe bug#15585 "wedged" state maybe only occurs after some pattern of leader+worker failures (?) I've just triggered bug#15585 again, but if there's a pattern, I don't see it. Please let me know whether you're able to reproduce the "not attach" bug using simultaneous loops around the queued_alters query; it's easy here. Justin