Re: Perl 5.10 vs. PG 8.4 on Win32

From: Dave Page <dpage(at)pgadmin(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Pg Bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: Perl 5.10 vs. PG 8.4 on Win32
Date: 2009-05-16 18:37:20
Message-ID: 937d27e10905161137r6e235f5bk9a851b68ebecfae4@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Sat, May 16, 2009 at 7:28 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Dave Page <dpage(at)pgadmin(dot)org> writes:
>> Ooh, sneaky. I like it. Not sure it helps much though:
>
>> postgres.exe!atexit_callback()  Line 228      C
>>       msvcr80.dll!doexit(int code=0, int quick=0, int retcaller=1)  Line 553  C
>>       msvcr80.dll!_cexit()  Line 413 + 0xb bytes      C
>>       msvcr80.dll!__CRTDLL_INIT(void * hDllHandle=0x78130000, unsigned
>> long dwReason=0, void * lpreserved=0x00000001)  Line 389      C
>>       msvcr80.dll!_CRTDLL_INIT(void * hDllHandle=0x78130000, unsigned long
>> dwReason=0, void * lpreserved=0x00000001)  Line 214 + 0x11 bytes      C
>>       ntdll.dll!7c90118a()
>>       [Frames below may be incorrect and/or missing, no symbols loaded for
>> ntdll.dll]
>>       ntdll.dll!7c923ada()
>>       ntdll.dll!7c910435()
>>       ntdll.dll!7c91043e()
>>       ntdll.dll!7c923c88()
>>       kernel32.dll!7c81caae()
>>       postgres.exe!main(int argc=3, char * * argv=0x00262fc0)  Line 165 +
>> 0x7 bytes     C
>>       postgres.exe!__tmainCRTStartup()  Line 597 + 0x17 bytes C
>
> I think you must've traced the wrong process --- this looks like an exit
> from main().  There should be a pile of stack frames for Postgres
> functions if we are inside a call from plperl.c to the Perl dll.

Well, I added a dummy callback to plperl.c, and added the hook it in
the plperl.c init function. The dummy callback simply slept for 60
seconds to let me attach the debugger. I attached and broke to confirm
I was where I expected. I then stepped out of my dummy callback (which
was below DLLMain in it's backtrace btw) and let it run to a
breakpoint in the real atexit_callback, which is where this backtrace
is from. As far as I can tell, it is from the right process, as only
the correct one should have added the foo_callback hook.

BTW, I'm currently attempting to build perl myself so I can get a more
helpful backtrace. Strawberry perl exhibits the same crash and doesn't
come with symbols either.

--
Dave Page
EnterpriseDB UK: http://www.enterprisedb.com

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Dave Page 2009-05-16 18:49:57 Re: Perl 5.10 vs. PG 8.4 on Win32
Previous Message Tom Lane 2009-05-16 18:28:46 Re: Perl 5.10 vs. PG 8.4 on Win32