pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: olli.pekkola@grundium.com
Subject: BUG #17953: Libpq can stall indefinitely with non-tls localhost (127.0.0.1) connection
Date: Thu, 01 Jun 2023 11:27:05 +0000
Message-ID: <17953-ed19171b0abf0596@postgresql.org> (raw)

The following bug has been logged on the website:

Bug reference:      17953
Logged by:          Olli Pekkola
Email address:      olli.pekkola@grundium.com
PostgreSQL version: 14.6
Operating system:   Linux
Description:        

I can craft a POC if neccessary, precise steps are not super clear at this
time. But the PQexecFinish() stalled several times withtout TLS with the
following stack (with TLS, not a single instance of this is observed):

#0  0x00007fd96e33f3ff in poll () from
target:/lib/x86_64-linux-gnu/libc.so.6
#1  0x0000561c06fdbed2 in poll ()
#2  0x0000561c07664bf0 in pqSocketPoll (end_time=-1, forWrite=0, forRead=1,
sock=<optimized out>) at
src/postgresql-14.6/src/interfaces/libpq/fe-misc.c:1134
#3  pqSocketCheck (conn=conn@entry=0x619000003780, forRead=forRead@entry=1,
forWrite=forWrite@entry=0, end_time=end_time@entry=-1) at
src/interfaces/libpq/fe-misc.c:1075
#4  0x0000561c07665320 in pqWaitTimed (forRead=forRead@entry=1,
forWrite=forWrite@entry=0, conn=conn@entry=0x619000003780,
finish_time=finish_time@entry=-1)
    at src/postgresql-14.6/src/interfaces/libpq/fe-misc.c:1007
#5  0x0000561c0766536c in pqWait (forRead=forRead@entry=1,
forWrite=forWrite@entry=0, conn=conn@entry=0x619000003780) at
src/interfaces/libpq/fe-misc.c:992
#6  0x0000561c07663048 in PQgetResult (conn=0x619000003780) at
src/interfaces/libpq/fe-exec.c:2042
#7  PQgetResult (conn=0x619000003780) at src/interfaces/libpq/fe-exec.c:2007



view thread (3+ messages)  latest in thread

Message-ID: <17953-ed19171b0abf0596@postgresql.org>
Permalink:  ../17953-ed19171b0abf0596@postgresql.org/
Also on:    postgresql.org/message-id/17953-ed19171b0abf0596@postgresql.org

 · 

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: noreply@postgresql.org, pgsql-bugs@lists.postgresql.org, olli.pekkola@grundium.com
  Subject: Re: BUG #17953: Libpq can stall indefinitely with non-tls localhost (127.0.0.1) connection
  In-Reply-To: <17953-ed19171b0abf0596@postgresql.org>

* 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