On Fri, Jul 17, 2015 at 7:52 PM, Geoff Winkless <pgsqladmin@geoff.dj> wrote:
> While doing some testing of 9.5a one of my colleagues (not on list) found a
> reproducible server segfault.
> [...]
> Hope someone can get something useful from the above. Any questions, please
> ask.
A test case is more than enough to look at this issue and guess what
is happening, thanks! The issue can be reproduced on REL9_5_STABLE and
master, and by looking at the stack trace it seems that the problem is
caused by an attempt to delete a memory context that has already been
free'd.
* thread #1: tid = 0x0000, 0x0000000109f30dee
postgres`MemoryContextDelete(context=0x7f7f7f7f7f7f7f7f) + 30 at
mcxt.c:206, stop reason = signal SIGSTOP frame #0: 0x0000000109f30dee
postgres`MemoryContextDelete(context=0x7f7f7f7f7f7f7f7f) + 30 at
mcxt.c:206 203 void 204 MemoryContextDelete(MemoryContext context) 205 {
-> 206 AssertArg(MemoryContextIsValid(context)); 207 /* We had better not be deleting TopMemoryContext
...*/ 208 Assert(context != TopMemoryContext); 209 /* And not CurrentMemoryContext, either */
(lldb) bt
* thread #1: tid = 0x0000, 0x0000000109f30dee
postgres`MemoryContextDelete(context=0x7f7f7f7f7f7f7f7f) + 30 at
mcxt.c:206, stop reason = signal SIGSTOP * frame #0: 0x0000000109f30dee
postgres`MemoryContextDelete(context=0x7f7f7f7f7f7f7f7f) + 30 at
mcxt.c:206 frame #1: 0x0000000109b7e261
postgres`fmgr_sql(fcinfo=0x00007f84c28d5870) + 433 at functions.c:1044
I am adding it to the list of Open Items for 9.5. I'll look into that
in the next couple of days (Tuesday at worst).
Regards,
--
Michael