Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dwXzl-0000TM-OB for pgsql-bugs@arkaria.postgresql.org; Mon, 25 Sep 2017 18:20:41 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dwXzl-0001TH-B4 for pgsql-bugs@arkaria.postgresql.org; Mon, 25 Sep 2017 18:20:41 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dwXz1-0006yk-FV for pgsql-bugs@postgresql.org; Mon, 25 Sep 2017 18:19:55 +0000 Received: from mail-wr0-x236.google.com ([2a00:1450:400c:c0c::236]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1dwXyw-0003xj-VU for pgsql-bugs@postgresql.org; Mon, 25 Sep 2017 18:19:54 +0000 Received: by mail-wr0-x236.google.com with SMTP id a43so9354249wrc.0 for ; Mon, 25 Sep 2017 11:19:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quandoo-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:message-id:subject:mime-version; bh=bOesf3lRWySqqH8CZKc3bVZ9CT1mgvSVLH1FfheNChE=; b=N+diFN8uNaUR0B0xXKbokf87f5SdRDOE63uqvwso2NBqV7qOnUxWo4E9bhSvcS9LRU T27sxvL1TI5V7NKvKEIQOmPw7VilRhCvP13pGjKB8zQBR2AiDJzKe1H+3kPJdMKqgMSA yyNhDM59F0g3D7+1wisFkJ4HFttjsdtiHMDMjN6ftap37TLBhT6AAPxoRed0oWE9ka9Q VUiB2vMIu824pjaNc5PPDMUaEs6W8jZpEgWweMRfFXa2cmvWG+s/LxXbWzdXuut3xch2 8so7Wqrn3jUtpCmeXTQRUkcTIwQt0R0wUf3H6NFZkj/rEfXzcoroM3y1vu/OoLWl3i1i OR/g== 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:message-id:subject:mime-version; bh=bOesf3lRWySqqH8CZKc3bVZ9CT1mgvSVLH1FfheNChE=; b=YOimkd9m+UEDMoj8U5thWROkse1k87IhfML9mFxrRsxwyFBlm8FnItDkbinKwHRq4Y aqatffuacL6HBd3J9LEcOAtbPLpTX67IIUUaTjGm4pdAzbedFVHgrJG3HCWhMfuGSIYQ S9elRnjdZsU1QkL8zf7HdBV0jiTb/032m1sYWLGlmvC1DAH8fDHwJOS6tu+80L624eyE xe1wiq9mdBKRr/SLDGaHnXNOz2FPUl/6ExPFvOCBZyb0Vb5vw/TfLrgcXR+mZUwuWclr Q0AFZDLEuXm48foadhXopFwMTBYaymhSs3L1jB2jwa6oPcQFOFwiVZZGT2WcY0dsRdQD uDtw== X-Gm-Message-State: AHPjjUhVzapMt43dzC1GDD6bhC89QRGB2KHmQXAl7NZXZFFzWLdWk/0P c9bsCi5XzQhpRP4OzeLNnIffaAroOQk= X-Google-Smtp-Source: AOwi7QBPHCAzRRu/vqrhBK37Mz77CPb5IOgqdYHhNiGApSh5ydoaa+UBQqUm3YoP6YMl0elxmiVtyw== X-Received: by 10.223.161.194 with SMTP id v2mr6837010wrv.45.1506363589545; Mon, 25 Sep 2017 11:19:49 -0700 (PDT) Received: from SierraGolf-Notebook.local.mail (dslb-088-074-197-012.088.074.pools.vodafone-ip.de. [88.74.197.12]) by smtp.gmail.com with ESMTPSA id 133sm62789wmu.4.2017.09.25.11.19.48 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 25 Sep 2017 11:19:48 -0700 (PDT) Date: Mon, 25 Sep 2017 20:19:45 +0200 From: =?utf-8?Q?Sebastian_Gr=C3=B6bler?= To: pgsql-bugs@postgresql.org Message-ID: Subject: Segmentation fault mayhem X-Mailer: Airmail (397) MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="59c948c1_40bda2dc_17309" List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org --59c948c1_40bda2dc_17309 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hey guys, first off a big thank you for providing and maintaining this awesome piec= e of software. So here comes the problem, we are using postgres 9.6.1 (recently upgraded= from 9.2) on Debian Jessie. Our setup consists of a master with wal=5Flevel=3Dlogical which streams t= o a hot standby (used for failover) and the hot standby streams to a =22r= ead slave=22 which is used for BI use-cases. Aside from that we are using the Database Migration Service (DMS) from AW= S to stream our data into a new system which is supposed to replace the B= I =22read slave=22. DMS is required to run on the master and aside from a= user, function, trigger and a table it does not require much more of the= source. We have been in production with 9.6.1 for a couple of weeks without DMS a= nd without any problems. Then we turned on DMS and over the last weekend = we had several segmentation fault crashes. So we turned off DMS and moved= back to =22replica=22 and enabled core dumps. However it seemed that DMS= was not related to the problem as the database kept crashing. This is the log and the core dump backtrace: 2017-09-24 08:26:26 UTC =5B30797-9=5D LOG: =C2=A0server process (PID 3273= 8) was terminated by signal 11: Segmentation fault 2017-09-24 08:26:26 UTC =5B30797-10=5D DETAIL: =C2=A0=46ailed process was= running: select pushnotifi0=5F.pnc=5Fid as pnc=5Fid1=5F2=5F, pushnotifi0= =5F.pnc=5Fc=5Fid as pnc=5Fc=5Fid2=5F2=5F, pushnotifi0=5F.pnc=5Fc=5Fpublic= =5Fid as pnc=5Fc=5Fpu3=5F2=5F, pushnotifi0=5F.pnc=5Fdevice=5Fowner as pnc= =5Fdevi4=5F2=5F, pushnotifi0=5F.pnc=5Ferror as pnc=5Ferro5=5F2=5F, pushno= tifi0=5F.pnc=5Fexpiration=5Fdate as pnc=5Fexpi6=5F2=5F, pushnotifi0=5F.pn= c=5Fmessage as pnc=5Fmess7=5F2=5F, pushnotifi0=5F.pnc=5Fmdi=5Fid as pnc=5F= mdi=5F8=5F2=5F, pushnotifi0=5F.pnc=5Fprovider as pnc=5Fprov9=5F2=5F, push= notifi0=5F.pnc=5Freference=5Fid as pnc=5Fref10=5F2=5F, pushnotifi0=5F.pnc= =5Fretry as pnc=5Fret11=5F2=5F, pushnotifi0=5F.pnc=5Fstatus as pnc=5Fsta1= 2=5F2=5F, pushnotifi0=5F.pnc=5Ftarget=5Fid as pnc=5Ftar13=5F2=5F, pushnot= ifi0=5F.pnc=5Ftarget=5Fpublic=5Fid as pnc=5Ftar14=5F2=5F, pushnotifi0=5F.= pnc=5Ftype as pnc=5Ftyp15=5F2=5F from crm.push=5Fnotifications=5Fcron pus= hnotifi0=5F where pushnotifi0=5F.pnc=5Ftype=3D=241 and pushnotifi0=5F.pnc= =5Freference=5Fid=3D=242 and pushnotifi0=5F.pnc=5Fmdi=5Fid=3D=243 Core was generated by =60postgres: 9.6/main: postgres booking x.x.x.x(xxx= x) SELECT =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 '. Program terminated with signal SIGSEGV, Segmentation fault. =230 =C2=A00x00007fe0c2411721 in EOH=5Fget=5Fflat=5Fsize () (gdb) bt =230 =C2=A00x00007fe0c2411721 in EOH=5Fget=5Fflat=5Fsize () =231 =C2=A00x00007fe0c240e178 in datumEstimateSpace () =232 =C2=A00x00007fe0c231ea9d in EstimateParamListSpace () =233 =C2=A00x00007fe0c22b933d in ExecInitParallelPlan () =234 =C2=A00x00007fe0c22cb316 in ExecGather () =235 =C2=A00x00007fe0c22b9b08 in ExecProcNode () =236 =C2=A00x00007fe0c22b5d26 in standard=5FExecutorRun () =237 =C2=A00x00007fe0c23d6527 in =3F=3F () =238 =C2=A00x00007fe0c23d7b38 in PortalRun () =239 =C2=A00x00007fe0c23d4843 in PostgresMain () =2310 0x00007fe0c21500a8 in =3F=3F () =2311 0x00007fe0c23722b0 in PostmasterMain () =2312 0x00007fe0c2151267 in main () The selected table has about a million records and there is no index on t= he fields in the where clause. The pnc=5Ftype is a custom type, pnc=5Freference=5Fid is a varchar(50) an= d pnc=5Fmdi=5Fid is a uuid. Running the query we were not able to reproduce the problem but we saw th= at postgres would use the parallel query feature. So next we disabled parallel queries by setting the max=5Fparallel=5Fwork= ers=5Fper=5Fgather=3D0 and restarted the server, but we also set back the= wal=5Flevel=3Dlogical. Since we had a crash with wal=5Flevel=3Dreplica and without DMS we ruled = out DMS and wanted to turn it back on. The moment we did, or actually a few seconds later the database crashed a= gain. Here is the log and the core dump backtrace: 2017-09-25 10:27:24 UTC =5B101978-1=5D dms=40booking LOG: =C2=A0starting = logical decoding for slot =22uhbeasbguomldspa=5F00016400=5F846fa332=5F0d7= 3=5F4e40=5Fbef4=5Fda6c7a70c868=22 2017-09-25 10:27:24 UTC =5B101978-2=5D dms=40booking DETAIL: =C2=A0stream= ing transactions committing after B96/1=46D4BB78, reading WAL from B96/1=46= D241C8 2017-09-25 10:27:24 UTC =5B101978-3=5D dms=40booking LOG: =C2=A0logical d= ecoding found consistent point at B96/1=46D241C8 2017-09-25 10:27:24 UTC =5B101978-4=5D dms=40booking DETAIL: =C2=A0There = are no running transactions. 2017-09-25 10:27:25 UTC =5B94708-8=5D LOG: =C2=A0server process (PID 1019= 78) was terminated by signal 11: Segmentation fault 2017-09-25 10:27:25 UTC =5B94708-9=5D LOG: =C2=A0terminating any other ac= tive server processes Core was generated by =60postgres: 9.6/main: wal sender process dms x.x.x= .x(xxxx) idle =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 '. Program terminated with signal SIGSEGV, Segmentation fault. =230 =C2=A00x00007fd3190ccad6 in ReorderBufferCommit () (gdb) bt =230 =C2=A00x00007fd3190ccad6 in ReorderBufferCommit () =231 =C2=A00x00007fd3190c5e00 in LogicalDecodingProcessRecord () =232 =C2=A00x00007fd3190d08a9 in =3F=3F () =233 =C2=A00x00007fd3190d2433 in =3F=3F () =234 =C2=A00x00007fd3190d3282 in exec=5Freplication=5Fcommand () =235 =C2=A00x00007fd319116b35 in PostgresMain () =236 =C2=A00x00007fd318e930a8 in =3F=3F () =237 =C2=A00x00007fd3190b52b0 in PostmasterMain () =238 =C2=A00x00007fd318e94267 in main () Maybe it is important to note that we have two databases in the cluster a= nd that DMS was set up to have one task for each, so there were two logic= al replications running simultaneously. After that last failure we wanted to rule out hardware issues and failed = over to our hot standby. Which is currently running in wal=5Flevel=3Drepl= ica and thus so far without DMS. Soon we would like to switch back to wal=5Flevel=3Dlogical and add DMS ag= ain to confirm that it is a hardware issue. Should the issue persist we will probably upgrade to 9.6.5. We roughly skimmed through the release notes of 9.6.2, 9.6.3, 9.6.4 and 9= .6.5 but couldn't find anything that obviously relates to our problem. Do you guys have any ideas or tips on what the cause may be and what else= to do=3F Thanks for your help=21 Sebastian --59c948c1_40bda2dc_17309 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline