Re: BUG #16145: Not able to terminate active session

From: Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>
To: MOHAN KUMAR DORAIRAJ <mohankumar(dot)dorairaj(at)globalfoundries(dot)com>
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #16145: Not able to terminate active session
Date: 2019-12-03 15:54:58
Message-ID: 20191203155458.jaauye67db32omk4@development
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

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(at)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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message MOHAN KUMAR DORAIRAJ 2019-12-03 16:26:14 Re: BUG #16145: Not able to terminate active session
Previous Message MOHAN KUMAR DORAIRAJ 2019-12-03 15:12:43 Re: BUG #16145: Not able to terminate active session