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 1hBrlK-0006s2-Iz for pgsql-hackers@arkaria.postgresql.org; Thu, 04 Apr 2019 02:05:54 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hBrlJ-0005AH-5V for pgsql-hackers@arkaria.postgresql.org; Thu, 04 Apr 2019 02:05:53 +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 1hBrlI-00058V-KF for pgsql-hackers@lists.postgresql.org; Thu, 04 Apr 2019 02:05:52 +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 1hBrlF-0002OY-2b for pgsql-hackers@postgresql.org; Thu, 04 Apr 2019 02:05:51 +0000 Received: by mail-pg1-x544.google.com with SMTP id k19so416962pgh.0 for ; Wed, 03 Apr 2019 19:05:48 -0700 (PDT) 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=wZ1ybKCfOy0YZey6WakcTc2f4mLy/lL4nQO7iO9+lv0=; b=KwmFxhbwVQTz6yWYBYcb6MR1KajyzP58Lh1CmhuJ72JOknINflDZXULIYFIDAfQjAl F4+50RvKZZ9vEeXg/tBxOpqBWHgo/3XV1tRvh2MWEtSgP25KvIZNGIwza1hwf9jKdTOo AyufC8XvS1CQU4QBWtbCMyRKLrum9jxe5zRm4= 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=wZ1ybKCfOy0YZey6WakcTc2f4mLy/lL4nQO7iO9+lv0=; b=r2Mw+79yiXO+q1YoATTNhiZdqOSzfEvLmjCe08h18x6QvGul4bPJXZPBz2WqK+Eg23 nvc0hvSZo1QvrtcA7Z1hFgMGFWMyL+GJTrwkTj/H55l+foHPHxZmEMt8S/B0fwzkbfS9 nSKdKw4KPDQ1JoHd1RXM4L/Nc+LGqhnhjts5XYV/vuy7yDno0DDkN5TqkjJfUd1KficA +sGi72RjnCFbVfZzpcHltK6CYS2/HeG6PCTCf1nmFW5xSxdfgLdL403QYIMzuFYY2yYx 9uofugSzHbmYGcqfAJ4oV16HMNLHBZZebtGCLQ9n4ezTkliFf71VYGO3IpPPxojsz4gU gDAQ== X-Gm-Message-State: APjAAAWMbEJHxfGqSHMjmjIsV2Noq2Qj+8YmAUGme4jIdcxCBtf62Jvv 2XtuaXd45OwIXhzV0wp2TWowWQ== X-Google-Smtp-Source: APXvYqw8GbRxp6KHJJFT+PeT+JKcLEOEJezgkv9CjucoFIV4Ngxcs61ZO7ZU6CYmZfmMOML8Om4MLw== X-Received: by 2002:a65:5049:: with SMTP id k9mr3111086pgo.229.1554343546509; Wed, 03 Apr 2019 19:05:46 -0700 (PDT) Received: from rfd.leadboat.com (108-233-125-46.lightspeed.sntcca.sbcglobal.net. [108.233.125.46]) by smtp.gmail.com with ESMTPSA id f14sm21842482pfn.3.2019.04.03.19.05.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 03 Apr 2019 19:05:45 -0700 (PDT) Date: Wed, 3 Apr 2019 19:05:43 -0700 From: Noah Misch To: Daniel Gustafsson Cc: Kyotaro HORIGUCHI , "9erthalion6@gmail.com" <9erthalion6@gmail.com>, "sfrost@snowman.net" , "pgsql-hackers@postgresql.org" Subject: Re: [HACKERS] Weaker shmem interlock w/o postmaster.pid Message-ID: <20190404020543.GA1319573@rfd.leadboat.com> References: <20181130065140.GB2774301@rfd.leadboat.com> <20181203004106.GA2860387@rfd.leadboat.com> <20190304.180420.139624607.horiguchi.kyotaro@lab.ntt.co.jp> <20190307032422.GB1797215@rfd.leadboat.com> <20190309071610.GA2039121@rfd.leadboat.com> <20190331224233.GC891537@rfd.leadboat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Mon, Apr 01, 2019 at 08:19:56AM +0000, Daniel Gustafsson wrote: > On Monday, April 1, 2019 12:42 AM, Noah Misch wrote: > > On Fri, Mar 29, 2019 at 09:53:51AM +0000, Daniel Gustafsson wrote: > > > > This seems like a case where it would be useful to log a shmdt() error or do > > > an Assert() around the success of the operation perhaps? > > > > I'll add the same elog(LOG) we have at other shmdt() sites. I can't think of > > a site where we Assert() about the results of a system call. While shmdt() > > might be a justified exception, elog(LOG) seems reasonable. > > Agreed, seems reasonable. Pushed, but that broke two buildfarm members: https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=idiacanthus&dt=2019-04-04%2000%3A33%3A14 https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=komodoensis&dt=2019-04-04%2000%3A33%3A13 I think the problem arose because these animals run on the same machine, and their test execution was synchronized to the second. Two copies of the new test ran concurrently. It doesn't tolerate that, owing to expectations about which shared memory keys are in use. My initial thought is to fix this by having a third postmaster that runs throughout the test and represents ownership of a given port. If that postmaster gets something other than the first shm key pertaining to its port, switch ports and try again. I'll also include fixes for the warnings Andres reported on the pgsql-committers thread.