Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1di1Tu-000400-Bi for pgsql-bugs@arkaria.postgresql.org; Wed, 16 Aug 2017 16:47:46 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1di1Tt-0000yP-Um for pgsql-bugs@arkaria.postgresql.org; Wed, 16 Aug 2017 16:47:45 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1di1Tt-0000y1-5m for pgsql-bugs@postgresql.org; Wed, 16 Aug 2017 16:47:45 +0000 Received: from mail-qk0-x22d.google.com ([2607:f8b0:400d:c09::22d]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1di1Tq-0005hX-33 for pgsql-bugs@postgresql.org; Wed, 16 Aug 2017 16:47:43 +0000 Received: by mail-qk0-x22d.google.com with SMTP id o124so14802087qke.3 for ; Wed, 16 Aug 2017 09:47:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=5wRSMYFnftkyMfi30xZX9jpbSU0bwtsITfdqm5vrGHg=; b=PdoKhz/08LAyEpB3VzlvLht7Z3XjXM/5CuugxAI40XAq3B42hWLHQUE6cmwga24VXg xvb/eiaeuL/X2nwgZDLdNekNvc+N6jPFeYOC+X+JnPdX4X2OKrXQm8isE1GTX+K3Xypz VSDKGDc+/+UzfJ9OCyP4GjS0G93zf21nB03FLrl87cOJ+LtLOJS/nlzUqgcuo15KKlRR i3LMhLgxWeSfyirbstqiwYo5am6tG/9TyhGdt+/dkGgpS9JrfLqLKEDXfuZ9boRyJQ9Z 77whug3SGk3h6Zkm7ZyoYJRctzQGI8HKXTWL1+TwTPmV0jjV56tLqVwjjb8cN5ytuYy2 rP5A== 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:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=5wRSMYFnftkyMfi30xZX9jpbSU0bwtsITfdqm5vrGHg=; b=tUen1eT/Vy5X+JyU4icyjFO3WljYSoywnUMHtB7jC3PApvwNqH+nPGDgyK/XGAYrzq rF/g5G9zf4UAtYQF4icM9GS6RdzjrtcYOjAG3xlqldXuiVFF7DHBWbQb/18VYqzalNbS LoJOqD7uUjUUtjBbqG56eGK6GredNSW9Do6Zq3XxrCd0kvzSDPk8T6L0FPp6xbd0Lp3H GCXd45LbF4p3XavqzplPS6nBE3pYrDDaOYzXjcwo7Q1mgNZDNd7KzGCH5zrI1/jvYYEv aId6lpok4Dy8o5CYVxBqJfL5lefzNOSWFspCw5IdtNC5f+wTOEwLzX85fFDS4zIu/FEe Dh5g== X-Gm-Message-State: AHYfb5gH0xvjt1hBRzBqFkCrzYR4MYEGvT9Vi2TXuT9e5d96twaf+Jws OBrfhnxSnhhL61tp X-Received: by 10.55.135.195 with SMTP id j186mr3329145qkd.72.1502902060986; Wed, 16 Aug 2017 09:47:40 -0700 (PDT) Received: from alvin.alvh.no-ip.org ([179.56.50.136]) by smtp.gmail.com with ESMTPSA id z1sm859743qtz.1.2017.08.16.09.47.40 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 16 Aug 2017 09:47:40 -0700 (PDT) Received: by alvin.alvh.no-ip.org (Postfix, from userid 1000) id 9A3317BE; Wed, 16 Aug 2017 13:47:37 -0300 (-03) Date: Wed, 16 Aug 2017 13:47:37 -0300 From: Alvaro Herrera To: Tom Lane Cc: Maksim Karaba , "pgsql-bugs@postgresql.org" Subject: Re: BUG #14781: server process was terminated by signal 11: Segmentation fault Message-ID: <20170816164737.mvd3dl4xgk2ofoia@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <27779.1502900902@sss.pgh.pa.us> User-Agent: NeoMutt/20170306-137-4415bd-dirty (1.8.0) 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 Tom Lane wrote: > Maksim Karaba writes: > > Unfortunately we cannot reproduce this issue on other servers, only on production system. > > And we cannot provide internal database info, schema structure and tables info. > > [ shrug... ] We may just have to wait for somebody to be more > forthcoming. > > FWIW, the stack trace seems to indicate that an incorrect plan has been > generated, ie one that has a remote join node without an EPQ recheck > subplan. That mistake in itself is probably pretty deterministic. The > reason you can't reproduce the crash easily is that the lack of a subplan > only manifests as a crash if we enter the EPQ recheck code, and that only > happens if the query tries to update a row that's just been updated by > some concurrent query. So it's not going to crash except under concurrent > load, which probably also explains why the bug wasn't found long ago. One way to figure out the exact bug is to explore the sequence of WAL records that leads to the tuple causing the crash; it should be possible to create a reproducer by writing an isolationtester script that produces the same WAL sequence. That's how we found the bug fixed in https://git.postgresql.org/pg/commitdiff/459c64d3227f8 for example. > If you want to push this forward rather than wait for somebody else > to hit the problem, you could try adding something like > > if (fsplan->scan.scanrelid == 0 && outerPlanState(node) == NULL && > (estate->es_plannedstmt->commandType != CMD_SELECT || > estate->es_rowMarks)) > elog(WARNING, "foreign join plan lacks EPQ support"); > > near the beginning of postgresBeginForeignScan and then running your app > on a test server. Hmm, is there a reason this cannot be included as a sanity check always? -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs