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 1ic8uI-0006If-7Y for pgsql-bugs@arkaria.postgresql.org; Tue, 03 Dec 2019 14:12:02 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ic8uG-0001Kt-RR for pgsql-bugs@arkaria.postgresql.org; Tue, 03 Dec 2019 14:12:00 +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 1ic8uG-0001Ki-CH for pgsql-bugs@lists.postgresql.org; Tue, 03 Dec 2019 14:12:00 +0000 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1ic8u8-00067H-Vb for pgsql-bugs@lists.postgresql.org; Tue, 03 Dec 2019 14:11:59 +0000 Received: by mail-wm1-x344.google.com with SMTP id q9so2019534wmj.5 for ; Tue, 03 Dec 2019 06:11:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=F22fsKn0PkIkeqXFcT1srkpKoK97GFlZvfDpkjEj73E=; b=DGBggDCfYTjJAxJbC29Dm35AR0zN0nMuDB7eyhB607prhber2YzYag3FM6wwV/5sff tFo9iyk/bBkxzK4cgP1ODIpWdWjUyuMKYdDs+00+wTNmO6sy4xttVG88q4M/QwinHq8b jnCkI++/Du4zhL4dtgpYVcEySEJUuOU2Gk6HBjO24jXI59fCdRIRQeDPCUqdO9yafaPw /mInWiPoA5XcNOkxRK96nSfwPGQ9aXYS5GKbrZwLJJEJlUJ+mAWYa+St9qnsSVK+UjGl ux8XA2ma4Zg+WTh4gUka551eZ9vIKJBNMCocVg4PsqZ3jNEOyzivGmEbQEcmvepVGvVf Be8Q== 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:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=F22fsKn0PkIkeqXFcT1srkpKoK97GFlZvfDpkjEj73E=; b=oT5n6jsdFBhCboa8L7mVo2WSBhB32sq0L0bvFhhNftOCvxcZuuRru0lFB7pi0JjuwP kWa1XqLrs4JFlFD5AqQ5J8CVooSVywEsDRWukHSv3PDbjCsEBt2TgjBITTHDbzwbu34f Ybs0GsHHKKbbKOXkAO3n+k5VN+IsP7UUtj30fyHLLnr+vSOC9rF7cahGJun/wxsJ0HEg lm+X4DRg+feEuV21tcBZTh/iCkzI5cxPDjQczy6+AquUget02k0mAXdDV2dzYupaER4q PLOMV+5CFT9/IwhTNO2oUYUnR0n1VCILs34impGG865jZ/QAt3FfmMAuXUZo9gHr1JGo 7q6A== X-Gm-Message-State: APjAAAWBpAPAVU67JcijQmbsBaQqPh9xtcIbmwJ/+XSeVTREDh9ht0ku RTU6htxweJfB06G83zDtXj8VgQ== X-Google-Smtp-Source: APXvYqwhiivmBlrNXEo5bVRGRlQmst6BBR5cog4ckE4fTHeNYbp1vzjhAPD5KYqny9Bc5jceXWW+Yg== X-Received: by 2002:a1c:3d8a:: with SMTP id k132mr33148827wma.144.1575382311472; Tue, 03 Dec 2019 06:11:51 -0800 (PST) Received: from localhost (static-84-42-175-93.net.upcbroadband.cz. [84.42.175.93]) by smtp.gmail.com with ESMTPSA id l3sm3780720wrt.29.2019.12.03.06.11.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Dec 2019 06:11:50 -0800 (PST) Date: Tue, 3 Dec 2019 15:11:47 +0100 From: Tomas Vondra To: mohankumar.dorairaj@globalfoundries.com, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #16145: Not able to terminate active session Message-ID: <20191203141147.lofq3gwn3u3vkkze@development> References: <16145-d617c77db801047b@postgresql.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <16145-d617c77db801047b@postgresql.org> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Tue, Dec 03, 2019 at 01:18:50PM +0000, PG Bug reporting form wrote: >The following bug has been logged on the website: > >Bug reference: 16145 >Logged by: MOHAN KUMAR DORAIRAJ >Email address: mohankumar.dorairaj@globalfoundries.com >PostgreSQL version: 11.2 >Operating system: Red Hat Enterprise Linux Server release 7.6 (Maipo >Description: > >Not able to terminate active session even though used below commands > >postgres=# SELECT pg_cancel_backend(16647); > pg_cancel_backend >------------------- > t >(1 row) > >postgres=# SELECT pg_terminate_backend(16647); > pg_terminate_backend >---------------------- > t >(1 row) > >postgres=# select pid,application_name FROM pg_stat_activity where >application_name IS NOT NULL AND state = 'active'; > pid | application_name >-------+------------------------ > 16647 | PostgreSQL JDBC Driver > 19879 | psql > So what is happening in 16647? What query is it running? Can you attach gdb to it and show us the backtrace? It's probably running some CPU-intensive piece of code, not checking the flags set by signal handlers, or something like that. regards -- Tomas Vondra http://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services