Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1icAX4-0002e1-IZ for pgsql-bugs@arkaria.postgresql.org; Tue, 03 Dec 2019 15:56:10 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1icAW5-0006rO-EP for pgsql-bugs@arkaria.postgresql.org; Tue, 03 Dec 2019 15:55:09 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1icAW5-0006r9-32 for pgsql-bugs@lists.postgresql.org; Tue, 03 Dec 2019 15:55:09 +0000 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1icAVy-0006uF-EE for pgsql-bugs@lists.postgresql.org; Tue, 03 Dec 2019 15:55:07 +0000 Received: by mail-wr1-x442.google.com with SMTP id b18so4277917wrj.8 for ; Tue, 03 Dec 2019 07:55:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=uB9/83FioUfgaHC70q2z7+nMiKGNzTGGyEKt7fRbM+U=; b=So8FhVvxYVQjAMnvclLe1jeULyvc846NxVaR9j2mP2gkoTFS9QlcPDT2Pvprkc1XNn M2huIcTze3Q7qqYGuS5Fnd+u5ZqYJu6UNtzhmoGYRJrM4jjA7fEYsPJhaNdq8uioGTzd 938+LPrGvzqX9ZyUD1YFztJeZJMAX6DjfVoIhmlHJjO7aRHHgocMbYEmoJnMZvciTlNe ap4zSguii6Y+jhE9tKJqukmgqE9oyb7IiC36ONzm5pD4Vc68j6L+naQGjb2w+75FlUiC 5xkUFpmRoVFpi0gKpAguSCz4N8jOZHaYxlNpUAS82n5Wr86GGH7IvleZMNsGs3AhqLPf a6+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=uB9/83FioUfgaHC70q2z7+nMiKGNzTGGyEKt7fRbM+U=; b=tOHADrtDWq7bRTb+DJfbSmp+lNB2qpAl4coAQ/XlHAR8RA2nlpWtYXyiHWIOZZjEzV 3Qjly/XOlzIa0xEE7wzYJ9vqb4yb5xZTBvNn/GFlGJkdY8DcCIZAw60ElGISVZWV2aow m/5s3Lk8G9wfCFTgZRkCTk9axfs0HaONn2qsja9Q4/rWlgLDUYHkLBtERR09xLw+ja6v 1ELlwEedeEpQMQaGiVV5S5AZKMAXeIqsT8czYoHtmRMfTELufw/XZ4b7zQg23HOjbuqE NRHHqVMa7fKTwxo7DhKsbu2jXH6UfAc11/nL+462PKvk+LK6IKr7ClfdiNNtVrXYjfkM Ui0w== X-Gm-Message-State: APjAAAX9a6unNtTwHJcZYlCshg2cWz119rOlkMN9dsuz6eYDQCQWzTR5 QE4GtKVrueOtMidwHyUnje8DHw== X-Google-Smtp-Source: APXvYqxqqcCGWC9peRmPb3CvbeXcEXQCdjU5ILVyN5qc68IgI8sF0BC8jW31sA/TJWt5i2VCIYDg9w== X-Received: by 2002:adf:d0c1:: with SMTP id z1mr6089551wrh.371.1575388500782; Tue, 03 Dec 2019 07:55:00 -0800 (PST) Received: from localhost (static-84-42-175-93.net.upcbroadband.cz. [84.42.175.93]) by smtp.gmail.com with ESMTPSA id n30sm3366889wmd.3.2019.12.03.07.54.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Dec 2019 07:55:00 -0800 (PST) Date: Tue, 3 Dec 2019 16:54:58 +0100 From: Tomas Vondra To: MOHAN KUMAR DORAIRAJ Cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #16145: Not able to terminate active session Message-ID: <20191203155458.jaauye67db32omk4@development> References: <16145-d617c77db801047b@postgresql.org> <20191203141147.lofq3gwn3u3vkkze@development> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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 ... > >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