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

From Martijn van Oosterhout
Subject Re: ERROR: invalid memory alloc request size
Date
Msg-id 20051027091618.GC4259@svana.org
Whole thread Raw
In response to ERROR: invalid memory alloc request size  (Matteo Beccati <php@beccati.com>)
Responses Re: ERROR: invalid memory alloc request size
List pgsql-hackers
On Thu, Oct 27, 2005 at 10:59:30AM +0200, Matteo Beccati wrote:
> Hi,
>
> I'm using 8.1beta4 on a development server for a rather db-intensive
> application. This application has a multiprocess daemon which was
> working fairly well in past. After some recent changes I started having
> deadlock problems. While investigating to remove what was causing them I
> removed some FOR UPDATE clauses (added on 8.0 to prevent other deadlock
> situations), hoping that the newly added FK share locks would better
> handle the concurrent access. In fact the deadlock errors went away, but
> I suddenly started getting some of these:

Backtrace would be nice. I don't suppose your backend is compiled with
debugging? If so, try attaching to the backend and do:

break MemoryContextAlloc if size > 1000000000

Obviously something is trying to allocate and negative number of
bytes... 4291419108 = -3548188

Hope this helps,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

pgsql-hackers by date:

Previous
From: Martijn van Oosterhout
Date:
Subject: Re: Having trouble startin off with the code..
Next
From: Matteo Beccati
Date:
Subject: Re: ERROR: invalid memory alloc request size