Re: Crash bug in 8.2.3 on Solaris 10/Sparc

From: Zoltan Boszormenyi <zb(at)cybertec(dot)at>
To: Zdenek Kotala <Zdenek(dot)Kotala(at)Sun(dot)COM>
Cc: PG Hackers <pgsql-hackers(at)postgresql(dot)org>, Hans-Juergen Schoenig <hs(at)cybertec(dot)at>, Ewald Geschwinde <eg(at)cybertec(dot)at>
Subject: Re: Crash bug in 8.2.3 on Solaris 10/Sparc
Date: 2007-03-23 16:39:17
Message-ID: 460402B5.8040605@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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.

>
> Did you try compile with different optimalization flags or did you try
> sun studio compiler?

No, and no. Sun Studio isn't installed, only gcc.

>
> Zdenek
>

--
----------------------------------
Zoltán Böszörményi
Cybertec Geschwinde & Schönig GmbH
http://www.postgresql.at/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2007-03-23 16:41:10 Re: Documentation access problems.
Previous Message Joshua D. Drake 2007-03-23 16:22:34 Re: Documentation access problems.