Segmentation fault with pg_restore

From: Keiko Oda <keiko(at)heroku(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: Segmentation fault with pg_restore
Date: 2016-09-20 22:30:31
Message-ID: CADgu3M8Vw4XPf2uM4dHuMyJ6721APBgSaDiUopdFKsRRVEByCg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hello,

I'm seeing "Segmentation fault" with a following pg_restore command, with
the certain dump file (attached to this email, I had to remove some data
from the file as the dump file contains the data that cannot be shared
publicly, but I can reproduce this with full dump file also):

$ pg_restore -l nocnoc_segfault.dump
Segmentation fault: 11

Here is my environment, but I was able to reproduce this in the other place
as well (e.g. Ubuntu 14.04):

Process: pg_restore [64478]
Path: /usr/local/Cellar/postgresql/9.5.2/bin/pg_restore
Identifier: pg_restore
Version: 0
Code Type: X86-64 (Native)
Parent Process: bash [55643]
Responsible: Terminal [1371]
OS Version: Mac OS X 10.11.6 (15G1004)

Here is the environment that the dump file was created:

Docker image "latest" from https://hub.docker.com/_/postgres/ (version
9.5)
The creator has the dump file in a container with no volumes, so he
extracted the dump using a following command:
docker exec -t nocnoc_db_1 cat /backup/nocnoc_api_development.dump >
nocnoc_api_development.dump
The backup was taking with a following command:
pg_dump -Fc --no-acl --no-owner nocnoc_api_development

The dump file's format is dos when you open with vim, and if you change
this to unix (:set ff=unix) and save it, the segmentation fault will go
away and it gives you an expected error (it raises an error since I removed
some data from the dump file, the file is not in the perfect shape. If I
tried to restore the full dump file with the unix file format, it works
fine):

$ pg_restore -l nocnoc_unix.dump
pg_restore: [custom archiver] could not read from input file: end of file

Please let me know if there is any other information that I could provide.

Thanks!
Keiko Oda

Attachment Content-Type Size
nocnoc_segfault.dump application/octet-stream 2.0 KB

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message John R Pierce 2016-09-20 22:41:04 Re: Segmentation fault with pg_restore
Previous Message kzuk 2016-09-20 10:10:51 BUG #14329: libpq doesn't send complete client certificate chain on first SSL connection