Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 05602B5DBB6 for ; Sun, 29 May 2011 00:38:55 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 37456-06 for ; Sun, 29 May 2011 03:38:47 +0000 (UTC) X-Greylist: delayed 00:26:47.343733 by SQLgrey-1.7.6 Received: from mail.endcrypt.com (mail.endcrypt.com [74.205.105.202]) by mail.postgresql.org (Postfix) with ESMTP id 14644B5D832 for ; Sun, 29 May 2011 00:38:46 -0300 (ADT) Received: from core.home (pool-96-227-80-201.phlapa.fios.verizon.net [96.227.80.201]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.endcrypt.com (Postfix) with ESMTP id 3E7E030C7E; Sun, 29 May 2011 03:11:58 +0000 (UTC) Date: Sat, 28 May 2011 23:11:56 -0400 From: Greg Sabino Mullane To: pgsql-bugs@postgresql.org Subject: Failed pgbench: setrandom invalid maximum number 0 Message-ID: <20110529031155.GA13070@core.home> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-ripemd160; protocol="application/pgp-signature"; boundary="G4iJoqBmSsgzjUCe" Content-Disposition: inline X-PGP-Key: http://www.gtsm.com/Greg_Sabino_Mullane.key.html User-Agent: Mutt/1.5.20 (2009-06-14) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-5 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201105/211 X-Sequence-Number: 30350 --G4iJoqBmSsgzjUCe Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Seeing the following on an old box I use for testing various=20 things. Thought it was something to do with my box at first,=20 but the problem seems to only occur in >=3D 8.4. But it's also=20 not pgbench alone, as it was working fine one day, and not the=20 next. Here's what I now get on 8.4, 9.0, and 9.1: $ pgbench btest1 -n setrandom: invalid maximum number 0 Client 0 aborted in state 3. Execution meta-command failed. transaction type: TPC-B (sort of) scaling factor: 0 query mode: simple number of clients: 1 number of threads: 1 number of transactions per client: 10 number of transactions actually processed: 0/10 tps =3D 0.000000 (including connections establishing) tps =3D 0.000000 (excluding connections establishing) What I get on 8.3 and older is this: $ pgbench btest1 -n transaction type: TPC-B (sort of) scaling factor: 1 number of clients: 1 number of transactions per client: 10 number of transactions actually processed: 10/10 tps =3D 332.005312 (including connections establishing) tps =3D 372.703216 (excluding connections establishing) Here's a snippet of strace for the failing run: <> munmap(0xb773b000, 4096) =3D 0 socket(PF_FILE, SOCK_STREAM, 0) =3D 3 fcntl64(3, F_SETFL, O_RDONLY|O_NONBLOCK) =3D 0 fcntl64(3, F_SETFD, FD_CLOEXEC) =3D 0 connect(3, {sa_family=3DAF_FILE, path=3D"/tmp/.s.PGSQL.5900"}, 110) =3D 0 getsockopt(3, SOL_SOCKET, SO_ERROR, [0], [4]) =3D 0 getsockname(3, {sa_family=3DAF_FILE, NULL}, [2]) =3D 0 time(NULL) =3D 1306638084 time(NULL) =3D 1306638084 poll([{fd=3D3, events=3DPOLLOUT|POLLERR}], 1, 10000) =3D 1 ([{fd=3D3, reven= ts=3DPOLLOUT}]) send(3, "\0\0\0#\0\3\0\0user\0greg\0database\0btest"..., 35, MSG_NOSIGNAL) = =3D 35 time(NULL) =3D 1306638084 poll([{fd=3D3, events=3DPOLLIN|POLLERR}], 1, 10000) =3D 1 ([{fd=3D3, revent= s=3DPOLLIN}]) recv(3, "R\0\0\0\10\0\0\0\0S\0\0\0\26application_name\0\0"..., 16384, 0) = =3D 332 gettimeofday({1306638084, 217401}, NULL) =3D 0 write(2, "setrandom: invalid maximum numbe"..., 36setrandom: invalid maximu= m number 0 ) =3D 36 write(2, "Client 0 aborted in state 3. Exe"..., 60Client 0 aborted in state= 3. Execution meta-command failed. ) =3D 60 <> --=20 Greg Sabino Mullane greg@endpoint.com End Point Corporation PGP Key: 0x14964AC8 --G4iJoqBmSsgzjUCe Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- iEYEAREDAAYFAk3huXsACgkQvJuQZxSWSsimIACfUzSvVCbfZ5KvtXNbVIRz9Toa xq8AoIW9Wic9DTcMjxZod5qc0CbP8Ldj =FeH5 -----END PGP SIGNATURE----- --G4iJoqBmSsgzjUCe--