Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bocss-0002hI-PL for pgsql-committers@arkaria.postgresql.org; Mon, 26 Sep 2016 20:52:18 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bocss-0002C0-5Z for pgsql-committers@arkaria.postgresql.org; Mon, 26 Sep 2016 20:52:18 +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 1bocsf-0001xi-1d for pgsql-committers@postgresql.org; Mon, 26 Sep 2016 20:52:05 +0000 Received: from boipeva.ensmp.fr ([194.214.158.136] helo=cc-tupan-roaming-b.ensmp.fr) by makus.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bocsV-0000ZE-Nu for pgsql-committers@postgresql.org; Mon, 26 Sep 2016 20:52:03 +0000 Received: from cri.ensmp.fr (36.56.69.86.rev.sfr.net [86.69.56.36]) (authenticated bits=0) by cc-tupan-roaming-b.ensmp.fr (8.15.2/8.15.1/JMMC-22/Oct/2013) with ESMTPSA id u8QKphK8025609 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 26 Sep 2016 22:51:44 +0200 Date: Mon, 26 Sep 2016 22:51:43 +0200 (CEST) From: Fabien COELHO X-X-Sender: fabien@lancre To: Tom Lane cc: Heikki Linnakangas , pgsql-committers@postgresql.org Subject: Re: pgsql: Refactor script execution state machine in pgbench. In-Reply-To: <3089.1474920612@sss.pgh.pa.us> Message-ID: References: <3089.1474920612@sss.pgh.pa.us> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed X-Miltered: at cc-tupan-roaming-b.ensmp.fr with ID 57E98A5F.000 by Joe's j-chkmail (http : // j-chkmail dot ensmp dot fr)! X-j-chkmail-Auth: USER-ID fabien.coelho X-j-chkmail-Enveloppe: 57E98A5F.000 from 36.56.69.86.rev.sfr.net/36.56.69.86.rev.sfr.net/86.69.56.36/cri.ensmp.fr/ X-Pg-Spam-Score: -4.9 (----) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-committers Precedence: bulk Sender: pgsql-committers-owner@postgresql.org Hello Tom, > There's at least one bug in this patch. Indeed. > It's caused pgbench to go into an infinite loop during the TAP tests on > my buildfarm machine longfin. > > buildfarm 719:14.18 /Users/buildfarm/bf-data/HEAD/inst/bin/pgbench --no-vacuum --client=5 --protocol=prepared --transactions=25 --file /Users/buildfarm/bf-data/HEAD/pgsql.build/src/bin/pgbench/tmp_check/data_main_JNh2/pgbench_script > > Some other buildfarm critters seem to have got through that successfully, > so it's probably a portability issue not a hard failure. Hmmm, not easy to identify, especially as I do not have a clang on MacOS... Could you catch the process to identify the infinite loop? What are the states of the five clients? I think that it may be stuck in doCustom or on threadRun. I'm not sure how it could be stuck in doCustom. Re-reading the code, I think that the "end_tx_processed" stuff could be removed in favor of a systematic return at the end of the transaction, but that does not explain anything wrt to an infinite loop: after 25 transactions it should have got to FINISHED and have exited. Maybe it can be stuck in threadRun in the "while (remains>0)" loop, which suggests that a remains-- has been forgotten... but I do not see how this is possible to forget a client by reading the code. So although I hastily declared that bugs would be easier to detect, without any additional clue it is hard to help. -- Fabien. -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers