Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: ERROR: invalid memory alloc request size <a_big_number_here>


  • From: Matteo Beccati <php(at)beccati(dot)com>
  • To: Martijn van Oosterhout <kleptog(at)svana(dot)org>
  • Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, pgsql-hackers(at)postgresql(dot)org
  • Subject: Re: ERROR: invalid memory alloc request size <a_big_number_here>
  • Date: Thu, 27 Oct 2005 16:02:48 +0200
  • Message-id: <4360DE08(dot)6020300(at)beccati(dot)com>

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



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group