Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e3Da7-0003Wf-Sf for pgsql-hackers@arkaria.postgresql.org; Sat, 14 Oct 2017 03:57:48 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1e3Da6-00030y-7P for pgsql-hackers@arkaria.postgresql.org; Sat, 14 Oct 2017 03:57:46 +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 1e3Da4-00030e-72 for pgsql-hackers@postgresql.org; Sat, 14 Oct 2017 03:57:44 +0000 Received: from mail-io0-x234.google.com ([2607:f8b0:4001:c06::234]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1e3DZw-0006zM-0H for pgsql-hackers@postgresql.org; Sat, 14 Oct 2017 03:57:42 +0000 Received: by mail-io0-x234.google.com with SMTP id 101so10905737ioj.3 for ; Fri, 13 Oct 2017 20:57:35 -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:mime-version:content-disposition :user-agent; bh=x2EOSyc11qv5xutGZZF6QOL41Bgyc963aMhuMAvNVUw=; b=CVHnj4DNzz4MzDjz3XmYOQsWjYYz1Way4Stq2HVif+GWHJnbYccomDPGziNdHW1mof ZBrs9MKalQBKmL4YEv23gxU+NFM5ixQ00Ge9/eTj+rD7N48HK5iszPuuk6ds8MRVZsoU P7qLHmrc7bxMLEKjavqgaumVw3sVgOIQycs4894FhOh4FHoY3GOdpfwW4RiD11DTJ7l5 DmbPXmK93isLJfqEh1bTEaSfZHl3JEBlZnsGmjO3staAgO1mffOUDDJNvccfnd7eapxb KaaiPDRsB+WaPWLRM7GUq9v2YF7lY77GWmJKJCITY6caCuV6xvFvugvTZiY9wYMBlVs/ EbuA== 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:user-agent; bh=x2EOSyc11qv5xutGZZF6QOL41Bgyc963aMhuMAvNVUw=; b=SYM8GjHUrgvyeXQV4UNUJGj5APgQitzO4Nc1Ud6JG65n4DJQkAiawjN9OwszONLkEE uAnW0zvoQHzIEPj41ZdLu5WdgHc9JctNEQNQQtspqj/0V1j3BPiEcAF87WCqWeZxush6 3hm1znMmqbYKMkU4MQQCn4nnqyci890gDJSg3OUkSk3IIGgvPDE/Seh5oLZad8gq/aE0 P/4HC9cSv//JjSgByG1oqvslAba+SHpzOGHNExXT/vTTVlmE9kF+fT2NiJWKcNRoJvy/ 1lVqQVzHBlSN/QlaKfeP8K9m5viQLp8FgV82nmG775oBvD0u5osM/xOsTgTNdlz+r6KW Qi/g== X-Gm-Message-State: AMCzsaXRmYixNa9mEJQibfZCR2U7kClDDPEt1oFOgzAB7y5BBLTxS/9t 5W8da+PkIDnoSgY5PgI0kvTgXQ== X-Google-Smtp-Source: ABhQp+Q/tffOi7T4kFbm8W0TFaeid5RGuGMhRNXIpNMvvK3BGvocR6sH/KKxji2Z69jt40TyuiHY7w== X-Received: by 10.107.164.164 with SMTP id d36mr4597668ioj.64.1507953454211; Fri, 13 Oct 2017 20:57:34 -0700 (PDT) Received: from pryzbyj (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id e89sm2204794itd.3.2017.10.13.20.57.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 13 Oct 2017 20:57:33 -0700 (PDT) Received: by pryzbyj (Postfix, from userid 1000) id E6EFB8014B7; Fri, 13 Oct 2017 22:57:32 -0500 (CDT) Date: Fri, 13 Oct 2017 22:57:32 -0500 From: Justin Pryzby To: pgsql-hackers@postgresql.org Cc: Alvaro Herrera Subject: SIGSEGV in BRIN autosummarize Message-ID: <20171014035732.GB31726@telsasoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 I upgraded one of our customers to PG10 Tuesday night, and Wednesday replaced an BTREE index with BRIN index (WITH autosummarize). Today I see: < 2017-10-13 17:22:47.839 -04 >LOG: server process (PID 32127) was terminated by signal 11: Segmentation fault < 2017-10-13 17:22:47.839 -04 >DETAIL: Failed process was running: autovacuum: BRIN summarize public.gtt 747263 postmaster[32127] general protection ip:4bd467 sp:7ffd9b349990 error:0 in postgres[400000+692000] [pryzbyj@database ~]$ rpm -qa postgresql10 postgresql10-10.0-1PGDG.rhel6.x86_64 Oct 13 17:22:45 database kernel: postmaster[32127] general protection ip:4bd467 sp:7ffd9b349990 error:0 in postgres[400000+692000] Oct 13 17:22:47 database abrtd: Directory 'ccpp-2017-10-13-17:22:47-32127' creation detected Oct 13 17:22:47 database abrt[32387]: Saved core dump of pid 32127 (/usr/pgsql-10/bin/postgres) to /var/spool/abrt/ccpp-2017-10-13-17:22:47-32127 (15040512 bytes) ..unfortunately: Oct 13 17:22:47 database abrtd: Package 'postgresql10-server' isn't signed with proper key Oct 13 17:22:47 database abrtd: 'post-create' on '/var/spool/abrt/ccpp-2017-10-13-17:22:47-32127' exited with 1 Oct 13 17:22:47 database abrtd: DELETING PROBLEM DIRECTORY '/var/spool/abrt/ccpp-2017-10-13-17:22:47-32127' postgres=# SELECT * FROM bak_postgres_log_2017_10_13_1700 WHERE pid=32127 ORDER BY log_time DESC LIMIT 9; -[ RECORD 1 ]----------+--------------------------------------------------------------------------------------------------------- log_time | 2017-10-13 17:22:45.56-04 pid | 32127 session_id | 59e12e67.7d7f session_line | 2 command_tag | session_start_time | 2017-10-13 17:21:43-04 error_severity | ERROR sql_state_code | 57014 message | canceling autovacuum task context | processing work entry for relation "gtt.public.cdrs_eric_egsnpdprecord_2017_10_13_recordopeningtime_idx" -[ RECORD 2 ]----------+--------------------------------------------------------------------------------------------------------- log_time | 2017-10-13 17:22:44.557-04 pid | 32127 session_id | 59e12e67.7d7f session_line | 1 session_start_time | 2017-10-13 17:21:43-04 error_severity | ERROR sql_state_code | 57014 message | canceling autovacuum task context | automatic analyze of table "gtt.public.cdrs_huawei_sgsnpdprecord_2017_10_13" Time: 375.552 ms It looks like this table was being inserted into simultaneously by a python program using multiprocessing. It looks like each subprocess was INSERTing into several tables, each of which has one BRIN index on timestamp column. gtt=# \dt+ cdrs_eric_egsnpdprecord_2017_10_13 public | cdrs_eric_egsnpdprecord_2017_10_13 | table | gtt | 5841 MB | gtt=# \di+ cdrs_eric_egsnpdprecord_2017_10_13_recordopeningtime_idx public | cdrs_eric_egsnpdprecord_2017_10_13_recordopeningtime_idx | index | gtt | cdrs_eric_egsnpdprecord_2017_10_13 | 136 kB | I don't have any reason to believe there's memory issue on the server, So I suppose this is just a "heads up" to early adopters until/in case it happens again and I can at least provide a stack trace. Justin -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers