Thread: Seg fault in pg_dump?

Seg fault in pg_dump?

From
"Michael Nolan"
Date:
I get a segmentation fault in pg_dump (8.2.3 on a Linux Fedora Core 5 system) when dumping some (but not all) of the sequences in the public schema:.

Here's the output from /usr/local/pgsql/bin/pg_dump -v -t uscf_dues_dues_key_seq -U postgres uscf >uscf_dues_dues_key_seq.seq

pg_dump: reading schemas
pg_dump: reading user-defined functions
pg_dump: reading user-defined types
pg_dump: reading procedural languages
pg_dump: reading user-defined aggregate functions
pg_dump: reading user-defined operators
pg_dump: reading user-defined operator classes
pg_dump: reading user-defined conversions
pg_dump: reading user-defined tables
pg_dump: reading table inheritance information
pg_dump: reading rewrite rules
pg_dump: reading type casts
pg_dump: finding inheritance relationships
pg_dump: reading column info for interesting tables
pg_dump: flagging inherited columns in subtables
pg_dump: reading indexes
pg_dump: reading constraints
pg_dump: reading triggers
pg_dump: reading dependency data
pg_dump: saving encoding = SQL_ASCII
pg_dump: saving standard_conforming_strings = off
./seq.job: line 1: 31367 Segmentation fault      /usr/local/pgsql/bin/pg_dump -v
 -t uscf_dues_dues_key_seq -U postgres uscf >uscf_dues_dues_key_seq.seq

Any ideas what to try?
--
Mike Nolan

Re: Seg fault in pg_dump?

From
Alvaro Herrera
Date:
Michael Nolan escribió:

> /usr/local/pgsql/bin/pg_dump -v
> -t uscf_dues_dues_key_seq -U postgres uscf >uscf_dues_dues_key_seq.seq
>
> Any ideas what to try?

Here's one: get a backtrace from GDB.  Here, I get this error:

$ LC_ALL=C pg_dump -v -t uscf_dues_dues_key_seq -U alvherre uscf
pg_dump: No matching tables were found
pg_dump: *** aborted because of error

--
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

Re: Seg fault in pg_dump?

From
"Michael Nolan"
Date:
GDB produces:

Program received signal SIGSEGV, Segmentation fault.
0x0804fd6f in dumpSequence ()

The sequence definitely exists and works:

select * from uscf_dues_dues_key_seq
;
     sequence_name      | last_value | increment_by |      max_value      | min_
value | cache_value | log_cnt | is_cycled | is_called
------------------------+------------+--------------+---------------------+-----
------+-------------+---------+-----------+-----------
 uscf_dues_dues_key_seq |         58 |            1 | 9223372036854775807 |
    1 |           1 |       0 | f         | t
(1 row)
--
Mike Nolan

Re: Seg fault in pg_dump?

From
Alvaro Herrera
Date:
Michael Nolan escribió:
> GDB produces:
>
> Program received signal SIGSEGV, Segmentation fault.
> 0x0804fd6f in dumpSequence ()

Not very helpful -- what does it say if you ask for "bt"?  I'm thinking
this is not a debug-enabled build though.  I think you have to install a
separate RPM package in Fedora to get the debug symbols.

--
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

Re: Seg fault in pg_dump?

From
"Michael Nolan"
Date:
No, it isn't a debug-enabled build, and I don't think the debug symbols package is installed on that system.  I've never used GDB, I'm more of an 'applications' programmer, I may need a 'crash' course on it, if you pardon the pun.  However, if it's anything like the debugging tools I used to use when programming in assembler, aeons ago, just relinking the program with debug symbols in it could fix the problem.  :sigh:

This is on my new production system, I'm getting ready to migrate a backup system over to 8.2.3, I may be able to do some additional testing there, assuming I get the same failure.  

It doesn't appear that dumpall has the same problem, or at least it didn't abort when I dumped the entire cluster last night.  It doesn't fail when I dump that entire database either, just when I dump some of the sequences.

What else can I do to help track this down?
--
Mike Nolan

On 4/5/07, Alvaro Herrera < alvherre@commandprompt.com> wrote:
Michael Nolan escribió:
> GDB produces:
>
> Program received signal SIGSEGV, Segmentation fault.
> 0x0804fd6f in dumpSequence ()

Not very helpful -- what does it say if you ask for "bt"?  I'm thinking
this is not a debug-enabled build though.  I think you have to install a
separate RPM package in Fedora to get the debug symbols.

--
Alvaro Herrera                                 http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support