Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e3YCS-0000rR-F3 for pgsql-hackers@arkaria.postgresql.org; Sun, 15 Oct 2017 01:58:44 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1e3YCR-0007vq-Qd for pgsql-hackers@arkaria.postgresql.org; Sun, 15 Oct 2017 01:58:43 +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 1e3YAu-00054F-F9 for pgsql-hackers@postgresql.org; Sun, 15 Oct 2017 01:57:08 +0000 Received: from mail-io0-x22f.google.com ([2607:f8b0:4001:c06::22f]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1e3YAm-0001Wt-D8 for pgsql-hackers@postgresql.org; Sun, 15 Oct 2017 01:57:07 +0000 Received: by mail-io0-x22f.google.com with SMTP id p186so6469850ioe.12 for ; Sat, 14 Oct 2017 18:56:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=B62+8nSA9+E7GdB8EvdPMz2eQIQnAtA5vBwp6/SPtMI=; b=uF94FZqdsCTX8ghkqyMfPbW84AcfkWxCz9xivRt4Go8sM+Moj6r54AabmzL8AVSCyY KQZiA3nRdNChvKv1sWnpPVBfTUojkjeujEC1KVT5SgPG0R6IAwuCIorEyq9E65vxA6E5 1vJ/r8NERp03Dvhr4vpAcLe2T84Ofvo00WISALEsYMIixzucak2aWHuPuipGGXKAsUQS 4OuHZy6k2t1BzOX8KEH1dKKAXbYJetQ7U2wtownXK2IrGqA5p/iFdqYQdqOSJf75vU+/ jv5/EePc/1zHEPxYvnicqV5jpc2ri6IJehl/uOJcoXAcNqEDWBKmXbvRzIAf1sr+kISx N1VA== 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:references :mime-version:content-disposition:in-reply-to:user-agent; bh=B62+8nSA9+E7GdB8EvdPMz2eQIQnAtA5vBwp6/SPtMI=; b=N1d32vxibElOWKdZuuucwmPUwz8TtrVNDuqZGTMbDC5VEIpO41iDoh4/5t6ukBagzV 06oaUwMg+YcQMulC0dOUgIy5/HGvDX9Br831qN3jQt7+jDTb8CPxVpi8BOIrLPU3XYnp bhLoUTb8FCroZYe7zYm67foZcS6H65se0KBRTUb1tOif/tTCd8PxT1yBVeCm07yz66Yh YcA8w0dK6nshz3j1FZFknaUyn6xQMDSIjmIQg2BR2EHwtgmwHVbsrtaSJY/dt0saos2a P98EEO8xBIasolpMd19m1APS6/54ZFqIZgqOVLKi9WK/+gZw8iLYuVfghfZoF3biM5Ba Satw== X-Gm-Message-State: AMCzsaXOqZv+fBUqAdYm5gvJE/f4eyj16Tm5/K8Qbt9QEzZGSoRAQbOl zK1TPa2TFSKU/RLUIDIDZ0FyjQ== X-Google-Smtp-Source: AOwi7QD0VFAHBGjCDUn0yj/EHnno+b/zTuzRbw+gBqtfpM8IK0d2WNIGANjr3dUIj4UiSEgh1WzTsg== X-Received: by 10.107.129.149 with SMTP id l21mr7406339ioi.193.1508032618148; Sat, 14 Oct 2017 18:56:58 -0700 (PDT) Received: from pryzbyj (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id 80sm560709ioz.54.2017.10.14.18.56.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 14 Oct 2017 18:56:57 -0700 (PDT) Received: by pryzbyj (Postfix, from userid 1000) id E79698014B7; Sat, 14 Oct 2017 20:56:56 -0500 (CDT) Date: Sat, 14 Oct 2017 20:56:56 -0500 From: Justin Pryzby To: Tomas Vondra Cc: pgsql-hackers@postgresql.org, Alvaro Herrera Subject: Re: SIGSEGV in BRIN autosummarize Message-ID: <20171015015656.GC22678@telsasoft.com> References: <20171014035732.GB31726@telsasoft.com> <20171014224220.GB22678@telsasoft.com> <74e6535c-4a96-6a3f-1e04-3068106c6f59@2ndquadrant.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <74e6535c-4a96-6a3f-1e04-3068106c6f59@2ndquadrant.com> User-Agent: Mutt/1.5.23 (2014-03-12) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org On Fri, Oct 13, 2017 at 10:57:32PM -0500, Justin Pryzby wrote: > > Also notice the vacuum process was interrupted, same as yesterday (think > > goodness for full logs). Our INSERT script is using python > > multiprocessing.pool() with "maxtasksperchild=1", which I think means we load > > one file and then exit the subprocess, and pool() creates a new subproc, which > > starts a new PG session and transaction. Which explains why autovacuum starts > > processing the table only to be immediately interrupted. On Sun, Oct 15, 2017 at 01:57:14AM +0200, Tomas Vondra wrote: > I don't follow. Why does it explain that autovacuum gets canceled? I > mean, merely opening a new connection/session should not cancel > autovacuum. That requires a command that requires table-level lock > conflicting with autovacuum (so e.g. explicit LOCK command, DDL, ...). I was thinking that INSERT would do it, but I gather you're right about autovacuum. Let me get back to you about this.. > > Due to a .."behavioral deficiency" in the loader for those tables, the crashed > > backend causes the loader to get stuck, so the tables should be untouched since > > the crash, should it be desirable to inspect them. > > > > It's a bit difficult to guess what went wrong from this backtrace. For > me gdb typically prints a bunch of lines immediately before the frames, > explaining what went wrong - not sure why it's missing here. Do you mean this ? ... Loaded symbols for /lib64/libnss_files-2.12.so Core was generated by `postgres: autovacuum worker process gtt '. Program terminated with signal 11, Segmentation fault. #0 pfree (pointer=0x298c740) at mcxt.c:954 954 (*context->methods->free_p) (context, pointer); > Perhaps some of those pointers are bogus, the memory was already pfree-d > or something like that. You'll have to poke around and try dereferencing > the pointers to find what works and what does not. > > For example what do these gdb commands do in the #0 frame? > > (gdb) p *(MemoryContext)context (gdb) p *(MemoryContext)context Cannot access memory at address 0x7474617261763a20 > (gdb) p *GetMemoryChunkContext(pointer) (gdb) p *GetMemoryChunkContext(pointer) No symbol "GetMemoryChunkContext" in current context. I had to do this since it's apparently inlined/macro: (gdb) p *(MemoryContext *) (((char *) pointer) - sizeof(void *)) $8 = (MemoryContext) 0x7474617261763a20 I uploaded the corefile: http://telsasoft.com/tmp/coredump-postgres-autovacuum-brin-summarize.gz Justin -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers