Failed pgbench: setrandom invalid maximum number 0 - Mailing list pgsql-bugs

From Greg Sabino Mullane
Subject Failed pgbench: setrandom invalid maximum number 0
Date
Msg-id 20110529031155.GA13070@core.home
Whole thread Raw
Responses Re: Failed pgbench: setrandom invalid maximum number 0
List pgsql-bugs
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:

<<closing .pgpass>>
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
<<writing all the other lines seen above>>

--=20
Greg Sabino Mullane greg@endpoint.com
End Point Corporation
PGP Key: 0x14964AC8

pgsql-bugs by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: BUG #6043: Compilation PLpgsql Succesful but execution bad
Next
From: Tom Lane
Date:
Subject: Re: Failed pgbench: setrandom invalid maximum number 0