TRAP: BadArgument - mcxt.c, Line: 813

From: "Erik Rijkers" <er(at)xs4all(dot)nl>
To: pgsql-hackers(at)postgresql(dot)org
Subject: TRAP: BadArgument - mcxt.c, Line: 813
Date: 2015-03-29 15:40:16
Message-ID: 746647b57d771a2bf8764243f5eb0ff0.squirrel@webmail.xs4all.nl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

With the latest server

testdb=# select version();
version
----------------------------------------------------------------------------------------------------------------------
PostgreSQL 9.5devel_HEAD_20150329_0154_2c33e0fbceb0 on x86_64-unknown-linux-gnu, compiled by gcc (GCC) 4.9.2, 64-bit
(1 row)

I get a crash while restoring a trgm GIN index.

The attached bash creates 2 test tables (t5, t6).

A dumpfile, created thus:
pg_dump -F c -v -h /tmp -p 6545 -t t6 -f ~/pg_stuff/dumps/testdb_t6.dump testdb

cannot be restored in an empty database: it crashed the server (see below).

A restore of the smaller table t5 does not crash the system; the indexing is then OK.

Restore:
pg_restore -v -O -x -d testdb ~/pg_stuff/dumps/testdb_t6.dump

I get this crash from restoring :

2015-03-29 17:32:55.846 CEST 8016 LOG: database system is ready to accept connections
TRAP: BadArgument("!(((CurrentMemoryContext) != ((void *)0) && (((((const Node*)((CurrentMemoryContext)))->type) ==
T_AllocSetContext))))", File: "mcxt.c", Line: 813)
2015-03-29 17:35:02.459 CEST 8016 LOG: server process (PID 8062) was terminated by signal 6: Aborted
2015-03-29 17:35:02.459 CEST 8016 DETAIL: Failed process was running: CREATE INDEX t6_trgm_re_idx ON t6 USING gin (txt
gin_trgm_ops);

2015-03-29 17:35:02.459 CEST 8016 LOG: terminating any other active server processes
2015-03-29 17:35:02.502 CEST 8016 LOG: all server processes terminated; reinitializing
2015-03-29 17:35:02.710 CEST 8114 LOG: database system was interrupted; last known up at 2015-03-29 17:32:55 CEST
2015-03-29 17:35:02.735 CEST 8114 LOG: database system was not properly shut down; automatic recovery in progress
2015-03-29 17:35:02.828 CEST 8114 LOG: redo starts at 0/270E550
2015-03-29 17:35:05.665 CEST 8114 LOG: invalid magic number 0000 in log segment 000000010000000000000010, offset 7716864
2015-03-29 17:35:05.665 CEST 8114 LOG: redo done at 0/1075AD90
2015-03-29 17:35:05.665 CEST 8114 LOG: last completed transaction was at log time 2015-03-29 17:34:11.149606+02
2015-03-29 17:35:10.296 CEST 8016 LOG: database system is ready to accept connections

So it would seem the CREATE INDEX is the actual problem (I haven't tried that command separately).

Erik Rijkers

Attachment Content-Type Size
create_data.sh application/x-shellscript 972 bytes

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Erik Rijkers 2015-03-29 15:43:51 Re: TRAP: BadArgument - mcxt.c, Line: 813
Previous Message Michael Paquier 2015-03-29 10:59:46 Re: Rounding to even for numeric data type