Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kYYbd-0002Hm-Kh for pgsql-bugs@arkaria.postgresql.org; Fri, 30 Oct 2020 17:54:29 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kYYbc-0000TX-Fm for pgsql-bugs@arkaria.postgresql.org; Fri, 30 Oct 2020 17:54:28 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kYYbc-0000TQ-90 for pgsql-bugs@lists.postgresql.org; Fri, 30 Oct 2020 17:54:28 +0000 Received: from mta97aws110.mxout.inova.com.br ([3.223.97.110] helo=mxhero01.a.inova.com.br) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kYYbW-00034B-Jc for pgsql-bugs@lists.postgresql.org; Fri, 30 Oct 2020 17:54:27 +0000 Received: from ip-10-0-4-78.ec2.internal (localhost [127.0.0.1]) by mxhero01.a.inova.com.br (Postfix) with ESMTP id 747E81CDBBA for ; Fri, 30 Oct 2020 17:54:19 +0000 (UTC) Received: from corpmoutpolicyd01.a.inova.com.br (puppetmaster.a.inova.com.br [10.0.1.88]) by mxhero01.a.inova.com.br (Postfix) with ESMTP; Fri, 30 Oct 2020 17:54:19 +0000 (UTC) Received: from corpmoutpolicyd01.a.inova.com.br (localhost [127.0.0.1]) by corpmoutpolicyd01.a.inova.com.br (Postfix) with ESMTP id 672972209C5; Fri, 30 Oct 2020 15:54:17 -0200 (BRST) Received: from corpmout01.a.inova.com.br (ip-10-0-1-125.ec2.internal [10.0.1.125]) by corpmoutpolicyd01.a.inova.com.br (Postfix) with ESMTP id 5E276C2068; Fri, 30 Oct 2020 15:54:17 -0200 (BRST) Received: from corpmbox02.a.inova.com.br (ip-10-0-4-158.ec2.internal [10.0.4.158]) by corpmout01.a.inova.com.br (Postfix) with ESMTP; Fri, 30 Oct 2020 14:54:17 -0300 (-03) Date: Fri, 30 Oct 2020 14:54:17 -0300 (BRT) From: luis.roberto@siscobra.com.br To: pgsql-bugs Cc: "alan.formagi" Message-ID: <622580997.37108180.1604080457319.JavaMail.zimbra@siscobra.com.br> Subject: segfault with incremental sort MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="=_0a2c2ee1-64fa-4cee-b289-f60a059910ce" X-Originating-IP: [10.0.1.247] X-Mailer: Zimbra 8.8.15_GA_3968 (ZimbraWebClient - GC86 (Win)/8.8.15_GA_3968) Thread-Index: dkXKIb2P8MVxyuautD8W+ZGTgclQIw== Thread-Topic: segfault with incremental sort x-mxHero-Origin-Ip: /127.0.0.1:60522 X-mxHero-AttachmentBlock: rule=48;result=false List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --=_0a2c2ee1-64fa-4cee-b289-f60a059910ce Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Hi! I'm running a query that is causing the server to segfault. This is the plan generated by setting "enable_incremental_sort" to off. [ https://explain.depesz.com/s/T3sY | https://explain.depesz.com/s/T3sY ] setting the option to "on", causes: # 2020-10-30 14:49:06 -03 - - 519945 - - () : LOG:background worker "parallel worker" (PID 522547) was terminated by signal 11: Segmentation faul t # 2020-10-30 14:49:06 -03 - ::1(46826) - 521801 - username- (database_name) : WARNING: terminating connection because of crash of another server process # 2020-10-30 14:49:06 -03 - ::1(46826) - 521801 - username - (database_name) : DETAIL: The postmaster has commanded this server process to roll back the current transaction and exit, because another server process exited abnormally and possibly corrupted shared memory. # 2020-10-30 14:49:06 -03 - ::1(46826) - 521801 - username - ( database_name ) : HINT: In a moment you should be able to reconnect to the database and repeat your command. Running explain only gives the following plan: [ https://explain.depesz.com/s/Eh3F | https://explain.depesz.com/s/Eh3F ] Version: PostgreSQL 13.0 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 8.3.1 20191121 (Red Hat 8.3.1-5), 64-bit Installed via package manager. --=_0a2c2ee1-64fa-4cee-b289-f60a059910ce Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
Hi!

I'm running a query that is causing the server to segfault.

This is the plan generated by setting= "enable_incremental_sort" to off.


setting the= option to "on", causes:

# 2020-10-30 14:49:06 -03 -  - 519945 -&nbs= p; - () : LOG:background worker "parallel worker" (PID 522547) was terminat= ed by signal 11: Segmentation fault
# 20= 20-10-30 14:49:06 -03 - ::1(46826) - 521801 - username- (database_name) : W= ARNING:  terminating connection because of crash of another server pro= cess
# 2020-10-30 14:49:06 -03 - = ::1(46826) - 521801 - username - (database_name) : DETAIL:  The postmaster ha= s commanded this server process to roll back the current transaction and ex= it, because another server process exited abnormally and possibly corrupted= shared memory.
# 2020-10-30 14:4= 9:06 -03 - ::1(46826) - 521801 - username - ( database_name) : HINT:  In a moment you sho= uld be able to reconnect to the database and repeat your command.

Run= ning explain only gives the following plan:


Version:
PostgreSQL 13.0 on x86_64-pc-linux-g= nu, compiled by gcc (GCC) 8.3.1 20191121 (Red Hat 8.3.1-5), 64-bit

Installed via package manager.
--=_0a2c2ee1-64fa-4cee-b289-f60a059910ce--