pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: clemens@sussol.net
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #17299: Exit code 3 when open connections concurrently (PQisthreadsafe() == 1)
Date: Thu, 25 Nov 2021 15:57:32 -0500
Message-ID: <321837.1637873852@sss.pgh.pa.us> (raw)
In-Reply-To: <17299-7270741958c0b1ab@postgresql.org>
References: <17299-7270741958c0b1ab@postgresql.org>

PG Bug reporting form <noreply@postgresql.org> writes:
> We ran into a problem that came up when using diesel-rs to connect to
> postgres. The used connection manager spins up connections concurrently on
> startup. On Windows 10, the app startup of the client fails occasionally
> (thread problem?). The issue can be reproduced in a minimal bin which just
> tries to open 10 connections concurrently (see link *).

I don't know why there'd be such a limit - some weird Windows limitation,
perhaps?  Anyway, the immediate failure seems to be in libintl's gettext
support:

> 04 00007ffa`4f98f2fd     : 00000281`eeb36fe0 00000281`eeb36be0
> 00000281`00000000 00000281`eeb21170 : msvcrt!doexit+0x171
> 05 00000000`68284fe3     : 00000000`00000000 00000000`00000000
> 00000000`00000000 00000000`00000000 : msvcrt!abort+0x8d
> 06 00000000`6828190c     : 00000001`80029288 00000001`80027680
> 00000000`00000000 000000ec`00000000 : libintl_9!libintl_dcigettext+0x643
> 07 00000001`80008313     : 0000212a`1a4222ff 000000ec`7c7fe988
> 00000281`eeb53be0 00007ffa`51e1b9c2 : libintl_9!libintl_dcgettext+0x1c
> 08 00000001`8000387e     : 00000281`eeb21170 00000281`eeb48dc0
> 00000281`eeb21170 00000281`eeb3fdd0 : LIBPQ!PQpingParams+0x2933
> 09 00000001`8000603c     : 00000000`00000000 00000281`eeb21170
> 00000281`eeb01ad0 00000281`eeafc450 : LIBPQ!PQconnectPoll+0x63e
> 0a 00000001`80003168     : 00000281`eeb21170 00000281`eeb01ad0

Maybe you'd be able to get a usable error message if you run the
app under some other locale --- I'd try "C" locale for starters.

gettext() really is not supposed to ever crash like that (at worst,
it's supposed to return the original string if it fails to localize it).
So I think you have grounds for a bug report to the libintl maintainers,
independently of what exactly is causing libpq to want to get a translated
message.

			regards, tom lane





view thread (3+ messages)  latest in thread

Message-ID: <321837.1637873852@sss.pgh.pa.us>
Permalink:  ../321837.1637873852@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/321837.1637873852@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, clemens@sussol.net, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #17299: Exit code 3 when open connections concurrently (PQisthreadsafe() == 1)
  In-Reply-To: <321837.1637873852@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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