parallel pg_dump causes assertion failure in HEAD

Started by Tom Laneabout 12 years ago4 messageshackers
Jump to latest
#1Tom Lane
tgl@sss.pgh.pa.us

$ pg_dump -F d -j 4 -f foo regression
pg_dump: [archiver (db)] query failed: pg_dump: [parallel archiver] query was: SET TRANSACTION SNAPSHOT '00002130-1'
pg_dump: [archiver (db)] query failed: pg_dump: [archiver (db)] query failed: pg_dump: [archiver (db)] query failed: $

postmaster log shows:

TRAP: FailedAssertion("!(HistoricSnapshotActive())", File: "snapmgr.c", Line: 355)
TRAP: FailedAssertion("!(HistoricSnapshotActive())", File: "snapmgr.c", Line: 355)
TRAP: FailedAssertion("!(HistoricSnapshotActive())", File: "snapmgr.c", Line: 355)
TRAP: FailedAssertion("!(HistoricSnapshotActive())", File: "snapmgr.c", Line: 355)
LOG: server process (PID 15069) was terminated by signal 6: Aborted
DETAIL: Failed process was running: SET TRANSACTION SNAPSHOT '00002130-1'
LOG: terminating any other active server processes

That Assert appears to have been introduced by commit b89e1510.

regards, tom lane

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#2Andres Freund
andres@anarazel.de
In reply to: Tom Lane (#1)
Re: parallel pg_dump causes assertion failure in HEAD

On 2014-03-05 12:07:43 -0500, Tom Lane wrote:

$ pg_dump -F d -j 4 -f foo regression
pg_dump: [archiver (db)] query failed: pg_dump: [parallel archiver] query was: SET TRANSACTION SNAPSHOT '00002130-1'
pg_dump: [archiver (db)] query failed: pg_dump: [archiver (db)] query failed: pg_dump: [archiver (db)] query failed: $

postmaster log shows:

TRAP: FailedAssertion("!(HistoricSnapshotActive())", File: "snapmgr.c", Line: 355)
TRAP: FailedAssertion("!(HistoricSnapshotActive())", File: "snapmgr.c", Line: 355)
TRAP: FailedAssertion("!(HistoricSnapshotActive())", File: "snapmgr.c", Line: 355)
TRAP: FailedAssertion("!(HistoricSnapshotActive())", File: "snapmgr.c", Line: 355)
LOG: server process (PID 15069) was terminated by signal 6: Aborted
DETAIL: Failed process was running: SET TRANSACTION SNAPSHOT '00002130-1'
LOG: terminating any other active server processes

That Assert appears to have been introduced by commit b89e1510.

Will have a look in an hour or two.

Greetings,

Andres Freund

--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#3Andres Freund
andres@anarazel.de
In reply to: Tom Lane (#1)
Re: parallel pg_dump causes assertion failure in HEAD

On March 5, 2014 6:07:43 PM CET, Tom Lane <tgl@sss.pgh.pa.us> wrote:

$ pg_dump -F d -j 4 -f foo regression
pg_dump: [archiver (db)] query failed: pg_dump: [parallel archiver]
query was: SET TRANSACTION SNAPSHOT '00002130-1'
pg_dump: [archiver (db)] query failed: pg_dump: [archiver (db)] query
failed: pg_dump: [archiver (db)] query failed: $

postmaster log shows:

TRAP: FailedAssertion("!(HistoricSnapshotActive())", File: "snapmgr.c",
Line: 355)
TRAP: FailedAssertion("!(HistoricSnapshotActive())", File: "snapmgr.c",
Line: 355)
TRAP: FailedAssertion("!(HistoricSnapshotActive())", File: "snapmgr.c",
Line: 355)
TRAP: FailedAssertion("!(HistoricSnapshotActive())", File: "snapmgr.c",
Line: 355)
LOG: server process (PID 15069) was terminated by signal 6: Aborted
DETAIL: Failed process was running: SET TRANSACTION SNAPSHOT
'00002130-1'
LOG: terminating any other active server processes

That Assert appears to have been introduced by commit b89e1510.

It's a typo. It should make sure there is *no* historical snapshot. Will later test if it really works, but I'd be surprised if not.

Andres

--
Please excuse brevity and formatting - I am writing this on my mobile phone.

Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#4Andres Freund
andres@anarazel.de
In reply to: Andres Freund (#3)
Re: parallel pg_dump causes assertion failure in HEAD

On 2014-03-05 18:39:52 +0100, Andres Freund wrote:

On March 5, 2014 6:07:43 PM CET, Tom Lane <tgl@sss.pgh.pa.us> wrote:

$ pg_dump -F d -j 4 -f foo regression
pg_dump: [archiver (db)] query failed: pg_dump: [parallel archiver]
query was: SET TRANSACTION SNAPSHOT '00002130-1'
pg_dump: [archiver (db)] query failed: pg_dump: [archiver (db)] query
failed: pg_dump: [archiver (db)] query failed: $

postmaster log shows:

TRAP: FailedAssertion("!(HistoricSnapshotActive())", File: "snapmgr.c",
Line: 355)
TRAP: FailedAssertion("!(HistoricSnapshotActive())", File: "snapmgr.c",
Line: 355)
TRAP: FailedAssertion("!(HistoricSnapshotActive())", File: "snapmgr.c",
Line: 355)
TRAP: FailedAssertion("!(HistoricSnapshotActive())", File: "snapmgr.c",
Line: 355)
LOG: server process (PID 15069) was terminated by signal 6: Aborted
DETAIL: Failed process was running: SET TRANSACTION SNAPSHOT
'00002130-1'
LOG: terminating any other active server processes

That Assert appears to have been introduced by commit b89e1510.

It's a typo. It should make sure there is *no* historical
snapshot. Will later test if it really works, but I'd be surprised if
not.

So, after crashing my laptop by doing pg_dump -j16 on a cluster with 4GB
of shared_buffers (causing 16 parallel coredumps to be written) I can
confirm that indeed that the reason is just a typo in an assert.

Patch fixing that attached, it also includes a fix for a comment in a
related checks for historical snapshots.

Greetings,

Andres Freund

--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

Attachments:

0001-Fix-typo-in-Assert-statement-causing-SetTransactionS.patchtext/x-patch; charset=us-asciiDownload+6-5