Re: BUG #13657: Some kind of undetected deadlock between query and "startup process" on replica.

From: Maxim Boguk <maxim(dot)boguk(at)gmail(dot)com>
To: pgsql-bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #13657: Some kind of undetected deadlock between query and "startup process" on replica.
Date: 2015-10-01 12:52:32
Message-ID: CAK-MWwSkY27NgoCW3j8AwpfK5e_AiUWnE7VLu1a4A61rpkXTyg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

>
>
> So wal replay got AccessExclusiveLock on relation 17987 and waiting for
> something.
> And query waiting for AccessShareLock on the same relation.
>
>
​gdb backtrace from stuck startup process:

(gdb) bt
#0 0x00007f04ad862633 in select () from /lib/x86_64-linux-gnu/libc.so.6
#1 0x00007f04af86488e in pg_usleep (microsec=<optimized out>) at
/tmp/buildd/postgresql-9.4-9.4.4/build/../src/port/pgsleep.c:53
#2 0x00007f04af7328ac in WaitExceedsMaxStandbyDelay () at
/tmp/buildd/postgresql-9.4-9.4.4/build/../src/backend/storage/ipc/standby.c:171
#3 ResolveRecoveryConflictWithVirtualXIDs
(reason=PROCSIG_RECOVERY_CONFLICT_SNAPSHOT, waitlist=0x7f04b13ba2f0) at
/tmp/buildd/postgresql-9.4-9.4.4/build/../src/backend/storage/ipc/standby.c:232
#4 ResolveRecoveryConflictWithVirtualXIDs (waitlist=0x7f04b13ba2f0,
reason=PROCSIG_RECOVERY_CONFLICT_SNAPSHOT) at
/tmp/buildd/postgresql-9.4-9.4.4/build/../src/backend/storage/ipc/standby.c:191
#5 0x00007f04af544445 in heap_xlog_clean (record=0x7f04b1395b80,
lsn=107351881751648) at
/tmp/buildd/postgresql-9.4-9.4.4/build/../src/backend/access/heap/heapam.c:7329
#6 heap2_redo (lsn=107351881751648, record=0x7f04b1395b80) at
/tmp/buildd/postgresql-9.4-9.4.4/build/../src/backend/access/heap/heapam.c:8488
#7 0x00007f04af580648 in StartupXLOG () at
/tmp/buildd/postgresql-9.4-9.4.4/build/../src/backend/access/transam/xlog.c:6920
#8 0x00007f04af6f5d8f in StartupProcessMain () at
/tmp/buildd/postgresql-9.4-9.4.4/build/../src/backend/postmaster/startup.c:224
#9 0x00007f04af58c579 in AuxiliaryProcessMain (argc=2, argv=<optimized
out>) at
/tmp/buildd/postgresql-9.4-9.4.4/build/../src/backend/bootstrap/bootstrap.c:422
#10 0x00007f04af6f235b in StartChildProcess (type=StartupProcess) at
/tmp/buildd/postgresql-9.4-9.4.4/build/../src/backend/postmaster/postmaster.c:5155
#11 0x00007f04af6f4847 in PostmasterMain (argc=<optimized out>,
argv=<optimized out>) at
/tmp/buildd/postgresql-9.4-9.4.4/build/../src/backend/postmaster/postmaster.c:1237
#12 0x00007f04af513a5d in main (argc=5, argv=0x7f04b13731a0) at
/tmp/buildd/postgresql-9.4-9.4.4/build/../src/backend/main/main.c:228

--
Maxim Boguk
Senior Postgresql DBA
http://www.postgresql-consulting.ru/ <http://www.postgresql-consulting.com/>

Phone RU: +7 910 405 4718
Phone AU: +61 45 218 5678

LinkedIn: http://www.linkedin.com/pub/maksym-boguk/80/b99/b1b
Skype: maxim.boguk
Jabber: maxim(dot)boguk(at)gmail(dot)com
МойКруг: http://mboguk.moikrug.ru/

"People problems are solved with people.
If people cannot solve the problem, try technology.
People will then wish they'd listened at the first stage."

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Jaime Casanova 2015-10-01 13:44:35 Re: BUG #13654: how can i solve "cannot initialize shared memory"
Previous Message jesper 2015-10-01 12:17:48 BUG #13658: DELETE with syntax error in subselect deletes ALL