pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tomas Vondra <tomas.vondra@2ndquadrant.com>
To: MOHAN KUMAR DORAIRAJ <mohankumar.dorairaj@globalfoundries.com>
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #16145: Not able to terminate active session
Date: Tue, 3 Dec 2019 16:54:58 +0100
Message-ID: <20191203155458.jaauye67db32omk4@development> (raw)
In-Reply-To: <CANnY_AM9QqhgX1vJB71kag5qvaTgSL7n3pdf=t70dzkGMHvnVw@mail.gmail.com>
References: <16145-d617c77db801047b@postgresql.org>
	<20191203141147.lofq3gwn3u3vkkze@development>
	<CANnY_AM9QqhgX1vJB71kag5qvaTgSL7n3pdf=t70dzkGMHvnVw@mail.gmail.com>

On Tue, Dec 03, 2019 at 11:12:43PM +0800, MOHAN KUMAR DORAIRAJ wrote:
>Dear Tomas
>
>Please find the gdb output and Query.  Query uses oracle_fwd to fetch data
>from Oracle database (f7.l_view_b2b is available in oracle db).
>
>CPU and  memory consumption is not high in this scenario. Kindly help us.
>
>SELECT *
>FROM f7.l_view_b2b v,
>g_map p
>WHERE v.cmer_id =p.pname
>AND p.e_flag = 'Y'
>AND NOT EXISTS
>(SELECT 1
>FROM ap.clot_bk1
>WHERE ld = v.ld
>AND cr_ind = '7'
>AND eventtype = ''COMPLETE'
>AND eventtime = v.claim_time
>)
>
>
>[root@serv ~]# gdb postgres 16647

That's not how you attach GDB to a running process. You need to do

gdb -p 16647

>GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-115.el7
>Copyright (C) 2013 Free Software Foundation, Inc.
>License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html
> ...
>
>debugging symbols found)...done.
>Loaded symbols for /db/oraclnt/12.2.0/lib/libclntshcore.so.12.1
>Reading symbols from /usr/lib64/libnuma.so.1...Reading symbols from
>/usr/lib64/libnuma.so.1...(no debugging symbols found)...done.
>(no debugging symbols found)...done.
>Loaded symbols for /usr/lib64/libnuma.so.1
>Reading symbols from /db/oraclnt/12.2.0/lib/libnque12.so...(no debugging
>symbols found)...done.
>Loaded symbols for /db/oraclnt/12.2.0/lib/libnque12.so
>0x00007f5503e826e0 in __read_nocancel () from /lib64/libpthread.so.0
>Missing separate debuginfos, use: debuginfo-install
>postgresql11-server-11.2-2PGDG.rhel7.x86_64
>

This is not a backtrace, this is just the info GDB shows after start.

But __read_nocancel suggests the process might be stuck in an I/O
request, likely a network call to the Oracle. So maybe it's waiting for
data from oracle_fdw, which means it can't cancel the query.

regards

-- 
Tomas Vondra                  http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services





view thread (15+ messages)  latest in thread

Message-ID: <20191203155458.jaauye67db32omk4@development>
Permalink:  ../20191203155458.jaauye67db32omk4@development/
Also on:    postgresql.org/message-id/20191203155458.jaauye67db32omk4@development

 · 

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-bugs@postgresql.org
  Cc: tomas.vondra@2ndquadrant.com, mohankumar.dorairaj@globalfoundries.com
  Subject: Re: BUG #16145: Not able to terminate active session
  In-Reply-To: <20191203155458.jaauye67db32omk4@development>
  References: <16145-d617c77db801047b@postgresql.org> <20191203141147.lofq3gwn3u3vkkze@development> <CANnY_AM9QqhgX1vJB71kag5qvaTgSL7n3pdf=t70dzkGMHvnVw@mail.gmail.com> <20191203155458.jaauye67db32omk4@development>

* 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