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 1i7O34-0001CP-3r for pgsql-hackers@arkaria.postgresql.org; Mon, 09 Sep 2019 18:05:58 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1i7O31-00025N-Lf for pgsql-hackers@arkaria.postgresql.org; Mon, 09 Sep 2019 18:05:55 +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 1i7O31-00025F-DT for pgsql-hackers@lists.postgresql.org; Mon, 09 Sep 2019 18:05:55 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i7O2x-00029Y-Ef for pgsql-hackers@lists.postgresql.org; Mon, 09 Sep 2019 18:05:54 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id x89I5kn3025125 for ; Mon, 9 Sep 2019 14:05:47 -0400 From: Tom Lane To: pgsql-hackers@lists.postgresql.org Subject: Sloppy port assignment in src/test/ldap/ MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <25123.1568052346.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Mon, 09 Sep 2019 14:05:46 -0400 Message-ID: <25124.1568052346@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk I wondered about this transient failure: https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=3Dcrake&dt=3D2019-= 09-09%2008%3A48%3A25 The only information that was captured was # Running: /usr/sbin/slapd -f /home/bf/bfr/root/HEAD/pgsql.build/src/test/= ldap/tmp_check/slapd.conf -h ldap://localhost:57797 ldaps://localhost:5779= 8 Bail out! system /usr/sbin/slapd failed So, slapd failed without writing anything to stderr *or* its configured log file, which is pretty unhelpful. But, casting about for a possible explanation, I noticed the port setup code earlier in the script: my $ldap_port =3D get_free_port(); my $ldaps_port =3D $ldap_port + 1; Translated: we're finding one free port and just assuming that the next one will be free (or even exists :-(). Sure enough, I can reproduce the failure seen on crake if I force the $ldaps_port to be a port number that something has in use. Presumably that transient failure occurred because something was using 57798. So this code needs to be my $ldap_port =3D get_free_port(); my $ldaps_port =3D get_free_port(); I'll go fix that in a moment. regards, tom lane