Re: PG 8.3beta3 Segmentation Fault during Database Restore

Lists: pgsql-hackers
From: Rudolf van der Leeden <vanderleeden(at)logicunited(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Cc: Rudolf van der Leeden <vanderleeden(at)logicunited(dot)com>
Subject: PG 8.3beta3 Segmentation Fault during Database Restore
Date: 2007-11-27 15:26:52
Message-ID: A4915E98-FDFF-444D-9F26-78092A33A9E3@logicunited.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Hi folks,

I've been trying to test a backup/restore of our production database
(26GB on disk) using PG 8.2.4 as backup and PG 8.3beta3 for the restore.

FIRST TRY:
pg_dump (v8.3beta3) --format=c the PG 8.2.4 database .... OK
pg_restore into a brandnew PG 8.3beta3 database ....
Segmentation fault after ~10min
From the serverlog:
2007-11-27 11:03:27 CET [7133] LOG: server process (PID 7337)
was terminated by signal 11: Segmentation fault
2007-11-27 11:03:27 CET [7235] CONTEXT: COPY login_session,
line 9210986

SECOND TRY:
Increased the loglevel to DEBUG1
pg_dump (v8.2.4) --format=p the PG 8.2.4 database into an
ASCII file (31 GB) .... OK
psql-restore into a brandnew PG 8.3beta3 database ....
Segmentation fault after ~2hours
From the serverlog:
2007-11-27 15:56:38 CET [15833] STATEMENT: CREATE INDEX
login_session_promotion_id ON login_session USING btree (promotion_id);
2007-11-27 15:56:38 CET [15833] ERROR: concurrent insert in progress
2007-11-27 15:56:38 CET [15833] STATEMENT: CREATE INDEX
login_session_web_site_id ON login_session USING btree (web_site_id);
2007-11-27 15:56:50 CET [21670] DEBUG: autovacuum: processing
database "gaia"
2007-11-27 15:57:58 CET [15726] LOG: server process (PID 15833) was
terminated by signal 11: Segmentation fault
2007-11-27 15:57:58 CET [15726] LOG: terminating any other active
server processes

What could be the cause of this problem? Is it a bug or my fault?
The postgres.crash.log is enclosed.

Thanks,
Rudolf VanderLeeden
Logicunited GmbH
Germany
vanderleeden(at)logicunited(dot)com

Attachment Content-Type Size
postgres.crash.log application/octet-stream 18.6 KB

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Rudolf van der Leeden <vanderleeden(at)logicunited(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: PG 8.3beta3 Segmentation Fault during Database Restore
Date: 2007-11-27 15:52:40
Message-ID: 474C3D48.4070909@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Rudolf van der Leeden wrote:
> Hi folks,
>
> I've been trying to test a backup/restore of our production database
> (26GB on disk) using PG 8.2.4 as backup and PG 8.3beta3 for the restore.
>
> FIRST TRY:
> pg_dump (v8.3beta3) --format=c the PG 8.2.4 database .... OK
> pg_restore into a brandnew PG 8.3beta3 database ....
> Segmentation fault after ~10min
> From the serverlog:
> 2007-11-27 11:03:27 CET [7133] LOG: server process (PID 7337) was
> terminated by signal 11: Segmentation fault
> 2007-11-27 11:03:27 CET [7235] CONTEXT: COPY login_session, line
> 9210986
>
> SECOND TRY:
> Increased the loglevel to DEBUG1
> pg_dump (v8.2.4) --format=p the PG 8.2.4 database into an
> ASCII file (31 GB) .... OK
> psql-restore into a brandnew PG 8.3beta3 database ....
> Segmentation fault after ~2hours
> From the serverlog:
> 2007-11-27 15:56:38 CET [15833] STATEMENT: CREATE INDEX
> login_session_promotion_id ON login_session USING btree (promotion_id);
> 2007-11-27 15:56:38 CET [15833] ERROR: concurrent insert in progress
> 2007-11-27 15:56:38 CET [15833] STATEMENT: CREATE INDEX
> login_session_web_site_id ON login_session USING btree (web_site_id);
> 2007-11-27 15:56:50 CET [21670] DEBUG: autovacuum: processing
> database "gaia"
> 2007-11-27 15:57:58 CET [15726] LOG: server process (PID 15833) was
> terminated by signal 11: Segmentation fault
> 2007-11-27 15:57:58 CET [15726] LOG: terminating any other active
> server processes
>
> What could be the cause of this problem? Is it a bug or my fault?
> The postgres.crash.log is enclosed.
>
>

The general rule is: use pg_dump from the target version. So your first
attempt was more correct.

Just curious: what happens if you turn autovacuum off before starting
the restore?

cheers

andrew


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Rudolf van der Leeden <vanderleeden(at)logicunited(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: PG 8.3beta3 Segmentation Fault during Database Restore
Date: 2007-11-27 15:59:59
Message-ID: 21535.1196179199@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Rudolf van der Leeden <vanderleeden(at)logicunited(dot)com> writes:
> What could be the cause of this problem? Is it a bug or my fault?

It looks like a corrupted-data kind of problem. Can you extract
a reproducible test case?

regards, tom lane


From: Rudolf van der Leeden <vanderleeden(at)logicunited(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Rudolf van der Leeden <vanderleeden(at)logicunited(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: PG 8.3beta3 Segmentation Fault during Database Restore
Date: 2007-11-28 15:59:52
Message-ID: 77918E9F-4B1A-4E2C-9052-BC812458E125@logicunited.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

> It looks like a corrupted-data kind of problem. Can you extract
> a reproducible test case?

The problem was the hardware!!
On a second system (Mac Power G5) there was no failure, i.e. the
error is not reproducible.
Thanks for your help.

Rudolf VanderLeeden