Zoltan Boszormenyi írta:
Zdenek Kotala írta:
Zoltan Boszormenyi wrote:
Hi,
we have found that psql in PostgreSQL 8.2.3
has problems connecting to the server
running on Solaris 10/Sun SPARC.
$ uname -a
SunOS dev-machine 5.10 Generic_118833-36 sun4u sparc SUNW,Sun-Fire-V440
It seems that somehow the system provided
GCC 3.4.3 miscompiles timestamptz_send()
and it segfaults. The default function looks like this:
Can you send me how you compiled Postgres (configure switches,
LDFLAGS ...) and is possible get core file?
This was the configure line:
./configure --prefix=/export/local/postgresql/postgresql-8.2.3
--with-includes=/usr/local/include --with-libraries=/usr/local/lib/
I added --enable-debug --enable-depend --enable-cassert
to get sensible gdb report after that.
The problem was that the server had problems
after psql connected with these commands:
$ psql -l -h dev-machine -p 5477 -U user
psql: server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
$ psql -h dev-machine -p 5477 -U user template1
psql: server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
If the user doesn't have permissions in e.g. pg_hba.conf
then I get the correct permission denied error.
If the user can connect then some statement inside psql
causes segfault in the server.
Compiled with debug info, I got this from gdb on the core file:
$ gdb /.../pgsql/bin/postgres /.../data/core
...
Program terminated with signal 11, Segmentation fault.
#0 0x0021c8a0 in timestamptz_send (fcinfo=0x1) at timestamp.c:461
461 PG_RETURN_BYTEA_P(pq_endtypsend(&buf));
(gdb)
I described my experiments, compiling with --enable-integer-datetimes
fixed the issue.
We compiled GCC-4.1.2 on this machine, recompiled PostgreSQL
with the new GCC without --enable-integer-datetimes and it fixed
the problem we experienced. It seems that my suspicion was right:
GCC-3.4.3 on Solaris 10/Sparc is buggy.
--
----------------------------------
Zoltán Böszörményi
Cybertec Geschwinde & Schönig GmbH
http://www.postgresql.at/
---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster