Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Yq6Tz-0008B7-Rg for pgsql-bugs@arkaria.postgresql.org; Wed, 06 May 2015 21:03:55 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Yq6Tz-0006Bf-CD for pgsql-bugs@arkaria.postgresql.org; Wed, 06 May 2015 21:03:55 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Yq6Ty-0006BZ-Pn for pgsql-bugs@postgresql.org; Wed, 06 May 2015 21:03:54 +0000 Received: from mail.anarazel.de ([217.115.131.40]) by magus.postgresql.org with esmtp (Exim 4.84) (envelope-from ) id 1Yq6Ts-0002JI-4F for pgsql-bugs@postgresql.org; Wed, 06 May 2015 21:03:54 +0000 Received: from intern.anarazel.de (unknown [184.23.178.130]) (Authenticated sender: andres@anarazel.de) by mail.anarazel.de (Postfix) with ESMTPSA id D24A6860001; Wed, 6 May 2015 23:03:46 +0200 (CEST) Date: Wed, 6 May 2015 23:03:39 +0200 From: Andres Freund To: daniel@heroku.com Cc: pgsql-bugs@postgresql.org Subject: Re: BUG #13246: Failure to pg_terminate_backend Message-ID: <20150506210339.GF12506@alap3.anarazel.de> References: <20150506205530.1095.52171@wrigleys.postgresql.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150506205530.1095.52171@wrigleys.postgresql.org> X-Pg-Spam-Score: -4.2 (----) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org On 2015-05-06 20:55:30 +0000, daniel@heroku.com wrote: > Postgres gets stuck in this loop and, not checking for signals, will not > respect the SIGTERM from pg_terminate_backend. This seems like a variant of > other problems I've seen with pg_terminate_backend not being able to > function when one is stuck in Openssl, though it seems that in recent > versions of Postgres that PG provides its own low level I/O functions (e.g. > my_sock_write) and maybe this is fixable? I hope I've fixed this for 9.5. The changes are too invasive to backpatch unfortunately. > #0 0x00007fe42be95462 in send () from /lib/x86_64-linux-gnu/libc.so.6 > #1 0x00007fe42dcbc487 in my_sock_write (h=0x7fe42efa5eb0, buf= out>, size=) > at > /tmp/buildd/postgresql-9.4-9.4.1/build/../src/backend/libpq/be-secure.c:516 > #2 0x00007fe42cdd4667 in BIO_write () from > /lib/x86_64-linux-gnu/libcrypto.so.1.0.0 > #3 0x00007fe42d0f0260 in ?? () from /lib/x86_64-linux-gnu/libssl.so.1.0.0 > #4 0x00007fe42d0f0984 in ?? () from /lib/x86_64-linux-gnu/libssl.so.1.0.0 > #5 0x00007fe42dcbd1d5 in secure_write (port=0x7fe42efa51b0, > ptr=0x7fe42efaad90, len=) > at Yep, we're stuck writing something and we can't, in older versions, accept cancel interrupts there because we're inside openssl. Greetings, Andres Freund -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs