Re: Unresolved error 0xC0000409 on Windows Server

From: Matthew Gerber <gerber(dot)matthew(at)gmail(dot)com>
To: Noah Misch <noah(at)leadboat(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Craig Ringer <ringerc(at)ringerc(dot)id(dot)au>, Merlin Moncure <mmoncure(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Unresolved error 0xC0000409 on Windows Server
Date: 2012-11-11 15:10:31
Message-ID: CAOcpbfoAceM0FKCRKY=SghRRsWUKnGkVj+9OB55NUMLqmB_-eQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Nov 11, 2012 at 12:23 AM, Noah Misch <noah(at)leadboat(dot)com> wrote:

> On Sun, Nov 04, 2012 at 02:30:38PM -0500, Tom Lane wrote:
> > Matthew Gerber <gerber(dot)matthew(at)gmail(dot)com> writes:
> > >> Here is the command that was executing when the 0xC0000409 exception
> was
> > >> raised:
> > >> INSERT INTO places (bounding_box,country,full_name,id,name,type,url)
> > >> VALUES
> > >> (st_transform_null(ST_GeometryFromText('POLYGON((-97.034085
> > >> 32.771786,-97.034085 32.953966,-96.888789 32.953966,-96.888789
> > >> 32.771786,-97.034085 32.771786))',4326),26918),'United
> States','Irving,
> > >> TX','dce44ec49eb788f5','Irving','city','
> > >> http://api.twitter.com/1/geo/id/dce44ec49eb788f5.json'),
> >
> > Assuming that 0xC0000409 does actually represent a stack-overrun
> > condition,
>
> It signifies scribbling past the end of the frame's local variables:
> http://msdn.microsoft.com/en-us/library/8dbf701c.aspx
>

A slight update on this: previously, my insert code involved a long
"SELECT ... UNION ALL ... SELECT ... UNION ALL ..." command. If this
command was too long, I would get a stack depth exception thrown back to my
client application. I reduced the length of the command to eliminate the
client-side exceptions, but on some occasions I would still get the
0xC0000409 crash on the server side. I have eliminated the long "SELECT ...
UNION ALL ... " command, and I now get no errors on either side. So it
seems like long commands like this were actually causing the server-side
crashes. The proper behavior would seem to be throwing the exception back
to the client application instead of crashing the server.

Hope this helps...

Matt

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2012-11-11 16:19:04 Re: Unresolved error 0xC0000409 on Windows Server
Previous Message Lars Kanis 2012-11-11 14:55:11 Re: Failing SSL connection due to weird interaction with openssl