pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
Cc: Daniel Gustafsson <daniel@yesql.se>
Cc: Fabien COELHO <coelho@cri.ensmp.fr>
Cc: pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: psql: Add test for query canceling
Date: Sun, 22 Aug 2021 17:40:36 -0400
Message-ID: <42873.1629668436@sss.pgh.pa.us> (raw)
In-Reply-To: <1983764.1629499242@sss.pgh.pa.us>
References: <E1mH14Q-0002gh-HS@gemulon.postgresql.org>
	<DD279DFC-DD59-458E-B469-75DC941765A4@yesql.se>
	<alpine.DEB.2.22.394.2108201736060.498998@pseudo>
	<5F16EBAA-30D3-4C0D-840C-C2FF2739E370@yesql.se>
	<1957503.1629485278@sss.pgh.pa.us>
	<E92FAE70-66D7-4826-88D0-379004D385C7@yesql.se>
	<1983764.1629499242@sss.pgh.pa.us>

I see that c818c25f4 worked around sidewinder's issue with
this test, but wrasse is still unhappy.  I was able to
duplicate the problem on wrasse's host, so I ran it under
truss to see if I could see what's happening.

What the truss log shows is that the Perl script successfully
reads psql.pid and issues kill(SIGINT) to the correct process
... but very shortly thereafter it issues kill(SIGTERM) to the
same process, so of course psql goes belly-up and doesn't
complete the test.

I suppose this is some undocumented interaction between IPC::Run
and the SIGALRM signal handler.  I stand by the recommendation
that you need to not use a signal handler here.

			regards, tom lane





view thread (20+ messages)  latest in thread

Message-ID: <42873.1629668436@sss.pgh.pa.us>
Permalink:  ../42873.1629668436@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/42873.1629668436@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 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-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, peter.eisentraut@enterprisedb.com, daniel@yesql.se, coelho@cri.ensmp.fr
  Subject: Re: pgsql: psql: Add test for query canceling
  In-Reply-To: <42873.1629668436@sss.pgh.pa.us>
  References: <E1mH14Q-0002gh-HS@gemulon.postgresql.org> <DD279DFC-DD59-458E-B469-75DC941765A4@yesql.se> <alpine.DEB.2.22.394.2108201736060.498998@pseudo> <5F16EBAA-30D3-4C0D-840C-C2FF2739E370@yesql.se> <1957503.1629485278@sss.pgh.pa.us> <E92FAE70-66D7-4826-88D0-379004D385C7@yesql.se> <1983764.1629499242@sss.pgh.pa.us> <42873.1629668436@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