Re: ERROR: invalid memory alloc request size - Mailing list pgsql-hackers

From Matteo Beccati
Subject Re: ERROR: invalid memory alloc request size
Date
Msg-id 4360DE08.6020300@beccati.com
Whole thread Raw
In response to Re: ERROR: invalid memory alloc request size  (Martijn van Oosterhout <kleptog@svana.org>)
Responses Re: ERROR: invalid memory alloc request size
List pgsql-hackers
Hi,

> Go up a few levels to GetMultiXactIdMembers and type "info locals", see
> if we can get the values of some of the variables there. Also, if you
> can turn the debugging down to -O0, that will make the results in gdb
> much more reliable.
>
> It's clear at least that "length" is negative, but what about the other
> variables...

I already recompiled all with -O0 to be sure that I was able to have a 
backtrace. This is the full bt:

#2  0x0827b5cf in MemoryContextAlloc (context=0x856bcc8, 
size=4278026492) at mcxt.c:505        __func__ = "MemoryContextAlloc"
#3  0x080b6a16 in GetMultiXactIdMembers (multi=320306, xids=0xbfbfaba4) 
at multixact.c:935        pageno = 156        prev_pageno = 156        entryno = 819        slotno = 2        offptr =
(MultiXactOffset*) 0x286536ac        offset = 4235201        length = -4235201        i = 138425096        nextMXact =
320308       tmpMXact = 320307        nextOffset = 4235265        ptr = (TransactionId *) 0xbfbfab78
 


> Do you use a lot of subtransactions, function, savepoints, anything
> like that?

I just removed a subtransaction that I put in a function that was used 
to capture the deadlock errors. That subtransaction was actually useless 
because I removed the FOR UPDATE clause that was causing the deadlock, 
but the alloc error is still there. I'll try to search through the code 
to find some other subtransactions.


Best regards
--
Matteo Beccati
http://phpadsnew.com
http://phppgads.com


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: ERROR: invalid memory alloc request size
Next
From: Matteo Beccati
Date:
Subject: Re: ERROR: invalid memory alloc request size