pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedAw: BUG #18312: libpq: PQsetdbLogin() not thread-safe
3+ messages / 2 participants
[nested] [flat]
* Aw: BUG #18312: libpq: PQsetdbLogin() not thread-safe
@ 2024-02-02 10:10 Christian Maurer <c.maurer@gmx.at>
1 sibling, 0 replies; 3+ messages in thread
From: Christian Maurer @ 2024-02-02 10:10 UTC (permalink / raw)
To: pgsql-bugs@lists.postgresql.org
<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>Hi</div>
<div> </div>
<div>I managed to capture a stack trace for the crash via WinDbg:</div>
<div> </div>
<div>Frame Index Call Site Child-SP Return Address<br/>
[0x0] ntdll!NtTerminateProcess+0x14 0x18aa9fdf88 0x7fffce3cda98<br/>
[0x1] ntdll!RtlExitUserProcess+0xb8 0x18aa9fdf90 0x7fffcd99e82b<br/>
[0x2] KERNEL32!ExitProcessImplementation+0xb 0x18aa9fdfc0 0x7fffcd42a155<br/>
[0x3] msvcrt!_crtExitProcess+0x15 0x18aa9fdff0 0x7fffcd42a7c5<br/>
[0x4] msvcrt!doexit+0x171 0x18aa9fe020 0x7fffcd41f26d<br/>
[0x5] msvcrt!abort+0x8d 0x18aa9fe090 0x68281886<br/>
[0x6] libintl_9!libintl_bindtextdomain+0x56 0x18aa9fe640 0x7fff7dcd2e93<br/>
[0x7] LIBPQ!PQenv2encoding+0x1193 0x18aa9fe670 0x7fff7dcd2c9e<br/>
[0x8] LIBPQ!PQenv2encoding+0xf9e 0x18aa9fe6a0 0x7fff7dcc9263<br/>
[0x9] LIBPQ!PQpingParams+0x2ea3 0x18aa9fe6d0 0x7fff7dcc3dcd<br/>
[0xa] LIBPQ!PQconnectPoll+0x90d 0x18aa9feb50 0x7fff7dcc6a1c<br/>
[0xb] LIBPQ!PQpingParams+0x65c 0x18aa9ff5c0 0x7fff7dcc50eb<br/>
[0xc] LIBPQ!PQsetdbLogin+0x19b 0x18aa9ff5f0 0x7ff774798078<br/>
[0xd] _HelloWorld!test+0x98 0x18aa9ff620 0x7ff774796f17</div>
<div> </div>
<div>It seems to me, that it is related to BUG #17299</div>
<div> </div>
<div>Regards,</div>
<div>Christian Maurer<br/>
<br/>
<br/>
</div></div></body></html>
^ permalink raw reply [nested|flat] 3+ messages in thread
* Aw: BUG #18312: libpq: PQsetdbLogin() not thread-safe
@ 2024-02-02 10:21 Christian Maurer <c.maurer@gmx.at>
1 sibling, 1 reply; 3+ messages in thread
From: Christian Maurer @ 2024-02-02 10:21 UTC (permalink / raw)
To: pgsql-bugs@lists.postgresql.org
Hi
(Again. Sorry for the html-formatting in my previous mail.)
I managed to capture a stack trace for the crash via WinDbg:
Frame Index Call Site Child-SP Return Address
[0x0] ntdll!NtTerminateProcess+0x14 0x18aa9fdf88 0x7fffce3cda98
[0x1] ntdll!RtlExitUserProcess+0xb8 0x18aa9fdf90 0x7fffcd99e82b
[0x2] KERNEL32!ExitProcessImplementation+0xb 0x18aa9fdfc0 0x7fffcd42a155
[0x3] msvcrt!_crtExitProcess+0x15 0x18aa9fdff0 0x7fffcd42a7c5
[0x4] msvcrt!doexit+0x171 0x18aa9fe020 0x7fffcd41f26d
[0x5] msvcrt!abort+0x8d 0x18aa9fe090 0x68281886
[0x6] libintl_9!libintl_bindtextdomain+0x56 0x18aa9fe640 0x7fff7dcd2e93
[0x7] LIBPQ!PQenv2encoding+0x1193 0x18aa9fe670 0x7fff7dcd2c9e
[0x8] LIBPQ!PQenv2encoding+0xf9e 0x18aa9fe6a0 0x7fff7dcc9263
[0x9] LIBPQ!PQpingParams+0x2ea3 0x18aa9fe6d0 0x7fff7dcc3dcd
[0xa] LIBPQ!PQconnectPoll+0x90d 0x18aa9feb50 0x7fff7dcc6a1c
[0xb] LIBPQ!PQpingParams+0x65c 0x18aa9ff5c0 0x7fff7dcc50eb
[0xc] LIBPQ!PQsetdbLogin+0x19b 0x18aa9ff5f0 0x7ff774798078
[0xd] _HelloWorld!test+0x98 0x18aa9ff620 0x7ff774796f17
It seems to me, that it is related to BUG #17299
Regards,
Christian Maurer
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Aw: BUG #18312: libpq: PQsetdbLogin() not thread-safe
@ 2024-02-02 15:48 Tom Lane <tgl@sss.pgh.pa.us>
parent: Christian Maurer <c.maurer@gmx.at>
0 siblings, 0 replies; 3+ messages in thread
From: Tom Lane @ 2024-02-02 15:48 UTC (permalink / raw)
To: Christian Maurer <c.maurer@gmx.at>; +Cc: pgsql-bugs@lists.postgresql.org
Christian Maurer <c.maurer@gmx.at> writes:
> I managed to capture a stack trace for the crash via WinDbg:
>
> Frame Index Call Site Child-SP Return Address
> [0x0] ntdll!NtTerminateProcess+0x14 0x18aa9fdf88 0x7fffce3cda98
> [0x1] ntdll!RtlExitUserProcess+0xb8 0x18aa9fdf90 0x7fffcd99e82b
> [0x2] KERNEL32!ExitProcessImplementation+0xb 0x18aa9fdfc0 0x7fffcd42a155
> [0x3] msvcrt!_crtExitProcess+0x15 0x18aa9fdff0 0x7fffcd42a7c5
> [0x4] msvcrt!doexit+0x171 0x18aa9fe020 0x7fffcd41f26d
> [0x5] msvcrt!abort+0x8d 0x18aa9fe090 0x68281886
> [0x6] libintl_9!libintl_bindtextdomain+0x56 0x18aa9fe640 0x7fff7dcd2e93
> [0x7] LIBPQ!PQenv2encoding+0x1193 0x18aa9fe670 0x7fff7dcd2c9e
Hm, so it's bindtextdomain() that is aborting. Back at [1]
I wondered whether we needed to introduce a critical section
to prevent multiple threads from calling that concurrently,
even though its docs allege you shouldn't have to. Perhaps
it's thread-safe except on Windows?
regards, tom lane
[1] https://www.postgresql.org/message-id/flat/CAE7q7Eit4Eq2%3Dbxce%3DFm8HAStECjaXUE%3DWBQc-sDDcgJQ7s7eg...
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2024-02-02 15:48 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-02-02 10:10 ` Christian Maurer <c.maurer@gmx.at>
2024-02-02 10:21 ` Christian Maurer <c.maurer@gmx.at>
2024-02-02 15:48 ` Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox