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 1ic9qG-0000kJ-Ak for pgsql-hackers@arkaria.postgresql.org; Tue, 03 Dec 2019 15:11:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ic9qE-0008AJ-UP for pgsql-hackers@arkaria.postgresql.org; Tue, 03 Dec 2019 15:11:54 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ic9qE-00082M-DM for pgsql-hackers@lists.postgresql.org; Tue, 03 Dec 2019 15:11:54 +0000 Received: from mail-pj1-x1042.google.com ([2607:f8b0:4864:20::1042]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1ic9qB-0006YL-JL for pgsql-hackers@lists.postgresql.org; Tue, 03 Dec 2019 15:11:52 +0000 Received: by mail-pj1-x1042.google.com with SMTP id s35so1638057pjb.7 for ; Tue, 03 Dec 2019 07:11:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=KTYJwPK2OgDfEOYqGF4UH1+dUUL23FMtfpuQey31uc4=; b=VQyhIFB7dm8lKMvtFFWm01iP7D50dGMeR89hJkIw9/6QQqzjm7VNOg5s0bQ1FHMpcP z9iujIbO9mg8+u1pIrmgs9phg9xQWJhQrBVoy9UVKL5o9yquJPRJbo4hZIsbs4yrS8Gv KVGyDTcYbZwYjQ3wgmcVFlmfsow2wFZE7DwnoabHa4dvUhBO27LuDKjSK3T6xVcclbX+ nk/GyQ6M0cTUZWbbsb+NvebcRQ0WExSr3o6erjrZArlPZIH5Am5/d5JrxQfv3kRFgGBd lIttzjEN9vcPUDLM4Ds2BC1UzIBTMyhoO2c5mzWBSnovAxgdGqxuqYGd7v34r1sJMOaP /Zdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=KTYJwPK2OgDfEOYqGF4UH1+dUUL23FMtfpuQey31uc4=; b=kYJ7YI5RpUY//rT5SgsICRm0XdKhRaXICGMWTwvfdSrkJ8ETVcfocth0u3Bm2zkpLn m2TOBFF8fCK8sVbPJr/jSk5ZGhtI7kdyeQ4isVScb1ebF/wQuRdbqAXDNkJ6RblEvbZj zuqaJsmtP62C6NWOeig7bQt3XZmryTAchy7vBBWUQyCKwvztL4193YcyXAA+iOJDAmjY brnECpixTTF/KrSllQJHv5rFesXe1gghya5OPabd7UO7XUcfWK4rlWKxcaDFuiqktWqo 06ys9FwCJhtnnRzWXcekjPyocVYKYmDpXZJQH3osco/HfVTcJiXl4kD/9qL4xEBmYnXI kndw== X-Gm-Message-State: APjAAAUDW3dFmJ7lnuQz1sHnWC/kDnxVLV7XdynU5JxwXK61WNk5OyUh M4KrhdccTcEVBfSzadhg+ENcgUD8 X-Google-Smtp-Source: APXvYqyzscn87oo/92zZzNJlKr3wWDm8KXWibz5MjPM32iQl/p5l+uMZfIFskmBtsBmvANlWJIRqkw== X-Received: by 2002:a17:902:aa96:: with SMTP id d22mr5422384plr.218.1575385909906; Tue, 03 Dec 2019 07:11:49 -0800 (PST) Received: from [192.168.0.17] (24-113-193-150.wavecable.com. [24.113.193.150]) by smtp.gmail.com with ESMTPSA id v8sm3012188pfn.76.2019.12.03.07.11.48 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 03 Dec 2019 07:11:49 -0800 (PST) Subject: Re: Windows buildfarm members vs. new async-notify isolation test To: Andrew Dunstan , Tom Lane , pgsql-hackers@lists.postgresql.org References: <32745.1575303812@sss.pgh.pa.us> <7221b3b4-fc7f-404d-5cf6-830d3aa6800d@2ndQuadrant.com> From: Mark Dilger Message-ID: <362bca0b-1c1c-c760-ab19-b5d9a14c69ea@gmail.com> Date: Tue, 3 Dec 2019 07:11:47 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 MIME-Version: 1.0 In-Reply-To: <7221b3b4-fc7f-404d-5cf6-830d3aa6800d@2ndQuadrant.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 12/2/19 11:42 AM, Andrew Dunstan wrote: > > On 12/2/19 11:23 AM, Tom Lane wrote: >> I see from the buildfarm status page that since commits 6b802cfc7 >> et al went in a week ago, frogmouth and currawong have failed that >> new test case every time, with the symptom >> >> ================== pgsql.build/src/test/isolation/regression.diffs =================== >> *** c:/prog/bf/root/REL_10_STABLE/pgsql.build/src/test/isolation/expected/async-notify.out Mon Nov 25 00:30:49 2019 >> --- c:/prog/bf/root/REL_10_STABLE/pgsql.build/src/test/isolation/results/async-notify.out Mon Dec 2 00:54:26 2019 >> *************** >> *** 93,99 **** >> step llisten: LISTEN c1; LISTEN c2; >> step lcommit: COMMIT; >> step l2commit: COMMIT; >> - listener2: NOTIFY "c1" with payload "" from notifier >> step l2stop: UNLISTEN *; >> >> starting permutation: llisten lbegin usage bignotify usage >> --- 93,98 ---- >> >> (Note that these two critters don't run branches v11 and up, which >> is why they're only showing this failure in 10 and 9.6.) >> >> drongo showed the same failure once in v10, and fairywren showed >> it once in v12. Every other buildfarm animal seems happy. >> >> I'm a little baffled as to what this might be --- some sort of >> timing problem in our Windows signal emulation, perhaps? But >> if so, why haven't we found it years ago? >> >> I don't have any ability to test this myself, so would appreciate >> help or ideas. > > > > I can test things, but I don't really know what to test. FYI frogmouth > and currawong run on virtualized XP. drongo anf fairywrne run on > virtualized WS2019. Neither VM is heavily resourced. Hi Andrew, if you have time you could perhaps check the isolation test structure itself. Like Tom, I don't have a Windows box to test this. I would be curious to see if there is a race condition in src/test/isolation/isolationtester.c between the loop starting on line 820: while ((res = PQgetResult(conn))) { ... } and the attempt to consume input that might include NOTIFY messages on line 861: PQconsumeInput(conn); If the first loop consumes the commit message, gets no further PGresult from PQgetResult, and finishes, and execution proceeds to PQconsumeInput before the NOTIFY has arrived over the socket, there won't be anything for PQnotifies to return, and hence for try_complete_step to print before returning. I'm not sure if it is possible for the commit message to arrive before the notify message in the fashion I am describing, but that's something you might easily check by having isolationtester sleep before PQconsumeInput on line 861. -- Mark Dilger