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 1jNwoQ-00054Q-SC for pgsql-bugs@arkaria.postgresql.org; Mon, 13 Apr 2020 10:59:35 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jNwoP-0003jY-9q for pgsql-bugs@arkaria.postgresql.org; Mon, 13 Apr 2020 10:59:33 +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 1jNtTW-0003QG-6p for pgsql-bugs@lists.postgresql.org; Mon, 13 Apr 2020 07:25:47 +0000 Received: from wout1-smtp.messagingengine.com ([64.147.123.24]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jNtTS-0002sm-PH for pgsql-bugs@lists.postgresql.org; Mon, 13 Apr 2020 07:25:45 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.west.internal (Postfix) with ESMTP id 434235F9 for ; Mon, 13 Apr 2020 03:25:39 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Mon, 13 Apr 2020 03:25:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.com; h= from:to:subject:date:message-id:mime-version:content-type; s= fm2; bh=AzxCBlYlQOvTkO7Kg8xop6smp6otWVgjVfIyD4Ncfrc=; b=tU19qGcD oJNm4DPWuIXbJPYVrjjbbfcukFQhD8FiMX7s1SMxKU2CxpqXQZKM/5XyUyCJ6oWJ U1IWWP0AoVG/USRvGO962qu/1g+bdeFCjyadndKMCoDcYT+WARaBSOKIktt6lMv6 MtbBQPBVnAjZM2tR8NKYpZGxsf9pPjRkNFvbilG8+r6R6i2CUCT9fIe1CvZ1Dnnv JCAiT7MC7Kt5rLcyS+ntF5jCu3BNYAam/bQnIUDJk0KEeHirL+YqoqT8RN3/9iiE 4pFmTHNqZgzl3Ge1FfPc866xca6TXGbs0IhpYRCZBVwlYb8eEwl1+/ZChkDqkKZC 1rNagaO8MKWGhQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:message-id :mime-version:subject:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm2; bh=AzxCBlYlQOvTkO7Kg8xop6smp6otW VgjVfIyD4Ncfrc=; b=zIIx+YDOi/Wb//ImAlvDGbedklemMykXmqHAagJT3Xxxf hXm8Vfpl2HAGRALsd8HD9YndLjCIJnIFIphqVxv5PzxhKfDInpGN5N0Ouy833vFi UxytLCbWdYaAfM0ke1gQ//ZfeMbizRQGO6YgA64Mm4NjymHMiW0CV9YTAuaW6LQZ aDfvIlQ2LDRo9VjU32s+ReDM2OKCy8kLD0slVImuBhqIjNdhL4LqInx+9rEFA4Wk QvZNxCYIcJ4zRXxYyotoh484LuwiY/Q0PO9yCK4Hxke0VrABF94mBP+D7+s8yo4D 651zcZiHBpr+nhd6y+uDtrdzdzx6H0PocZC14Ww5Q== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrvdekgdduvddvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkfgggtgesthdttddttd ershenucfhrhhomhepkhhjohhntggrsehfrghsthhmrghilhdrtghomhculdfmrghmihhl ucflohnktggrmdenucffohhmrghinhepghhnuhdrohhrghdpshhtohhpshhtohhpnhhoph drphhlnecukfhppedujeekrddvfeehrdehhedrudeifeenucevlhhushhtvghrufhiiigv pedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehkjhhonhgtrgesfhgrshhtmhgrihhlrd gtohhm X-ME-Proxy: Received: from alfa.kjonca (178235055163.warszawa.vectranet.pl [178.235.55.163]) by mail.messagingengine.com (Postfix) with ESMTPA id 63A543280060 for ; Mon, 13 Apr 2020 03:25:38 -0400 (EDT) Received: from kjonca by alfa.kjonca with local (Exim 4.93) (envelope-from ) id 1jNtTL-007qYT-Pe for pgsql-bugs@lists.postgresql.org; Mon, 13 Apr 2020 09:25:35 +0200 From: kjonca@fastmail.com (Kamil =?iso-8859-2?Q?Jo=F1ca?=) To: pgsql-bugs@lists.postgresql.org Subject: backend crash Date: Mon, 13 Apr 2020 09:25:35 +0200 Message-ID: <87imi37spc.fsf@alfa.kjonca> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk I have problem with (pseudo) random backend crashes. They seems to happen at one query, but not every time. table: --8<---------------cut here---------------start------------->8--- CREATE TABLE digitalocean.log ( ts timestamp with time zone DEFAULT now() NOT NULL, actions jsonb NOT NULL, account text NOT NULL ); ALTER TABLE ONLY digitalocean.log ADD CONSTRAINT log_ts_key UNIQUE (ts); --8<---------------cut here---------------end--------------->8--- query: --8<---------------cut here---------------start------------->8--- with x as (select jsonb_array_elements (actions->'actions')->'id' as id ,ts from digitalocean.log where account='onet') select max(x.id::bigint) from x; --8<---------------cut here---------------end--------------->8--- stacktrace from core: --8<---------------cut here---------------start------------->8--- sudo gdb -c core /usr/lib/postgresql/12/bin/postgres GNU gdb (Debian 9.1-3) 9.1 Copyright (C) 2020 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: . Find the GDB manual and other documentation resources online at: . For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from /usr/lib/postgresql/12/bin/postgres... Reading symbols from /usr/lib/debug/.build-id/20/7804ddc4a915f7f080ecec71883176fde6d69e.debug... [New LWP 1820750] warning: .dynamic section for "/usr/lib/x86_64-linux-gnu/libgnutls.so.30" is not at the expected address (wrong library or version mismatch?) [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". Core was generated by `postgres: parallel worker for PID 1820747 '. Program terminated with signal SIGABRT, Aborted. #0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50 50 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory. (gdb) bt #0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50 #1 0x00007f562e80555b in __GI_abort () at abort.c:79 #2 0x000055f675632af4 in ExceptionalCondition (conditionName=conditionName@entry=0x55f6758523f8 "!(result->tdrefcount == -1)", errorType=errorType@entry=0x55f67568a016 "FailedAssertion", fileName=fileName@entry=0x55f675852008 "/build/postgresql-12-kUaQt8/postgresql-12-12.2/build/../src/backend/utils/cache/typcache.c", lineNumber=lineNumber@entry=2621) at ./build/../src/backend/utils/error/assert.c:54 #3 0x000055f6756309ae in find_or_make_matching_shared_tupledesc (tupdesc=) at ./build/../src/backend/utils/cache/typcache.c:2621 #4 0x000055f675632191 in assign_record_type_typmod (tupDesc=, tupDesc@entry=0x55f6768ac950) at ./build/../src/backend/utils/cache/typcache.c:1815 #5 0x000055f675383328 in BlessTupleDesc (tupdesc=0x55f6768ac950) at ./build/../src/backend/executor/execTuples.c:2056 #6 BlessTupleDesc (tupdesc=tupdesc@entry=0x55f6768ac950) at ./build/../src/backend/executor/execTuples.c:2052 #7 0x000055f6755804fe in elements_worker_jsonb (fcinfo=0x55f6768ab788, as_text=false, funcname=) at ./build/../src/backend/utils/adt/jsonfuncs.c:2030 #8 0x000055f67537f57f in ExecMakeFunctionResultSet (fcache=0x55f67689ee90, econtext=econtext@entry=0x55f67689df48, argContext=0x55f6768ad000, isNull=0x55f67689e5f8, isDone=isDone@entry=0x55f6768ab078) at ./build/../src/backend/executor/execSRF.c:606 #9 0x000055f6753a2b38 in ExecProjectSRF (node=node@entry=0x55f67689dc18, continuing=continuing@entry=false) at ./build/../src/backend/executor/nodeProjectSet.c:175 #10 0x000055f6753a2c1d in ExecProjectSet (pstate=0x55f67689dc18) at ./build/../src/backend/executor/nodeProjectSet.c:105 #11 0x000055f6753a3642 in ExecProcNode (node=0x55f67689dc18) at ./build/../src/include/executor/executor.h:239 #12 ExecResult (pstate=0x55f67689daa0) at ./build/../src/backend/executor/nodeResult.c:115 #13 0x000055f67538858c in ExecProcNode (node=0x55f67689daa0) at ./build/../src/include/executor/executor.h:239 #14 fetch_input_tuple (aggstate=aggstate@entry=0x55f67689d340) at ./build/../src/backend/executor/nodeAgg.c:406 #15 0x000055f67538a348 in agg_retrieve_direct (aggstate=0x55f67689d340) at ./build/../src/backend/executor/nodeAgg.c:1747 #16 ExecAgg (pstate=0x55f67689d340) at ./build/../src/backend/executor/nodeAgg.c:1562 #17 0x000055f67537499c in ExecProcNode (node=0x55f67689d340) at ./build/../src/include/executor/executor.h:239 #18 ExecutePlan (execute_once=, dest=0x55f676846288, direction=, numberTuples=0, sendTuples=, operation=CMD_SELECT, use_parallel_mode=, planstate=0x55f67689d340, estate=0x55f67689d098) at ./build/../src/backend/executor/execMain.c:1646 #19 standard_ExecutorRun (queryDesc=0x55f676847950, direction=, count=0, execute_once=) at ./build/../src/backend/executor/execMain.c:364 #20 0x000055f675379837 in ParallelQueryMain (seg=seg@entry=0x55f6767f9948, toc=toc@entry=0x7f562343f000) at ./build/../src/backend/executor/execParallel.c:1399 #21 0x000055f67522d70f in ParallelWorkerMain (main_arg=) at ./build/../src/backend/access/transam/parallel.c:1431 #22 0x000055f6754644d7 in StartBackgroundWorker () at ./build/../src/backend/postmaster/bgworker.c:834 #23 0x000055f675472504 in do_start_bgworker (rw=) at ./build/../src/backend/postmaster/postmaster.c:5770 #24 maybe_start_bgworkers () at ./build/../src/backend/postmaster/postmaster.c:5996 #25 0x000055f675472f92 in sigusr1_handler (postgres_signal_arg=) at ./build/../src/backend/postmaster/postmaster.c:5167 #26 #27 0x00007f562e8d4fd6 in __GI___select (nfds=nfds@entry=5, readfds=readfds@entry=0x7ffc8caa4420, writefds=writefds@entry=0x0, exceptfds=exceptfds@entry=0x0, timeout=timeout@entry=0x7ffc8caa4380) at ../sysdeps/unix/sysv/linux/select.c:41 #28 0x000055f675473844 in ServerLoop () at ./build/../src/backend/postmaster/postmaster.c:1668 #29 0x000055f67547550d in PostmasterMain (argc=5, argv=) at ./build/../src/backend/postmaster/postmaster.c:1377 #30 0x000055f6751872b4 in main (argc=5, argv=0x55f67679dc40) at ./build/../src/backend/main/main.c:228 (gdb) quit --8<---------------cut here---------------end--------------->8--- --8<---------------cut here---------------start------------->8--- SELECT version(); version ------------------------------------------------------------------------------------------------------------- PostgreSQL 12.2 (Debian 12.2-3.pgdg+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 9.3.0-7) 9.3.0, 64-bit --8<---------------cut here---------------end--------------->8--- -- http://stopstopnop.pl/stop_stopnop.pl_o_nas.html