From: Tom Lane <tgl@sss.pgh.pa.us>
To: Simon Riggs <simon@2ndQuadrant.com>
Cc: pgsql-bugs@postgresql.org
Cc: H.Merijn Brand <h.m.brand@xs4all.nl>
Subject: Re: [Fwd: DBD::Pg on HP-UX 11.31 64bit]
Date: Tue, 14 Dec 2010 15:16:36 -0500
Message-ID: <18189.1292357796@sss.pgh.pa.us> (raw)
In-Reply-To: <1292355427.2737.4589.camel@ebony>
References: <1292355427.2737.4589.camel@ebony>
Simon Riggs <simon@2ndQuadrant.com> writes:
> FW
> From: H.Merijn Brand <h.m.brand@xs4all.nl>
> I have postgres running on most my HP-UX varieties, ranging from HP-UX
> 10.20/32bit through 11.31/64bit. It works fine everywhere, except on
> HP-UX 11.31-ipf in 64bit mode. Note that this is Itanium architecture.
> postgres' own test suite passes, but all connects fail with DBD::Pg.
That's pretty odd. What seems to be failing here:
> This is perl, v5.10.1 (*) built for IA64.ARCHREV_0-LP64
> getsockopt (3, SOL_SOCKET, SO_ERROR, 0x9fffffffffffdb84, 0x9fffffffffffdb98) ERR#22 EINVAL
is this bit of code in libpq:
int optval;
ACCEPT_TYPE_ARG3 optlen = sizeof(optval);
...
if (getsockopt(conn->sock, SOL_SOCKET, SO_ERROR,
(char *) &optval, &optlen) == -1)
{
appendPQExpBuffer(&conn->errorMessage,
libpq_gettext("could not get socket error status: %s\n"),
SOCK_STRERROR(SOCK_ERRNO, sebuf, sizeof(sebuf)));
goto error_return;
}
It's not clear at all how that would fail in the Perl environment if it
works standalone. I could believe getting EINVAL if we had determined
the wrong datatype for ACCEPT_TYPE_ARG3, but that ought to fail
standalone too, I should think. Anyway it would be worth checking what
configure identified as ACCEPT_TYPE_ARG3 and comparing that to the docs
for getsockopt.
Meanwhile, this one:
> This is perl 5, version 12, subversion 2 (v5.12.2) built for IA64.ARCHREV_0-LP64-ld
> Received signal 4, SIGILL, in user mode, [SIG_DFL], partial siginfo
> Siginfo: si_code: ILL_ILLOPC, faulting address: 0x60000000000ab620, si_errno: 0
> PC: 00000001000000a0.0
seems like it's just a flat-out library incompatibility --- it looks to
me like it's probably failing immediately upon passing control to libpq.
I'm wondering about issues like word width and endianness. IA64 can do
either endianness IIRC, so maybe your toolchain is confused about which
it should use?
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, simon@2ndQuadrant.com, h.m.brand@xs4all.nl
Subject: Re: [Fwd: DBD::Pg on HP-UX 11.31 64bit]
In-Reply-To: <18189.1292357796@sss.pgh.pa.us>
References: <1292355427.2737.4589.camel@ebony> <18189.1292357796@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox