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-26 09:38:09
Message-ID: 46079481.3020705@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Zoltan Boszormenyi írta:
> 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.
>

Oh, and the proof that I use the newly compiled version:

$ psql -h reddb-dev-pgr -p 5477 test
Welcome to psql 8.2.3, the PostgreSQL interactive terminal.

Type: \copyright for distribution terms
\h for help with SQL commands
\? for help with psql commands
\g or terminate with semicolon to execute query
\q to quit

test=# select version();
version
----------------------------------------------------------------------------
PostgreSQL 8.2.3 on sparc-sun-solaris2.10, compiled by GCC gcc (GCC) 4.1.2
(1 row)

test=# show integer_datetimes;
integer_datetimes
-------------------
off
(1 row)

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tatsuo Ishii 2007-03-26 09:42:22 Re: Server-side support of all encodings
Previous Message Zoltan Boszormenyi 2007-03-26 09:31:17 Re: Crash bug in 8.2.3 on Solaris 10/Sparc