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 1gk31H-0005vg-IC for pgsql-hackers@arkaria.postgresql.org; Thu, 17 Jan 2019 08:27:23 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gk31G-0001To-6r for pgsql-hackers@arkaria.postgresql.org; Thu, 17 Jan 2019 08:27: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 1gk31F-0001Th-OG for pgsql-hackers@lists.postgresql.org; Thu, 17 Jan 2019 08:27:22 +0000 Received: from mail-pg1-x544.google.com ([2607:f8b0:4864:20::544]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gk318-0000oA-KF for pgsql-hackers@lists.postgresql.org; Thu, 17 Jan 2019 08:27:21 +0000 Received: by mail-pg1-x544.google.com with SMTP id d72so4109856pga.9 for ; Thu, 17 Jan 2019 00:27:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leadboat.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=tqAvys60xUJ65ujn9JZdP9ibDPchlLRB7Fnvdkkrh+g=; b=X3m91tzsKeeRQrJw9ywblvoBc64Xk7cIafLp/ZoKUN/8fKP/aP1FlKjrqP4NrzAf02 +uocwF/fXQlITDrVfPOASgvmNzwcCORNE+Ga1pBTZ2Pmwx3lj+eNcNLQf9Kq0++dHTzl hby4V0gVTvjT9ARqmzeMMEHLeMFCJsTcnr/Mc= 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=tqAvys60xUJ65ujn9JZdP9ibDPchlLRB7Fnvdkkrh+g=; b=SDFV+sQyCLwzV/3B13ZMo/yTjdwGxLhWuxrxVrvQE/Uks7l+awxEFRW6LRhGPs0AXT qTphoEWKnV9K19BRXEqE28GwlmD8quLjwnySBqQz2VfN9JUlDUXYnchuTa6lpmFYOtxW 9rA54juiy2GNttmWuwaMaxGU5PN5YRYuWrNByMzOo8ItovyMmFJuXqkFMvx3XtgRZrpl w1oO6YwnpCMQ+A/PH3Khb2Lc1nk6oF3XolLNZanAozk48/kJi/bOFBXwc4frmY3NgqYo Wdl6C3SbZQ2iDX6aUyqKCcLjAqc+rlz5Zc4mjhu18/9ts2QUgO2WJf1pA3ZKUi4gA1Sc bBtA== X-Gm-Message-State: AJcUukdcCpEiUNBpO1Lpu4iLEkokd0DKXhLi9RDMg2b7Rq5Km5mCMHL4 oWHSAPBomW4qiRaURHa6dfH7gA== X-Google-Smtp-Source: ALg8bN6l5OCrJ3pltzR0+arpi94u9E5vIkqQ+LTqbiIy2P52/TUb9ztSmZnw/6qHU/lZ2bEGpu0IdQ== X-Received: by 2002:a63:3204:: with SMTP id y4mr12604941pgy.41.1547713631406; Thu, 17 Jan 2019 00:27:11 -0800 (PST) Received: from rfd.leadboat.com (c-73-158-248-138.hsd1.ca.comcast.net. [73.158.248.138]) by smtp.gmail.com with ESMTPSA id r76sm1827825pfb.69.2019.01.17.00.27.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 17 Jan 2019 00:27:10 -0800 (PST) Date: Thu, 17 Jan 2019 00:27:07 -0800 From: Noah Misch To: Heath Lord , Stephen Frost Cc: Andres Freund , Thomas Munro , PostgreSQL Hackers , Tom Lane Subject: Re: "could not reattach to shared memory" on buildfarm member dory Message-ID: <20190117082707.GA3908397@rfd.leadboat.com> References: <20180424070646.GA2693533@rfd.leadboat.com> <17897.1525108069@sss.pgh.pa.us> <29823.1525132900@sss.pgh.pa.us> <20180501002419.onmikldoe2ssjauq@alap3.anarazel.de> <18056.1525148010@sss.pgh.pa.us> <22096.1525188710@sss.pgh.pa.us> <20180819020007.GD3795674@rfd.leadboat.com> <14554.1537811585@sss.pgh.pa.us> <20180925150512.GA3990982@rfd.leadboat.com> <20181203053506.GB2860387@rfd.leadboat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181203053506.GB2860387@rfd.leadboat.com> User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Sun, Dec 02, 2018 at 09:35:06PM -0800, Noah Misch wrote: > On Tue, Sep 25, 2018 at 08:05:12AM -0700, Noah Misch wrote: > > On Mon, Sep 24, 2018 at 01:53:05PM -0400, Tom Lane wrote: > > > Overall, I agree that neither of these approaches are exactly attractive. > > > We're paying a heck of a lot of performance or complexity to solve a > > > problem that shouldn't even be there, and that we don't understand well. > > > In particular, the theory that some privileged code is injecting a thread > > > into every new process doesn't square with my results at > > > https://www.postgresql.org/message-id/15345.1525145612%40sss.pgh.pa.us > > > > > > I think our best course of action at this point is to do nothing until > > > we have a clearer understanding of what's actually happening on dory. > > > Perhaps such understanding will yield an idea for a less painful fix. > > > > I see. > > Could one of you having a dory login use > https://live.sysinternals.com/Procmon.exe to capture process events during > backend startup? Ping. > The ideal would be one capture where startup failed reattach > and another where it succeeded, but having the successful run alone would be a > good start. The procedure is roughly this: > > - Install PostgreSQL w/ debug symbols. > - Start a postmaster. > - procmon /nomonitor > - procmon "Filter" menu -> Enable Advanced Output > - Ctrl-l, add filter for "Process Name" is "postgres.exe" > - Ctrl-e (starts collecting data) > - psql (leave it running) > - After ~60s, Ctrl-e again in procmon (stops collecting data) > - File -> Save -> PML > - File -> Save -> XML, include stack traces, resolve stack symbols > - Compress the PML and XML files, and mail them here