Обсуждение: psql Segmentation fault

Поиск
Список
Период
Сортировка

psql Segmentation fault

От
Robert Landrum
Дата:
Since we converted to PG8, we've been experiencing segfaults when the
psql client exits.  It doesn't have any real effect on things...  or it
hasn't until now.

RHEL4 i686 - PostgresQL 8.2.4 (non-redhat)



-bash-3.00$ psql -n
Welcome to psql 8.2.4, 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

postgres=# \q
Segmentation fault


That's what happens every time.  No core file is produced.  I've done
some searches and discovered that this might be related to readline.
But that doesn't seem right since it crashes when I run psql -n (no
readline support).  I've tried removing .psql_history files and even
changing perms to prevent writes.  Nothing seems to work.

Now it's affecting pg_dumpall -g, which we use to backup all user
accounts and roles.  It seems to seqfault before it finishes writing
STDOUT, which means some users/roles aren't being dumped.

Anyone else run into this problem?  What is the solution?

Thanks,

Rob

Re: psql Segmentation fault

От
Tom Lane
Дата:
Robert Landrum <rlandrum@aol.net> writes:
> Since we converted to PG8, we've been experiencing segfaults when the
> psql client exits.

Hmm.  We have heard that reported on OS X because of a bug in Apple's
version of libedit, but not on any flavor of Linux.  Your tests seem
to eliminate libreadline as the cause anyway.  Might be a corrupt
copy of libpq --- have you tried reinstalling that?

> That's what happens every time.  No core file is produced.

That's normal on Linuxen, because "ulimit -c 0" is usually the default
setting.  Please try "ulimit -c unlimited", and then if you get a core,
send a backtrace.  The last few lines of an "strace" watching the psql
run might be useful as well.

            regards, tom lane

Re: psql Segmentation fault

От
Robert Landrum
Дата:
Tom Lane wrote:
> Robert Landrum <rlandrum@aol.net> writes:
>> Since we converted to PG8, we've been experiencing segfaults when the
>> psql client exits.
>
> Hmm.  We have heard that reported on OS X because of a bug in Apple's
> version of libedit, but not on any flavor of Linux.  Your tests seem
> to eliminate libreadline as the cause anyway.  Might be a corrupt
> copy of libpq --- have you tried reinstalling that?

Actually, our build host contained some old readline libs, which ended
up being statically linked into one of the libs.

The fix was to remove all the dependencies from our build host,
reinstall those dependencies, and then build postgres anew.

Thanks for your suggestions...

Rob