From: Steffen Heil (Mailinglisten) <lists@steffen-heil.de>
To: Leonardo Frittelli <leonardo.frittelli@gmail.com>
To: Dave Cramer <pg@fastcrypt.com>
Cc: pgsql-jdbc@postgresql.org <pgsql-jdbc@postgresql.org>
Subject: Re: Connection terminated by the server causes deadlock in jdbc client side connection
Date: Thu, 8 Oct 2015 16:46:40 +0000
Message-ID: <543c7dab3e334742b02d18dcf7b2c49a@exchange.sh-solutions.de> (raw)
In-Reply-To: <CACh06N0zooU+zSkdSGMHHNsO2hZXszBNZBHnM=nk_DzxSbHUGA@mail.gmail.com>
References: <CACh06N3O40kLx9YLH6cT8_DTEdRVt+G+tCBAinrjzhtECHfgUQ@mail.gmail.com>
<0c59e097a3ec4139b049b89627fb149f@exchange.sh-solutions.de>
<CADK3HHLsyn=F8V7E8DfbHFFdJJ_EkARqs8FMA8StWTwUB2B1zA@mail.gmail.com>
<CACh06N0zooU+zSkdSGMHHNsO2hZXszBNZBHnM=nk_DzxSbHUGA@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-jdbc>
Hi
> I was referring to the fact that the TCP connection is indeed left 'half
> open'
> with the jdbc client side still assuming it's 'properly' open and thus
> trying to
> send a graceful close command over the socket ("X" in v2 or "X4" in v3) . It
> is
> this action that indefinitely blocks the client thread, which is then no
> longer
> usable by the application.
But it should not block indefinitely. Why would it?
If the server closed the connection, it should reply with a RST and the client
should detect that and throw an IOException( "Socket closed" ).
> All of this said, I still think it is conceptually incorrect to attempt a
> graceful
> closure after an IO error in the client.
Agreed. IOExceptions on blocking sockets usually indicate that you cannot do
anything good with them anymore.
Regards,
Steffen
Attachments:
smime.p7s (application/pkcs7-signature, 6.2K) download
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: lists@steffen-heil.de, leonardo.frittelli@gmail.com, pg@fastcrypt.com
Subject: Re: Connection terminated by the server causes deadlock in jdbc client side connection
In-Reply-To: <543c7dab3e334742b02d18dcf7b2c49a@exchange.sh-solutions.de>
References: <CACh06N3O40kLx9YLH6cT8_DTEdRVt+G+tCBAinrjzhtECHfgUQ@mail.gmail.com> <0c59e097a3ec4139b049b89627fb149f@exchange.sh-solutions.de> <CADK3HHLsyn=F8V7E8DfbHFFdJJ_EkARqs8FMA8StWTwUB2B1zA@mail.gmail.com> <CACh06N0zooU+zSkdSGMHHNsO2hZXszBNZBHnM=nk_DzxSbHUGA@mail.gmail.com> <543c7dab3e334742b02d18dcf7b2c49a@exchange.sh-solutions.de>
* 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