Re: Postgres 9.0 crash on win7

From: Andrea Peri 2007 <aperi2007(at)gmail(dot)com>
To: Craig Ringer <craig(at)postnewspapers(dot)com(dot)au>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: Postgres 9.0 crash on win7
Date: 2010-10-03 16:51:03
Message-ID: 4CA8B477.7080707@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


>Truly, the most helpful thing at this point would be to collect a
backtrace showing where in the postgresql server it crashed.
>There are instructions on how to do that here:

>http://wiki.postgresql.org/wiki/Getting_a_stack_trace_of_a_running_PostgreSQL_backend_on_Windows
>
>

>In your case, as the backend is crashing you will want to use windbg
or Visual Studio Express Edition to
>collect the crash data; process explorer will not be enough.

Hi,

I collect the trace information of the crash using windbg.

If get two set of trace, the first is when postgres start in the windbg
session.

--- the first set ---

*** wait with pending attach
Symbol search path is: C:\Program Files
(x86)\PostgreSQL\9.0\symbols;SRV*c:\localsymbols*http://msdl.microsoft.com/download/symbols
Executable search path is:
ModLoad: 00000000`003f0000 00000000`008f6000 C:\Program Files
(x86)\PostgreSQL\9.0\bin\postgres.exe
ModLoad: 00000000`77940000 00000000`77aeb000 C:\Windows\SYSTEM32\ntdll.dll
ModLoad: 00000000`77b20000 00000000`77ca0000 ntdll.dll
ModLoad: 00000000`73dc0000 00000000`73dff000 C:\Windows\SYSTEM32\wow64.dll
ModLoad: 00000000`73d60000 00000000`73dbc000
C:\Windows\SYSTEM32\wow64win.dll
ModLoad: 00000000`73d50000 00000000`73d58000
C:\Windows\SYSTEM32\wow64cpu.dll
ModLoad: 00000000`76af0000 00000000`76bf0000 KERNEL32.dll
ModLoad: 00000000`77640000 00000000`77686000 KERNELBASE.dll
ModLoad: 00000000`10000000 00000000`10033000 SSLEAY32.dll
ModLoad: 00000000`00140000 00000000`0023e000 LIBEAY32.dll
ModLoad: 00000000`739f0000 00000000`739f7000 WSOCK32.dll
ModLoad: 00000000`771b0000 00000000`771e5000 WS2_32.dll
ModLoad: 00000000`756f0000 00000000`7579c000 msvcrt.dll
ModLoad: 00000000`76bf0000 00000000`76ce0000 RPCRT4.dll
ModLoad: 00000000`75690000 00000000`756f0000 SspiCli.dll
ModLoad: 00000000`75680000 00000000`7568c000 CRYPTBASE.dll
ModLoad: 00000000`77700000 00000000`77719000 SECHOST.dll
ModLoad: 00000000`775a0000 00000000`775a6000 NSI.dll
ModLoad: 00000000`77110000 00000000`771a0000 GDI32.dll
ModLoad: 00000000`757a0000 00000000`758a0000 USER32.dll
ModLoad: 00000000`77310000 00000000`773b0000 ADVAPI32.dll
ModLoad: 00000000`771a0000 00000000`771aa000 LPK.dll
ModLoad: 00000000`76fe0000 00000000`7707d000 USP10.dll
ModLoad: 00000000`734a0000 00000000`73543000 MSVCR90.dll
ModLoad: 00000000`61cc0000 00000000`61cd3000 libintl-8.dll
ModLoad: 00000000`66000000 00000000`660e7000 libiconv-2.dll
ModLoad: 00000000`002c0000 00000000`003b1000 libxml2.dll
ModLoad: 00000000`00d90000 00000000`00e69000 iconv.dll
ModLoad: 00000000`003c0000 00000000`003d3000 zlib1.dll
ModLoad: 00000000`735d0000 00000000`735d8000 Secur32.dll
ModLoad: 00000000`76f90000 00000000`76fd5000 WLDAP32.dll
ModLoad: 00000000`76f30000 00000000`76f90000 IMM32.dll
ModLoad: 00000000`76500000 00000000`765cc000 MSCTF.dll
ModLoad: 00000000`735f0000 00000000`7362c000 MSWSOCK.dll
ModLoad: 00000000`73490000 00000000`73496000 WSHIP6.dll
ModLoad: 00000000`735e0000 00000000`735e5000 WSHTCPIP.dll
(ec0.fe4): Break instruction exception - code 80000003 (first chance)
ntdll!DbgBreakPoint:
00000000`7798f190 cc int 3
0:003> ~*k

0 Id: ec0.66c Suspend: 1 Teb: 00000000`7efdb000 Unfrozen
Child-SP RetAddr Call Site
00000000`0013e6b8 00000000`73d5282c wow64cpu!CpupSyscallStub+0x9
00000000`0013e6c0 00000000`73dcd07e wow64cpu!WaitForMultipleObjects32+0x32
00000000`0013e780 00000000`73dcc549 wow64!RunCpuSimulation+0xa
00000000`0013e7d0 00000000`779884c8 wow64!Wow64LdrpInitialize+0x429
00000000`0013ed20 00000000`77987623 ntdll!LdrpInitializeProcess+0x17e2
00000000`0013f220 00000000`7797308e ntdll! ?? ::FNODOBFM::`string'+0x2bea0
00000000`0013f290 00000000`00000000 ntdll!LdrInitializeThunk+0xe

1 Id: ec0.868 Suspend: 1 Teb: 00000000`7efad000 Unfrozen
Child-SP RetAddr Call Site
00000000`01e6eca8 00000000`73d52932 wow64cpu!CpupSyscallStub+0x9
00000000`01e6ecb0 00000000`73dcd07e wow64cpu!DeviceIoctlFileFault+0x31
00000000`01e6ed70 00000000`73dcc549 wow64!RunCpuSimulation+0xa
00000000`01e6edc0 00000000`779bd177 wow64!Wow64LdrpInitialize+0x429
00000000`01e6f310 00000000`7797308e ntdll! ?? ::FNODOBFM::`string'+0x2bfe4
00000000`01e6f380 00000000`00000000 ntdll!LdrInitializeThunk+0xe

2 Id: ec0.a50 Suspend: 1 Teb: 00000000`7efaa000 Unfrozen
Child-SP RetAddr Call Site
00000000`01fded28 00000000`73d52bcd wow64cpu!CpupSyscallStub+0x9
00000000`01fded30 00000000`73dcd07e wow64cpu!Thunk0ArgReloadState+0x1a
00000000`01fdedf0 00000000`73dcc549 wow64!RunCpuSimulation+0xa
00000000`01fdee40 00000000`779bd177 wow64!Wow64LdrpInitialize+0x429
00000000`01fdf390 00000000`7797308e ntdll! ?? ::FNODOBFM::`string'+0x2bfe4
00000000`01fdf400 00000000`00000000 ntdll!LdrInitializeThunk+0xe

# 3 Id: ec0.fe4 Suspend: 1 Teb: 00000000`7efd8000 Unfrozen
Child-SP RetAddr Call Site
00000000`019cfc58 00000000`77a38638 ntdll!DbgBreakPoint
00000000`019cfc60 00000000`779a39cb ntdll!DbgUiRemoteBreakin+0x38
00000000`019cfc90 00000000`00000000 ntdll!RtlUserThreadStart+0x25

The second set is when PG9 crash during execution of script sql
and windbg intercept the crash

-- the second set ---

*** wait with pending attach
Symbol search path is: C:\Program Files
(x86)\PostgreSQL\9.0\symbols;SRV*c:\localsymbols*http://msdl.microsoft.com/download/symbols
Executable search path is:
ModLoad: 00000000`003f0000 00000000`008f6000 C:\Program Files
(x86)\PostgreSQL\9.0\bin\postgres.exe
ModLoad: 00000000`77940000 00000000`77aeb000 C:\Windows\SYSTEM32\ntdll.dll
ModLoad: 00000000`77b20000 00000000`77ca0000 ntdll.dll
ModLoad: 00000000`73dc0000 00000000`73dff000 C:\Windows\SYSTEM32\wow64.dll
ModLoad: 00000000`73d60000 00000000`73dbc000
C:\Windows\SYSTEM32\wow64win.dll
ModLoad: 00000000`73d50000 00000000`73d58000
C:\Windows\SYSTEM32\wow64cpu.dll
ModLoad: 00000000`76af0000 00000000`76bf0000 KERNEL32.dll
ModLoad: 00000000`77640000 00000000`77686000 KERNELBASE.dll
ModLoad: 00000000`10000000 00000000`10033000 SSLEAY32.dll
ModLoad: 00000000`00140000 00000000`0023e000 LIBEAY32.dll
ModLoad: 00000000`739f0000 00000000`739f7000 WSOCK32.dll
ModLoad: 00000000`771b0000 00000000`771e5000 WS2_32.dll
ModLoad: 00000000`756f0000 00000000`7579c000 msvcrt.dll
ModLoad: 00000000`76bf0000 00000000`76ce0000 RPCRT4.dll
ModLoad: 00000000`75690000 00000000`756f0000 SspiCli.dll
ModLoad: 00000000`75680000 00000000`7568c000 CRYPTBASE.dll
ModLoad: 00000000`77700000 00000000`77719000 SECHOST.dll
ModLoad: 00000000`775a0000 00000000`775a6000 NSI.dll
ModLoad: 00000000`77110000 00000000`771a0000 GDI32.dll
ModLoad: 00000000`757a0000 00000000`758a0000 USER32.dll
ModLoad: 00000000`77310000 00000000`773b0000 ADVAPI32.dll
ModLoad: 00000000`771a0000 00000000`771aa000 LPK.dll
ModLoad: 00000000`76fe0000 00000000`7707d000 USP10.dll
ModLoad: 00000000`734a0000 00000000`73543000 MSVCR90.dll
ModLoad: 00000000`61cc0000 00000000`61cd3000 libintl-8.dll
ModLoad: 00000000`66000000 00000000`660e7000 libiconv-2.dll
ModLoad: 00000000`002c0000 00000000`003b1000 libxml2.dll
ModLoad: 00000000`00d90000 00000000`00e69000 iconv.dll
ModLoad: 00000000`003c0000 00000000`003d3000 zlib1.dll
ModLoad: 00000000`735d0000 00000000`735d8000 Secur32.dll
ModLoad: 00000000`76f90000 00000000`76fd5000 WLDAP32.dll
ModLoad: 00000000`76f30000 00000000`76f90000 IMM32.dll
ModLoad: 00000000`76500000 00000000`765cc000 MSCTF.dll
ModLoad: 00000000`735f0000 00000000`7362c000 MSWSOCK.dll
ModLoad: 00000000`73490000 00000000`73496000 WSHIP6.dll
ModLoad: 00000000`735e0000 00000000`735e5000 WSHTCPIP.dll
(ec0.fe4): Break instruction exception - code 80000003 (first chance)
ntdll!DbgBreakPoint:
00000000`7798f190 cc int 3
0:003> ~*k

0 Id: ec0.66c Suspend: 1 Teb: 00000000`7efdb000 Unfrozen
Child-SP RetAddr Call Site
00000000`0013e6b8 00000000`73d5282c wow64cpu!CpupSyscallStub+0x9
00000000`0013e6c0 00000000`73dcd07e wow64cpu!WaitForMultipleObjects32+0x32
00000000`0013e780 00000000`73dcc549 wow64!RunCpuSimulation+0xa
00000000`0013e7d0 00000000`779884c8 wow64!Wow64LdrpInitialize+0x429
00000000`0013ed20 00000000`77987623 ntdll!LdrpInitializeProcess+0x17e2
00000000`0013f220 00000000`7797308e ntdll! ?? ::FNODOBFM::`string'+0x2bea0
00000000`0013f290 00000000`00000000 ntdll!LdrInitializeThunk+0xe

1 Id: ec0.868 Suspend: 1 Teb: 00000000`7efad000 Unfrozen
Child-SP RetAddr Call Site
00000000`01e6eca8 00000000`73d52932 wow64cpu!CpupSyscallStub+0x9
00000000`01e6ecb0 00000000`73dcd07e wow64cpu!DeviceIoctlFileFault+0x31
00000000`01e6ed70 00000000`73dcc549 wow64!RunCpuSimulation+0xa
00000000`01e6edc0 00000000`779bd177 wow64!Wow64LdrpInitialize+0x429
00000000`01e6f310 00000000`7797308e ntdll! ?? ::FNODOBFM::`string'+0x2bfe4
00000000`01e6f380 00000000`00000000 ntdll!LdrInitializeThunk+0xe

2 Id: ec0.a50 Suspend: 1 Teb: 00000000`7efaa000 Unfrozen
Child-SP RetAddr Call Site
00000000`01fded28 00000000`73d52bcd wow64cpu!CpupSyscallStub+0x9
00000000`01fded30 00000000`73dcd07e wow64cpu!Thunk0ArgReloadState+0x1a
00000000`01fdedf0 00000000`73dcc549 wow64!RunCpuSimulation+0xa
00000000`01fdee40 00000000`779bd177 wow64!Wow64LdrpInitialize+0x429
00000000`01fdf390 00000000`7797308e ntdll! ?? ::FNODOBFM::`string'+0x2bfe4
00000000`01fdf400 00000000`00000000 ntdll!LdrInitializeThunk+0xe

# 3 Id: ec0.fe4 Suspend: 1 Teb: 00000000`7efd8000 Unfrozen
Child-SP RetAddr Call Site
00000000`019cfc58 00000000`77a38638 ntdll!DbgBreakPoint
00000000`019cfc60 00000000`779a39cb ntdll!DbgUiRemoteBreakin+0x38
00000000`019cfc90 00000000`00000000 ntdll!RtlUserThreadStart+0x25
0:003> G
ModLoad: 00000000`6e610000 00000000`6e637000 C:\Program Files
(x86)\PostgreSQL\9.0\lib\plpgsql.dll
ModLoad: 00000000`68f00000 00000000`68f7a000 C:\Program Files
(x86)\PostgreSQL\9.0\lib\postgis-1.5.dll
ModLoad: 00000000`70040000 00000000`700ad000 C:\Program Files
(x86)\PostgreSQL\9.0\bin\libgeos_c-1.dll
ModLoad: 00000000`68280000 00000000`68422000 C:\Program Files
(x86)\PostgreSQL\9.0\bin\libgeos-3-2-2.dll
ModLoad: 00000000`70f40000 00000000`71055000 C:\Program Files
(x86)\PostgreSQL\9.0\bin\libxml2-2.dll
ModLoad: 00000000`01090000 00000000`010c9000 C:\Program Files
(x86)\PostgreSQL\9.0\bin\libproj.dll
ntdll!NtTerminateProcess+0xa:
00000000`7799017a c3 ret
0:000> ~*k

. 0 Id: ec0.66c Suspend: 0 Teb: 00000000`7efdb000 Unfrozen
Child-SP RetAddr Call Site
00000000`0013ddc8 00000000`73dd601a ntdll!NtTerminateProcess+0xa
00000000`0013ddd0 00000000`73dccf87 wow64!whNtTerminateProcess+0x46
00000000`0013de00 00000000`73d5276d wow64!Wow64SystemServiceEx+0xd7
00000000`0013e6c0 00000000`73dcd07e
wow64cpu!TurboDispatchJumpAddressEnd+0x24
00000000`0013e780 00000000`73dcc549 wow64!RunCpuSimulation+0xa
00000000`0013e7d0 00000000`779884c8 wow64!Wow64LdrpInitialize+0x429
00000000`0013ed20 00000000`77987623 ntdll!LdrpInitializeProcess+0x17e2
00000000`0013f220 00000000`7797308e ntdll! ?? ::FNODOBFM::`string'+0x2bea0
00000000`0013f290 00000000`00000000 ntdll!LdrInitializeThunk+0xe

------------------------------------------------------------------------------------

I hope to have executed exactly as needed the instruction of
http://wiki.postgresql.org/wiki/Getting_a_stack_trace_of_a_running_PostgreSQL_backend_on_Windows#Remote_debugging_with_windbg.exe

Regards,

Andrea Peri.

Browse pgsql-bugs by date

  From Date Subject
Next Message Andrea Peri 2007 2010-10-03 20:41:21 Re: Postgres 9.0 crash on win7
Previous Message Alan T DeKok 2010-10-03 16:30:35 Re: BUG #5687: RADIUS Authentication issues