pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #16237: When restoring database, backend disconnects or crashes when foreign key is created
4+ messages / 4 participants
[nested] [flat]

* BUG #16237: When restoring database, backend disconnects or crashes when foreign key is created
@ 2020-01-28 13:28 PG Bug reporting form <noreply@postgresql.org>
  2020-01-28 17:02 ` Re: BUG #16237: When restoring database, backend disconnects or crashes when foreign key is created Tom Lane <tgl@sss.pgh.pa.us>
  2020-01-28 18:14 ` Re: BUG #16237: When restoring database, backend disconnects or crashes when foreign key is created Alvaro Herrera <alvherre@2ndquadrant.com>
  0 siblings, 2 replies; 4+ messages in thread

From: PG Bug reporting form @ 2020-01-28 13:28 UTC (permalink / raw)
  To: pgsql-bugs@lists.postgresql.org; +Cc: dsnover@electrainfo.com

The following bug has been logged on the website:

Bug reference:      16237
Logged by:          Darryl Snover
Email address:      dsnover@electrainfo.com
PostgreSQL version: 12.1
Operating system:   Mac OS Catalina 10.15.2, EDB Install Image
Description:        

When restoring a full database dump (psql -f filename), on one of the three
databases, when restoring, this error is occurring.  Is repeatable on a
different Mac.  Macintosh models:  MacBook Pro 16, clean OS installed, new
machine.  Also ran on 2012 Mac Mini Server, with Mac OS X Mojave 10.14, with
same errors.

Manually creating the constraint or any similar constraint causes the same
failure.

Log:

pg_restore: creating FK CONSTRAINT
"public.file_transit_transaction_file_transit_id_fkey"
pg_restore: from TOC entry 3972; 2606 4177792 FK CONSTRAINT
file_transit_transaction_file_transit_id_fkey postgres
pg_restore: error: could not execute query: server closed the connection
unexpectedly
	This probably means the server terminated abnormally
	before or while processing the request.
Command was: ALTER TABLE ONLY file_transit_transaction
    ADD CONSTRAINT file_transit_transaction_file_transit_id_fkey FOREIGN KEY
(file_transit_id) REFERENCES file_transit(file_transit_id);

CRASH REPORT EXAMPE (all are identical in that they all show same exception
type).

Process:               postgres [8984]
Path:                  /Users/USER/*/postgres
Identifier:            postgres
Version:               ???
Code Type:             X86-64 (Native)
Parent Process:        postgres [6396]
Responsible:           postgres [6396]
User ID:               503

Date/Time:             2020-01-25 15:11:35.585 -0500
OS Version:            Mac OS X 10.15.2 (19C57)
Report Version:        12
Bridge OS Version:     4.2 (17P2551)
Anonymous UUID:        C8E75799-5BBA-0E05-B04F-B6ADE1D72158

Sleep/Wake UUID:       70392B53-DF5A-408F-99CA-43E58A0CE312

Time Awake Since Boot: 27000 seconds
Time Since Wake:       3500 seconds

System Integrity Protection: enabled

Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_BAD_ACCESS (Code Signature Invalid)
Exception Codes:       0x0000000000000032, 0x000000010dd002d0
Exception Note:        EXC_CORPSE_NOTIFY

Termination Reason:    Namespace CODESIGNING, Code 0x2

kernel messages:

VM Regions Near 0x10dd002d0:
    VM_ALLOCATE            000000010dcff000-000000010dd00000 [    4K]
r-x/rwx SM=PRV  
--> VM_ALLOCATE            000000010dd00000-000000010dd01000 [    4K]
r-x/rwx SM=PRV  
    __TEXT                 000000010dd01000-000000010dd8d000 [  560K]
r-x/rwx SM=COW  /Users/USER/*/*.dylib

Application Specific Information:
crashed on child side of fork pre-exec

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   ???                           	0x000000010dd002d0 0 + 4526703312
1   postmaster                    	0x000000010d560a74 ExecScan + 452
(execScan.c:228)
2   postmaster                    	0x000000010d57445d ExecHashJoin + 1069
(nodeHashjoin.c:262)
3   postmaster                    	0x000000010d558d0f standard_ExecutorRun +
287 (execMain.c:1652)
4   postmaster                    	0x000000010d58bc52 _SPI_execute_plan +
1346 (spi.c:2523)
5   postmaster                    	0x000000010d58c2ba SPI_execute_snapshot +
298 (spi.c:616)
6   postmaster                    	0x000000010d783993 RI_Initial_Check +
2099 (ri_triggers.c:1488)
7   postmaster                    	0x000000010d522df2
validateForeignKeyConstraint + 210 (tablecmds.c:9784)
8   postmaster                    	0x000000010d51d4b0 ATController + 1664
(tablecmds.c:4715)
9   postmaster                    	0x000000010d6c0a29 ProcessUtilitySlow +
2713 (utility.c:1131)
10  postmaster                    	0x000000010d6bf517
standard_ProcessUtility + 1975 (utility.c:933)
11  postmaster                    	0x000000010d6bea2f PortalRunUtility + 159
(pquery.c:1184)
12  postmaster                    	0x000000010d6be04a PortalRunMulti + 234
(pquery.c:1328)
13  postmaster                    	0x000000010d6bda67 PortalRun + 519
(pquery.c:800)
14  postmaster                    	0x000000010d6bca55 exec_simple_query +
1445 (postgres.c:1223)
15  postmaster                    	0x000000010d6ba8dd PostgresMain + 3901
(postgres.c:4238)
16  postmaster                    	0x000000010d63b5a8 PostmasterMain + 7832
(postmaster.c:2458)
17  postmaster                    	0x000000010d5a84ae main + 1678
18  libdyld.dylib                 	0x00007fff681f27fd start + 1

Thread 0 crashed with X86 Thread State (64-bit):
  rax: 0x000000010dd002d0  rbx: 0x00007fc5ff05b580  rcx: 0x00000001279b38d8 
rdx: 0x00007ffee2850aa6
  rdi: 0x00007fc5ff05c320  rsi: 0x00007fc5ff05b580  rbp: 0x00007ffee2850ad0 
rsp: 0x00007ffee2850a78
   r8: 0x000000000004850d   r9: 0xffffffff00000000  r10: 0x00000001279b38d0 
r11: 0x0000000000000000
  r12: 0x00007fc5ff05c320  r13: 0x000000010da24220  r14: 0x00007fc5ff05b630 
r15: 0x00007fc5ff05b470
  rip: 0x000000010dd002d0  rfl: 0x0000000000010246  cr2: 0x000000010dd002d0



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: BUG #16237: When restoring database, backend disconnects or crashes when foreign key is created
  2020-01-28 13:28 BUG #16237: When restoring database, backend disconnects or crashes when foreign key is created PG Bug reporting form <noreply@postgresql.org>
@ 2020-01-28 17:02 ` Tom Lane <tgl@sss.pgh.pa.us>
  1 sibling, 0 replies; 4+ messages in thread

From: Tom Lane @ 2020-01-28 17:02 UTC (permalink / raw)
  To: dsnover@electrainfo.com; +Cc: pgsql-bugs@lists.postgresql.org

PG Bug reporting form <noreply@postgresql.org> writes:
> When restoring a full database dump (psql -f filename), on one of the three
> databases, when restoring, this error is occurring.  Is repeatable on a
> different Mac.  Macintosh models:  MacBook Pro 16, clean OS installed, new
> machine.  Also ran on 2012 Mac Mini Server, with Mac OS X Mojave 10.14, with
> same errors.

Interesting ... can you share a database dump that causes this?

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: BUG #16237: When restoring database, backend disconnects or crashes when foreign key is created
  2020-01-28 13:28 BUG #16237: When restoring database, backend disconnects or crashes when foreign key is created PG Bug reporting form <noreply@postgresql.org>
@ 2020-01-28 18:14 ` Alvaro Herrera <alvherre@2ndquadrant.com>
  2020-01-28 18:30   ` Re: BUG #16237: When restoring database, backend disconnects or crashes when foreign key is created Darryl Snover <dsnover@electrainfo.com>
  1 sibling, 1 reply; 4+ messages in thread

From: Alvaro Herrera @ 2020-01-28 18:14 UTC (permalink / raw)
  To: dsnover@electrainfo.com; pgsql-bugs@lists.postgresql.org

On 2020-Jan-28, PG Bug reporting form wrote:

> pg_restore: creating FK CONSTRAINT
> "public.file_transit_transaction_file_transit_id_fkey"
> pg_restore: from TOC entry 3972; 2606 4177792 FK CONSTRAINT
> file_transit_transaction_file_transit_id_fkey postgres
> pg_restore: error: could not execute query: server closed the connection
> unexpectedly
> 	This probably means the server terminated abnormally
> 	before or while processing the request.
> Command was: ALTER TABLE ONLY file_transit_transaction
>     ADD CONSTRAINT file_transit_transaction_file_transit_id_fkey FOREIGN KEY
> (file_transit_id) REFERENCES file_transit(file_transit_id);

Is any of these tables (file_transit_transaction and file_transit)
partitioned?

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services





^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: BUG #16237: When restoring database, backend disconnects or crashes when foreign key is created
  2020-01-28 13:28 BUG #16237: When restoring database, backend disconnects or crashes when foreign key is created PG Bug reporting form <noreply@postgresql.org>
  2020-01-28 18:14 ` Re: BUG #16237: When restoring database, backend disconnects or crashes when foreign key is created Alvaro Herrera <alvherre@2ndquadrant.com>
@ 2020-01-28 18:30   ` Darryl Snover <dsnover@electrainfo.com>
  0 siblings, 0 replies; 4+ messages in thread

From: Darryl Snover @ 2020-01-28 18:30 UTC (permalink / raw)
  To: Alvaro Herrera <alvherre@2ndquadrant.com>; +Cc: pgsql-bugs@lists.postgresql.org <pgsql-bugs@lists.postgresql.org>

> On Jan 28, 2020, at 1:14 PM, Alvaro Herrera <alvherre@2ndquadrant.com> wrote:
> 
> On 2020-Jan-28, PG Bug reporting form wrote:
> 
>> pg_restore: creating FK CONSTRAINT
>> "public.file_transit_transaction_file_transit_id_fkey"
>> pg_restore: from TOC entry 3972; 2606 4177792 FK CONSTRAINT
>> file_transit_transaction_file_transit_id_fkey postgres
>> pg_restore: error: could not execute query: server closed the connection
>> unexpectedly
>> 	This probably means the server terminated abnormally
>> 	before or while processing the request.
>> Command was: ALTER TABLE ONLY file_transit_transaction
>>    ADD CONSTRAINT file_transit_transaction_file_transit_id_fkey FOREIGN KEY
>> (file_transit_id) REFERENCES file_transit(file_transit_id);
> 
> Is any of these tables (file_transit_transaction and file_transit)
> partitioned?
> 

No tables are partitioned.  Any attempts to create any referential integrity constraint on any tables causes the same crash.

I’m trying to prune down the database to rid it of any proprietary data, and see if I can get a reproducible small set.

-Darryl

^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2020-01-28 18:30 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-01-28 13:28 BUG #16237: When restoring database, backend disconnects or crashes when foreign key is created PG Bug reporting form <noreply@postgresql.org>
2020-01-28 17:02 ` Tom Lane <tgl@sss.pgh.pa.us>
2020-01-28 18:14 ` Alvaro Herrera <alvherre@2ndquadrant.com>
2020-01-28 18:30   ` Darryl Snover <dsnover@electrainfo.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox