Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gK7At-0002X9-Vc for pgsql-general@arkaria.postgresql.org; Tue, 06 Nov 2018 19:38:08 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gK7As-0005Is-1t for pgsql-general@arkaria.postgresql.org; Tue, 06 Nov 2018 19:38:06 +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.89) (envelope-from ) id 1gK7Ar-0005Il-Ox for pgsql-general@lists.postgresql.org; Tue, 06 Nov 2018 19:38:05 +0000 Received: from mxc1.seznam.cz ([2a02:598:a::79:23]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gK7Ap-0007DU-KJ for pgsql-general@lists.postgresql.org; Tue, 06 Nov 2018 19:38:05 +0000 Received: from email.seznam.cz by email-smtpc7a.ko.seznam.cz (email-smtpc7a.ko.seznam.cz [10.53.10.195]) id 4f5e0246bc8f8fa24fcc8a17; Tue, 06 Nov 2018 20:38:00 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=email.cz; s=beta; t=1541533080; bh=61wl85zTr/fJ1/3xbkjxnNY61/zlG6muHzI+9K8MZTM=; h=Received:Subject:To:Cc:References:From:Message-ID:Date:User-Agent: MIME-Version:In-Reply-To:Content-Type:Content-Language: Content-Transfer-Encoding; b=H06TjQITEKl4z3KWhiP5Fsrc0rpQd6wuJvVJzX7ewXR7fTI6ipq340FUhSxL83cS7 VH2UFkZwWvPGQyZT3BAHDUDTsvonA/67wnUMwSa04wyDire/H4GexJw6p6MVf74c4g w54hgx4XaFwd+8TndWQqDggjYdzSXkI04ZdI3OTo= Received: from [192.168.0.110] (ip-94-112-39-7.net.upcbroadband.cz [94.112.39.7]) by email-relay28.ko.seznam.cz (Seznam SMTPD 1.3.102) with ESMTP; Tue, 06 Nov 2018 20:37:58 +0100 (CET) Subject: Re: backend crash on DELETE, reproducible locally To: Alvaro Herrera , =?UTF-8?Q?Ond=c5=99ej_Bouda?= Cc: Tom Lane , pgsql-general@lists.postgresql.org, Karsten Hilbert References: <20181106185255.776mstcyehnc63ty@alvherre.pgsql> From: =?UTF-8?Q?Ond=c5=99ej_Bouda?= Message-ID: <8e260d7c-13e8-b398-14dd-2e079ff7e833@email.cz> Date: Tue, 6 Nov 2018 20:37:58 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20181106185255.776mstcyehnc63ty@alvherre.pgsql> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: cs Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk > Hmm, this one smells like c203d6cf81b4 -- haven't seen any fixes for > that one. Can you share more details on this? I think the failing > update is on table with oid=557732818, but I might be wrong. That's exactly the table, public.schedulecard. We issue an UPDATE changing some of its columns. E.g., UPDATE public.schedulecard SET ext_ident=null, rotates=false,period_num=1,period_day=2 WHERE id=3817 lets the server crash. See the main log: 2018-11-06 17:29:40.031 CET [30202] LOG: server process (PID 29879) was terminated by signal 11: Segmentation fault 2018-11-06 17:29:40.031 CET [30202] DETAIL: Failed process was running: UPDATE public.schedulecard SET ext_ident=null, rotates=false,period_num=1,period_day=2 WHERE id=3817; select * from schedulecard where id = 3817 2018-11-06 17:29:40.031 CET [30202] LOG: terminating any other active server processes The query is reproducible - it always lets the server segfault. It crashes on multiple rows on that table -- actually, I haven't found any non-failing row yet. I thought triggers should be suspected. However, even when all the three triggers have been disabled (ALTER TABLE DISABLE TRIGGER), the UPDATE crashed the server. What else could I try? Regards, Ondřej Bouda Dne 6.11.2018 v 19:52 Alvaro Herrera napsal(a): > On 2018-Nov-06, Ondřej Bouda wrote: > >> So we dumped and restored all our databases. After that, the crash on DELETE >> never occurred (before, it was several times a day). However, the crash on >> UPDATE still occurs on specific rows. We are quite certain no ALTER TABLE >> statement was executed on the table after the restore. >> There are two AFTER INSERT OR UPDATE constraint triggers and one BEFORE >> INSERT OR UPDATE trigger on the table, all of which are implemented in >> plpgsql. Multiple physical servers, on separate databases with identical >> schema, crash on the same type of UPDATE query (different just in concrete >> values to be updated). The same code worked perfectly on 10.x. >> >> See the attached backtrace below. Can we do something else to catch the bug? >> Or can we hope for this bug to be already fixed and released in the upcoming >> version? > > Hmm, this one smells like c203d6cf81b4 -- haven't seen any fixes for > that one. Can you share more details on this? I think the failing > update is on table with oid=557732818, but I might be wrong. >