Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iJ5Xn-0002pq-04 for pgsql-hackers@arkaria.postgresql.org; Sat, 12 Oct 2019 00:46:03 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iJ5Wn-0000by-3N for pgsql-hackers@arkaria.postgresql.org; Sat, 12 Oct 2019 00:45:01 +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_SHA1:256) (Exim 4.89) (envelope-from ) id 1iJ5Wm-0000bP-KR for pgsql-hackers@lists.postgresql.org; Sat, 12 Oct 2019 00:45:00 +0000 Received: from mail-io1-xd2d.google.com ([2607:f8b0:4864:20::d2d]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iJ5Wd-0003BZ-TN for pgsql-hackers@lists.postgresql.org; Sat, 12 Oct 2019 00:44:58 +0000 Received: by mail-io1-xd2d.google.com with SMTP id u8so25222877iom.5 for ; Fri, 11 Oct 2019 17:44:51 -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=p3Aoh3qJIOEBc9SHhU+tKyO2HAQ/ckLwkgtxSGp6VdM=; b=JePEKZGY/AFa4cGJxCugVN9/+kHwId5sv+OxTkZmPRyJeGA9UOiciqat9B2YNW+tF2 nEBbcS6szbqCsBTcL8aJGWkF/VyQnDIdK1NFc5BAWFoZltzYl8CNAlSeDk8bWpmpjqqx 2ajoFhQK4oPLIHsB6h0MSjwLOifAK4nwPIVXjQSFAvyQNhNxNCBS6z4DLMJuz84hzHag zWn1NhoTX+6GptfyqH+ZVDYDaRRtQUuIISnY4L4Rtdn7yko0zGgp7gHxkmNVGYVBCTc3 3ayFyp3B4YJwsjgr8FOQdLQgEdXpd7iF14WEuIIo8nF6PM5JBmD0+mT6Z70mDNSv9INw tk4w== 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=p3Aoh3qJIOEBc9SHhU+tKyO2HAQ/ckLwkgtxSGp6VdM=; b=l3G23Vq1t1FmHuuAuYn+ss8ThBuTz96rZ4CiqJYGtq2zgnN3MMH/B/gMIf/zBMxoeN bMWQioZ4j4EsVmi/QSHhApnHPPB46yzs6V5wPnBuIdumY9IqZ7KeVvdj4d2euUJmEsGi BZYHvd6LZcYIHGIFgRZCq8m2dY/E0r3bNmMBPz0TDx0xFOKSnfreEfpUCLoYXSQkLf/J vdj5rjlt4gHwy+58INJwnLUlZjW2hdTW6PD3fF9tciVCi9yPCjv+kLGlJFX2N4lhxiu2 WwQySNqQr40EcUnY2RFO6FLBu71X52hcYJiiG0lO9AmuyMHSuR2imb8apqz9c7aXmmPr BRQw== X-Gm-Message-State: APjAAAVQfmL3gcoR3PWVC9Rg/k631pGcBFSJ3+VbBNILEVzsi3LvmLmk cJqw0BS8g66temPX6tN24RyC4w== X-Google-Smtp-Source: APXvYqwT0PnxwsSeqjKUzboLMqh693F8sszCluMlbbORtLjKTeXLHKSWnEajOtou8o0sNSQ4/AEOcg== X-Received: by 2002:a05:6602:1cc:: with SMTP id w12mr1535491iot.260.1570841089049; Fri, 11 Oct 2019 17:44:49 -0700 (PDT) Received: from pryzbyj (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id z20sm9626357iof.38.2019.10.11.17.44.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 11 Oct 2019 17:44:48 -0700 (PDT) Received: by pryzbyj (Postfix, from userid 1000) id ADA97801D2A; Fri, 11 Oct 2019 19:44:46 -0500 (CDT) Date: Fri, 11 Oct 2019 19:44:46 -0500 From: Justin Pryzby To: pgsql-hackers@lists.postgresql.org Cc: Michael Paquier , Peter Eisentraut , Andreas Karlsson Subject: v12.0: segfault in reindex CONCURRENTLY Message-ID: <20191012004446.GT10470@telsasoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk One of our servers crashed last night like this: < 2019-10-10 22:31:02.186 EDT postgres >STATEMENT: REINDEX INDEX CONCURRENTLY child.eric_umts_rnc_utrancell_hsdsch_eul_201910_site_idx < 2019-10-10 22:31:02.399 EDT >LOG: server process (PID 29857) was terminated by signal 11: Segmentation fault < 2019-10-10 22:31:02.399 EDT >DETAIL: Failed process was running: REINDEX INDEX CONCURRENTLY child.eric_umts_rnc_utrancell_hsdsch_eul_201910_site_idx < 2019-10-10 22:31:02.399 EDT >LOG: terminating any other active server processes ts=# \d+ child.eric_umts_rnc_utrancell_hsdsch_eul_201910_site_idx Index "child.eric_umts_rnc_utrancell_hsdsch_eul_201910_site_idx" Column | Type | Key? | Definition | Storage | Stats target ---------+---------+------+------------+---------+-------------- site_id | integer | yes | site_id | plain | btree, for table "child.eric_umts_rnc_utrancell_hsdsch_eul_201910" That's an index on a table partition, but not itself a child of a relkind=I index. Unfortunately, there was no core file, and I'm still trying to reproduce it. I can't see that the table was INSERTed into during the reindex... But looks like it was SELECTed from, and the report finished within 1sec of the crash: (2019-10-10 22:30:50,485 - p1604 t140325365622592 - INFO): PID 1604 finished running report; est=None rows=552; cols=83; [...] duration:12 postgres=# SELECT log_time, pid, session_id, left(message,99), detail FROM postgres_log_2019_10_10_2200 WHERE pid=29857 OR (log_time BETWEEN '2019-10-10 22:31:02.18' AND '2019-10-10 22:31:02.4' AND NOT message~'crash of another') ORDER BY log_time LIMIT 9; 2019-10-10 22:30:24.441-04 | 29857 | 5d9fe93f.74a1 | temporary file: path "base/pgsql_tmp/pgsql_tmp29857.0.sharedfileset/0.0", size 3096576 | 2019-10-10 22:30:24.442-04 | 29857 | 5d9fe93f.74a1 | temporary file: path "base/pgsql_tmp/pgsql_tmp29857.0.sharedfileset/1.0", size 2809856 | 2019-10-10 22:30:24.907-04 | 29857 | 5d9fe93f.74a1 | process 29857 still waiting for ShareLock on virtual transaction 30/103010 after 333.078 ms | Process holding the lock: 29671. Wait queue: 29857. 2019-10-10 22:31:02.186-04 | 29857 | 5d9fe93f.74a1 | process 29857 acquired ShareLock on virtual transaction 30/103010 after 37611.995 ms | 2019-10-10 22:31:02.186-04 | 29671 | 5d9fe92a.73e7 | duration: 50044.778 ms statement: SELECT fn, sz FROM +| | | | (SELECT file_name fn, file_size_bytes sz, +| | | | | 2019-10-10 22:31:02.399-04 | 1161 | 5d9cad9e.489 | terminating any other active server processes | 2019-10-10 22:31:02.399-04 | 1161 | 5d9cad9e.489 | server process (PID 29857) was terminated by signal 11: Segmentation fault | Failed process was running: REINDEX INDEX CONCURRENTLY child.eric_umts_rnc_utrancell_hsdsch_eul_201910_site_idx Justin