Re: BUG #8647: Backend process hangs and becomes unkillable when SSL client looses connection

Lists: pgsql-bugs
From: valgog(at)gmail(dot)com
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #8647: Backend process hangs and becomes unkillable when SSL client looses connection
Date: 2013-12-02 19:30:15
Message-ID: E1VnZCB-0006dt-W3@wrigleys.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 8647
Logged by: Valentine Gogichashvili
Email address: valgog(at)gmail(dot)com
PostgreSQL version: 9.2.4
Operating system: Linux 3.2.0-48-generic Ubuntu x86_64
Description:

If a TCP connection of the SSL client (psql in our case) is gone, during
execution of a query, that is preparing a big dataset, the process on the
server side (the backend process) becomes unkillable, and as soon as the OS
cleans the TCP connection away, the process starts to consume up to 60% of
system time for it's processor and is still unkillable.

We can reproduce the problem on all the versions from 9.0 up to 9.2. On the
9.3 the problem is unreproducible though.

If needed I could try to do some more experiments and collect dbg and strace
information about that hanging processes.


From: Andres Freund <andres(at)2ndquadrant(dot)com>
To: valgog(at)gmail(dot)com
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #8647: Backend process hangs and becomes unkillable when SSL client looses connection
Date: 2013-12-05 09:59:49
Message-ID: 20131205095949.GA11997@alap2.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

On 2013-12-02 19:30:15 +0000, valgog(at)gmail(dot)com wrote:
> If a TCP connection of the SSL client (psql in our case) is gone, during
> execution of a query, that is preparing a big dataset, the process on the
> server side (the backend process) becomes unkillable, and as soon as the OS
> cleans the TCP connection away, the process starts to consume up to 60% of
> system time for it's processor and is still unkillable.

> If needed I could try to do some more experiments and collect dbg and strace
> information about that hanging processes.

Yes, that would be good. Possibly also a profile showing where time is
spent.

Greetings,

Andres Freund

--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services