Skip to content

Instantly share code, notes, and snippets.

@hut8
Created January 21, 2022 01:03
Show Gist options
  • Save hut8/3b25e6a581a600589bdc62644734de18 to your computer and use it in GitHub Desktop.
Save hut8/3b25e6a581a600589bdc62644734de18 to your computer and use it in GitHub Desktop.

libpq crash analysis

Revision 52a1022

Session

Microsoft (R) Windows Debugger Version 10.0.22473.1005 AMD64
Copyright (c) Microsoft Corporation. All rights reserved.

*** wait with pending attach

************* Path validation summary **************
Response                         Time (ms)     Location
Deferred                                       srv*
OK                                             C:\Users\dcbow\pg-14.1\libpq
OK                                             C:\Users\dcbow\libpq-092b785fad\libpq
OK                                             C:\Program Files\PostgreSQL\14\debug_symbols
Symbol search path is: srv*;C:\Users\dcbow\pg-14.1\libpq;C:\Users\dcbow\libpq-092b785fad\libpq;C:\Program Files\PostgreSQL\14\debug_symbols
Executable search path is: 
ModLoad: 00007ff6`81ac0000 00007ff6`8277f000   C:\Users\dcbow\Documents\Code\todo\todo-app\target\debug\todo-app.exe
ModLoad: 00007ffc`c6e10000 00007ffc`c7005000   C:\WINDOWS\SYSTEM32\ntdll.dll
ModLoad: 00007ffc`c5dc0000 00007ffc`c5e7e000   C:\WINDOWS\System32\KERNEL32.DLL
ModLoad: 00007ffc`c4b80000 00007ffc`c4e48000   C:\WINDOWS\System32\KERNELBASE.dll
ModLoad: 00007ffc`c4a10000 00007ffc`c4a37000   C:\WINDOWS\System32\bcrypt.dll
ModLoad: 00007ffc`c5a30000 00007ffc`c5ade000   C:\WINDOWS\System32\ADVAPI32.dll
ModLoad: 00007ffc`c6920000 00007ffc`c69be000   C:\WINDOWS\System32\msvcrt.dll
ModLoad: 00007ffc`c6b80000 00007ffc`c6c1c000   C:\WINDOWS\System32\sechost.dll
ModLoad: 00007ffc`c5f80000 00007ffc`c60a5000   C:\WINDOWS\System32\RPCRT4.dll
ModLoad: 00007ffc`c5ee0000 00007ffc`c5f4b000   C:\WINDOWS\System32\WS2_32.dll
ModLoad: 00007ffc`c4910000 00007ffc`c4a10000   C:\WINDOWS\System32\ucrtbase.dll
ModLoad: 00007ffc`b4a30000 00007ffc`b4a4b000   C:\WINDOWS\SYSTEM32\VCRUNTIME140.dll
ModLoad: 00000001`80000000 00000001`8005c000   C:\Users\dcbow\Documents\Code\todo\todo-app\target\debug\LIBPQ.dll
ModLoad: 00007ffc`c5e80000 00007ffc`c5ed6000   C:\WINDOWS\System32\WLDAP32.dll
ModLoad: 00007ffc`c4f20000 00007ffc`c5664000   C:\WINDOWS\System32\SHELL32.dll
ModLoad: 00007ffc`c4870000 00007ffc`c490d000   C:\WINDOWS\System32\msvcp_win.dll
ModLoad: 00007ffc`c69c0000 00007ffc`c6b61000   C:\WINDOWS\System32\USER32.dll
ModLoad: 00007ffc`c4790000 00007ffc`c47b2000   C:\WINDOWS\System32\win32u.dll
ModLoad: 00007ffc`c6d40000 00007ffc`c6d6b000   C:\WINDOWS\System32\GDI32.dll
ModLoad: 00007ffc`c4520000 00007ffc`c462d000   C:\WINDOWS\System32\gdi32full.dll
ModLoad: 00007ffc`c12b0000 00007ffc`c12bc000   C:\WINDOWS\SYSTEM32\Secur32.dll
ModLoad: 00007ffc`c3810000 00007ffc`c381c000   C:\WINDOWS\SYSTEM32\CRYPTBASE.DLL
ModLoad: 00000000`68280000 00000000`682f0000   C:\Program Files\PostgreSQL\12\bin\libintl-9.dll
ModLoad: 00007ffc`6c450000 00007ffc`6c617000   C:\WINDOWS\SYSTEM32\ucrtbased.dll
ModLoad: 00007ffc`97a50000 00007ffc`97a7b000   C:\WINDOWS\SYSTEM32\VCRUNTIME140D.dll
ModLoad: 00000000`64940000 00000000`64955000   C:\Program Files\PostgreSQL\12\bin\libwinpthread-1.dll
ModLoad: 00000000`66000000 00000000`661bd000   C:\Program Files\PostgreSQL\12\bin\libiconv-2.dll
ModLoad: 00007ffc`c4410000 00007ffc`c4441000   C:\WINDOWS\SYSTEM32\SSPICLI.DLL
ModLoad: 00007ffc`c5f50000 00007ffc`c5f80000   C:\WINDOWS\System32\IMM32.DLL
ModLoad: 00007ffc`c4a90000 00007ffc`c4b12000   C:\WINDOWS\System32\bcryptprimitives.dll
ModLoad: 00007ffc`c36f0000 00007ffc`c375a000   C:\WINDOWS\system32\mswsock.dll
ModLoad: 00007ffc`c3290000 00007ffc`c335b000   C:\WINDOWS\SYSTEM32\DNSAPI.dll
ModLoad: 00007ffc`c3250000 00007ffc`c328b000   C:\WINDOWS\SYSTEM32\IPHLPAPI.DLL
ModLoad: 00007ffc`c6200000 00007ffc`c6208000   C:\WINDOWS\System32\NSI.dll
ModLoad: 00007ffc`b8950000 00007ffc`b895a000   C:\Windows\System32\rasadhlp.dll
ModLoad: 00007ffc`b8a20000 00007ffc`b8a9f000   C:\WINDOWS\System32\fwpuclnt.dll
ntdll!NtTerminateProcess+0x14:
00007ffc`c6ead2f4 c3              ret

************* Path validation summary **************
Response                         Time (ms)     Location
Deferred                                       srv*
OK                                             C:\Users\dcbow\pg-14.1\libpq
OK                                             C:\Users\dcbow\libpq-092b785fad\libpq
OK                                             C:\Program Files\PostgreSQL\14\debug_symbols
OK                                             C:\Users\dcbow\Documents\Code\postgres\Debug\libpq

Thread (only 1)

0:009> ~
.  9  Id: 2efc.15f8 Suspend: 0 Teb: 0000009e`d9d7c000 Unfrozen "r2d2-worker-0"
0:009> ~#
.  9  Id: 2efc.15f8 Suspend: 0 Teb: 0000009e`d9d7c000 Unfrozen "r2d2-worker-0"
      Start: todo_app!std::sys::windows::thread::impl$0::new::thread_start (00007ff6`8242ac20)
      Priority: 0  Priority class: 32  Affinity: f

Stack

0:009> k
 # Child-SP          RetAddr               Call Site
00 0000009e`dacfcde8 00007ffc`c6e6da38     ntdll!NtTerminateProcess+0x14
01 0000009e`dacfcdf0 00007ffc`c5dde0ab     ntdll!RtlExitUserProcess+0xb8
02 0000009e`dacfce20 00007ffc`c695a155     KERNEL32!ExitProcessImplementation+0xb
03 0000009e`dacfce50 00007ffc`c695a7c5     msvcrt!_crtExitProcess+0x15
04 0000009e`dacfce80 00007ffc`c694f26d     msvcrt!doexit+0x171
05 0000009e`dacfcef0 00000000`68281886     msvcrt!abort+0x8d
06 0000009e`dacfd4a0 00000001`80017e47     libintl_9!libintl_bindtextdomain+0x56
07 0000009e`dacfd4d0 00000001`8001750e     LIBPQ!libpq_binddomain+0x57 [c:\Users\dcbow\Documents\Code\postgres\src\interfaces\libpq\fe-misc.c @ 1290] 
08 0000009e`dacfd510 00000001`8000da93     LIBPQ!libpq_gettext+0xe [c:\Users\dcbow\Documents\Code\postgres\src\interfaces\libpq\fe-misc.c @ 1301] 
09 0000009e`dacfd540 00000001`80004ad6     LIBPQ!emitCouldNotConnect+0x1e3 [c:\Users\dcbow\Documents\Code\postgres\src\interfaces\libpq\fe-connect.c @ 1719] 
0a 0000009e`dacfd9c0 00000001`80009734     LIBPQ!PQconnectPoll+0x976 [c:\Users\dcbow\Documents\Code\postgres\src\interfaces\libpq\fe-connect.c @ 2546] 
0b 0000009e`dacfe450 00000001`8000403e     LIBPQ!connectDBStart+0xd4 [c:\Users\dcbow\Documents\Code\postgres\src\interfaces\libpq\fe-connect.c @ 2064] 
0c 0000009e`dacfe480 00000001`80005bd3     LIBPQ!PQconnectStart+0x5e [c:\Users\dcbow\Documents\Code\postgres\src\interfaces\libpq\fe-connect.c @ 859] 
0d 0000009e`dacfe4c0 00007ff6`81c8f0ca     LIBPQ!PQconnectdb+0x13 [c:\Users\dcbow\Documents\Code\postgres\src\interfaces\libpq\fe-connect.c @ 705] 
0e 0000009e`dacfe500 00007ff6`81c8dd92     todo_app!diesel::pg::connection::raw::RawConnection::establish+0x10a [C:\Users\dcbow\.cargo\registry\src\github.com-1ecc6299db9ec823\diesel-1.4.8\src\pg\connection\raw.rs @ 23] 
0f 0000009e`dacfe6d0 00007ff6`81c6ab09     todo_app!diesel::pg::connection::impl$2::establish+0x22 [C:\Users\dcbow\.cargo\registry\src\github.com-1ecc6299db9ec823\diesel-1.4.8\src\pg\connection\mod.rs @ 50] 
10 0000009e`dacfe750 00007ff6`81c7758c     todo_app!diesel::r2d2::impl$4::connect<diesel::pg::connection::PgConnection>+0x49 [C:\Users\dcbow\.cargo\registry\src\github.com-1ecc6299db9ec823\diesel-1.4.8\src\r2d2.rs @ 86] 
11 0000009e`dacfe800 00007ff6`81c72288     todo_app!r2d2::add_connection::inner::closure$0<diesel::r2d2::ConnectionManager<diesel::pg::connection::PgConnection> >+0xdc [C:\Users\dcbow\.cargo\registry\src\github.com-1ecc6299db9ec823\r2d2-0.8.9\src\lib.rs @ 241] 
12 0000009e`dacfedf0 00007ff6`81c73008     todo_app!scheduled_thread_pool::thunk::impl$0::new::closure$0<tuple$<>,r2d2::add_connection::inner::closure$0>+0x28 [C:\Users\dcbow\.cargo\registry\src\github.com-1ecc6299db9ec823\scheduled-thread-pool-0.2.5\src\thunk.rs @ 20] 
13 0000009e`dacfee40 00007ff6`81cd4261     todo_app!scheduled_thread_pool::thunk::impl$2::invoke<tuple$<>,tuple$<>,scheduled_thread_pool::thunk::impl$0::new::closure$0>+0x48 [C:\Users\dcbow\.cargo\registry\src\github.com-1ecc6299db9ec823\scheduled-thread-pool-0.2.5\src\thunk.rs @ 50] 
14 0000009e`dacfeed0 00007ff6`81ccfb74     todo_app!scheduled_thread_pool::thunk::Thunk<tuple$<>,tuple$<> >::invoke<tuple$<>,tuple$<> >+0x11 [C:\Users\dcbow\.cargo\registry\src\github.com-1ecc6299db9ec823\scheduled-thread-pool-0.2.5\src\thunk.rs @ 36] 
15 0000009e`dacfef10 00007ff6`81ccf791     todo_app!scheduled_thread_pool::Worker::run_job+0x144 [C:\Users\dcbow\.cargo\registry\src\github.com-1ecc6299db9ec823\scheduled-thread-pool-0.2.5\src\lib.rs @ 364] 
16 0000009e`dacff3d0 00007ff6`81cd1261     todo_app!scheduled_thread_pool::impl$8::run::closure$0+0x41 [C:\Users\dcbow\.cargo\registry\src\github.com-1ecc6299db9ec823\scheduled-thread-pool-0.2.5\src\lib.rs @ 326] 
17 0000009e`dacff450 00007ff6`81cda08b     todo_app!core::panic::unwind_safe::impl$23::call_once<tuple$<>,scheduled_thread_pool::impl$8::run::closure$0>+0x21 [/rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c\library\core\src\panic\unwind_safe.rs @ 272] 
18 0000009e`dacff4d0 00007ff6`81cda6f3     todo_app!std::panicking::try::do_call<core::panic::unwind_safe::AssertUnwindSafe<scheduled_thread_pool::impl$8::run::closure$0>,tuple$<> >+0x4b [/rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c\library\std\src\panicking.rs @ 405] 
19 0000009e`dacff5b0 00007ff6`81cd9ecb     todo_app!core::ptr::unique::Unique<dyn$<scheduled_thread_pool::thunk::Invoke<tuple$<>,tuple$<> >,core::marker::Send> >::as_ref<dyn$<scheduled_thread_pool::thunk::Invoke<tuple$<>,tuple$<> >,core::marker::Send> >+0x63
1a 0000009e`dacff600 00007ff6`81cd3271     todo_app!std::panicking::try<tuple$<>,core::panic::unwind_safe::AssertUnwindSafe<scheduled_thread_pool::impl$8::run::closure$0> >+0x8b [/rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c\library\std\src\panicking.rs @ 367] 
1b 0000009e`dacff790 00007ff6`81ccf715     todo_app!std::panic::catch_unwind<core::panic::unwind_safe::AssertUnwindSafe<scheduled_thread_pool::impl$8::run::closure$0>,tuple$<> >+0x21 [/rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c\library\std\src\panic.rs @ 133] 
1c 0000009e`dacff810 00007ff6`81ccf5bf     todo_app!scheduled_thread_pool::Worker::run+0x115 [C:\Users\dcbow\.cargo\registry\src\github.com-1ecc6299db9ec823\scheduled-thread-pool-0.2.5\src\lib.rs @ 326] 
1d 0000009e`dacff970 00007ff6`81cd12ab     todo_app!scheduled_thread_pool::impl$8::start::closure$0+0x1f [C:\Users\dcbow\.cargo\registry\src\github.com-1ecc6299db9ec823\scheduled-thread-pool-0.2.5\src\lib.rs @ 320] 
1e 0000009e`dacff9b0 00007ff6`81cd3c1e     todo_app!std::sys_common::backtrace::__rust_begin_short_backtrace<scheduled_thread_pool::impl$8::start::closure$0,tuple$<> >+0x1b [/rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c\library\std\src\sys_common\backtrace.rs @ 126] 
1f 0000009e`dacff9f0 00007ff6`81cd122e     todo_app!std::thread::impl$0::spawn_unchecked::closure$1::closure$0<scheduled_thread_pool::impl$8::start::closure$0,tuple$<> >+0xe [/rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c\library\std\src\thread\mod.rs @ 484] 
20 0000009e`dacffa20 00007ff6`81cda02c     todo_app!core::panic::unwind_safe::impl$23::call_once<tuple$<>,std::thread::impl$0::spawn_unchecked::closure$1::closure$0>+0xe [/rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c\library\core\src\panic\unwind_safe.rs @ 272] 
21 0000009e`dacffa60 00007ff6`81cda6f3     todo_app!std::panicking::try::do_call<core::panic::unwind_safe::AssertUnwindSafe<std::thread::impl$0::spawn_unchecked::closure$1::closure$0>,tuple$<> >+0x2c [/rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c\library\std\src\panicking.rs @ 405] 
22 0000009e`dacffac0 00007ff6`81cd9f8a     todo_app!core::ptr::unique::Unique<dyn$<scheduled_thread_pool::thunk::Invoke<tuple$<>,tuple$<> >,core::marker::Send> >::as_ref<dyn$<scheduled_thread_pool::thunk::Invoke<tuple$<>,tuple$<> >,core::marker::Send> >+0x63
23 0000009e`dacffb10 00007ff6`81cd329e     todo_app!std::panicking::try<tuple$<>,core::panic::unwind_safe::AssertUnwindSafe<std::thread::impl$0::spawn_unchecked::closure$1::closure$0> >+0x4a [/rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c\library\std\src\panicking.rs @ 367] 
24 0000009e`dacffbb0 00007ff6`81cd3aad     todo_app!std::panic::catch_unwind<core::panic::unwind_safe::AssertUnwindSafe<std::thread::impl$0::spawn_unchecked::closure$1::closure$0>,tuple$<> >+0xe [/rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c\library\std\src\panic.rs @ 133] 
25 0000009e`dacffbf0 00007ff6`81ccc48e     todo_app!std::thread::impl$0::spawn_unchecked::closure$1<scheduled_thread_pool::impl$8::start::closure$0,tuple$<> >+0x10d [/rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c\library\std\src\thread\mod.rs @ 482] 
26 0000009e`dacffcf0 00007ff6`8242ac6c     todo_app!core::ops::function::FnOnce::call_once<std::thread::impl$0::spawn_unchecked::closure$1,tuple$<> >+0xe [/rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c\library\core\src\ops\function.rs @ 227] 
27 (Inline Function) --------`--------     todo_app!alloc::boxed::impl$44::call_once+0xb [/rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c\library\alloc\src\boxed.rs @ 1691] 
28 (Inline Function) --------`--------     todo_app!alloc::boxed::impl$44::call_once+0x16 [/rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c\library\alloc\src\boxed.rs @ 1691] 
29 0000009e`dacffd30 00007ffc`c5dd7034     todo_app!std::sys::windows::thread::impl$0::new::thread_start+0x4c [/rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c\/library\std\src\sys\windows\thread.rs @ 58] 
2a 0000009e`dacffd90 00007ffc`c6e62651     KERNEL32!BaseThreadInitThunk+0x14
2b 0000009e`dacffdc0 00000000`00000000     ntdll!RtlUserThreadStart+0x21

Check out frame 7

0:009> .frame 7
07 0000009e`dacfd4d0 00000001`8001750e     LIBPQ!libpq_binddomain+0x57 [c:\Users\dcbow\Documents\Code\postgres\src\interfaces\libpq\fe-misc.c @ 1290] 
0:009> dv
           ldir = 0x00000001`80053c70 "/share/locale"
     save_errno = 0n0
  already_bound = true

Check out frame 9

0:009> .frame 9
09 0000009e`dacfd540 00000001`80004ad6     LIBPQ!emitCouldNotConnect+0x1e3 [c:\Users\dcbow\Documents\Code\postgres\src\interfaces\libpq\fe-connect.c @ 1719] 
0:009> dv
 displayed_host = 0x00000243`c5e7abd0 "localhost"
 displayed_port = 0x00000243`c5e7ad10 "5432"
           conn = 0x00000243`c5e6f830
      host_addr = 0x0000009e`dacfe020 "::1"

0:009> dx -r1 ((LIBPQ!pg_conn *)0x243c5e6f830)
((LIBPQ!pg_conn *)0x243c5e6f830)                 : 0x243c5e6f830 [Type: pg_conn *]
    [+0x000] pghost           : 0x243c5e7ab30 : "localhost" [Type: char *]
    [+0x008] pghostaddr       : 0x0 [Type: char *]
    [+0x010] pgport           : 0x243c5e7adb0 : "5432" [Type: char *]
    [+0x018] pgtty            : 0x243c5e56830 : "" [Type: char *]
    [+0x020] connect_timeout  : 0x0 [Type: char *]
    [+0x028] pgtcp_user_timeout : 0x0 [Type: char *]
    [+0x030] client_encoding_initial : 0x0 [Type: char *]
    [+0x038] pgoptions        : 0x243c5e567f0 : "" [Type: char *]
    [+0x040] appname          : 0x0 [Type: char *]
    [+0x048] fbappname        : 0x0 [Type: char *]
    [+0x050] dbName           : 0x243c5e7a4a0 : "todo" [Type: char *]
    [+0x058] replication      : 0x0 [Type: char *]
    [+0x060] pguser           : 0x243c5e7a400 : "postgres" [Type: char *]
    [+0x068] pgpass           : 0x243c5e7a860 : "postgres" [Type: char *]
    [+0x070] pgpassfile       : 0x0 [Type: char *]
    [+0x078] channel_binding  : 0x243c5e7a680 : "disable" [Type: char *]
    [+0x080] keepalives       : 0x0 [Type: char *]
    [+0x088] keepalives_idle  : 0x0 [Type: char *]
    [+0x090] keepalives_interval : 0x0 [Type: char *]
    [+0x098] keepalives_count : 0x0 [Type: char *]
    [+0x0a0] sslmode          : 0x243c5e7a270 : "disable" [Type: char *]
    [+0x0a8] sslcompression   : 0x243c5e56d70 : "0" [Type: char *]
    [+0x0b0] sslkey           : 0x0 [Type: char *]
    [+0x0b8] sslcert          : 0x0 [Type: char *]
    [+0x0c0] sslpassword      : 0x0 [Type: char *]
    [+0x0c8] sslrootcert      : 0x0 [Type: char *]
    [+0x0d0] sslcrl           : 0x0 [Type: char *]
    [+0x0d8] requirepeer      : 0x0 [Type: char *]
    [+0x0e0] gssencmode       : 0x243c5e7a770 : "disable" [Type: char *]
    [+0x0e8] krbsrvname       : 0x243c5e7a590 : "postgres" [Type: char *]
    [+0x0f0] gsslib           : 0x0 [Type: char *]
    [+0x0f8] ssl_min_protocol_version : 0x243c5e7ac20 : "TLSv1.2" [Type: char *]
    [+0x100] ssl_max_protocol_version : 0x0 [Type: char *]
    [+0x108] target_session_attrs : 0x243c5e56e30 : "any" [Type: char *]
    [+0x110] Pfdebug          : 0x0 [Type: _iobuf *]
    [+0x118] noticeHooks      [Type: PGNoticeHooks]
    [+0x138] events           : 0x0 [Type: PGEvent *]
    [+0x140] nEvents          : 0 [Type: int]
    [+0x144] eventArraySize   : 0 [Type: int]
    [+0x148] status           : CONNECTION_NEEDED (8) [Type: ConnStatusType]
    [+0x14c] asyncStatus      : PGASYNC_IDLE (0) [Type: PGAsyncStatusType]
    [+0x150] xactStatus       : PQTRANS_IDLE (0) [Type: PGTransactionStatusType]
    [+0x154] queryclass       : PGQUERY_SIMPLE (0) [Type: PGQueryClass]
    [+0x158] last_query       : 0x0 [Type: char *]
    [+0x160] last_sqlstate    : "" [Type: char [6]]
    [+0x166] options_valid    : true [Type: bool]
    [+0x167] nonblocking      : false [Type: bool]
    [+0x168] singleRowMode    : false [Type: bool]
    [+0x169] copy_is_binary   : 0 [Type: char]
    [+0x16c] copy_already_done : 0 [Type: int]
    [+0x170] notifyHead       : 0x0 [Type: pgNotify *]
    [+0x178] notifyTail       : 0x0 [Type: pgNotify *]
    [+0x180] nconnhost        : 1 [Type: int]
    [+0x184] whichhost        : 0 [Type: int]
    [+0x188] connhost         : 0x243c5e29470 [Type: pg_conn_host *]
    [+0x190] connip           : 0x243c5e56d30 : "::1" [Type: char *]
    [+0x198] sock             : 0x234 [Type: unsigned __int64]
    [+0x1a0] laddr            [Type: SockAddr]
    [+0x228] raddr            [Type: SockAddr]
    [+0x2b0] pversion         : 0x30000 [Type: unsigned int]
    [+0x2b4] sversion         : 0 [Type: int]
    [+0x2b8] auth_req_received : false [Type: bool]
    [+0x2b9] password_needed  : false [Type: bool]
    [+0x2ba] sigpipe_so       : false [Type: bool]
    [+0x2bb] sigpipe_flag     : false [Type: bool]
    [+0x2bc] write_failed     : false [Type: bool]
    [+0x2c0] write_err_msg    : 0x0 [Type: char *]
    [+0x2c8] try_next_addr    : false [Type: bool]
    [+0x2c9] try_next_host    : false [Type: bool]
    [+0x2d0] addrlist         : 0x243c5e56b40 [Type: addrinfo *]
    [+0x2d8] addr_cur         : 0x243c5e56b40 [Type: addrinfo *]
    [+0x2e0] addrlist_family  : 0 [Type: int]
    [+0x2e4] setenv_state     : SETENV_STATE_IDLE (8) [Type: PGSetenvStatusType]
    [+0x2e8] next_eo          : 0x0 [Type: PQEnvironmentOption *]
    [+0x2f0] send_appname     : true [Type: bool]
    [+0x2f4] be_pid           : 0 [Type: int]
    [+0x2f8] be_key           : 0 [Type: int]
    [+0x300] pstatus          : 0x0 [Type: pgParameterStatus *]
    [+0x308] client_encoding  : 0 [Type: int]
    [+0x30c] std_strings      : false [Type: bool]
    [+0x310] verbosity        : PQERRORS_DEFAULT (1) [Type: PGVerbosity]
    [+0x314] show_context     : PQSHOW_CONTEXT_ERRORS (1) [Type: PGContextVisibility]
    [+0x318] lobjfuncs        : 0x0 [Type: pgLobjfuncs *]
    [+0x320] inBuffer         : 0x243c5e6fc40 : "???" [Type: char *]
    [+0x328] inBufSize        : 16384 [Type: int]
    [+0x32c] inStart          : 0 [Type: int]
    [+0x330] inCursor         : 0 [Type: int]
    [+0x334] inEnd            : 0 [Type: int]
    [+0x338] outBuffer        : 0x243c5e744e0 : "???" [Type: char *]
    [+0x340] outBufSize       : 16384 [Type: int]
    [+0x344] outCount         : 0 [Type: int]
    [+0x348] outMsgStart      : 0 [Type: int]
    [+0x34c] outMsgEnd        : 0 [Type: int]
    [+0x350] rowBuf           : 0x243c5e787a0 [Type: pgDataValue *]
    [+0x358] rowBufLen        : 32 [Type: int]
    [+0x360] result           : 0x0 [Type: pg_result *]
    [+0x368] next_result      : 0x0 [Type: pg_result *]
    [+0x370] sasl_state       : 0x0 [Type: void *]
    [+0x378] ssl_in_use       : false [Type: bool]
    [+0x380] sspicred         : 0x0 [Type: _SecHandle *]
    [+0x388] sspictx          : 0x0 [Type: _SecHandle *]
    [+0x390] sspitarget       : 0x0 [Type: char *]
    [+0x398] usesspi          : 0 [Type: int]
    [+0x3a0] errorMessage     [Type: PQExpBufferData]
    [+0x3b8] workBuffer       [Type: PQExpBufferData]
0:009> dx -r1 (*((LIBPQ!PQExpBufferData *)0x243c5e6fbd0))
(*((LIBPQ!PQExpBufferData *)0x243c5e6fbd0))                 [Type: PQExpBufferData]
    [+0x000] data             : 0x243c5e789e0 : "" [Type: char *]
    [+0x008] len              : 0x0 [Type: unsigned __int64]
    [+0x010] maxlen           : 0x100 [Type: unsigned __int64]
0:009> dx -r1 (*((LIBPQ!PQExpBufferData *)0x243c5e6fbd0)).data
(*((LIBPQ!PQExpBufferData *)0x243c5e6fbd0)).data                 : 0x243c5e789e0 : "" [Type: char *]
    0 [Type: char]

This line is:

appendPQExpBuffer(&conn->errorMessage,
  libpq_gettext("could not connect to host \"%s\" (%s), port %s: "),
  displayed_host, host_addr,
  displayed_port);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment