Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wbZs2-002g3J-00 for pgsql-bugs@arkaria.postgresql.org; Mon, 22 Jun 2026 08:19:06 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wbZs0-005Eab-2w for pgsql-bugs@arkaria.postgresql.org; Mon, 22 Jun 2026 08:19:04 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wbPsn-003tVC-1V for pgsql-bugs@lists.postgresql.org; Sun, 21 Jun 2026 21:39:13 +0000 Received: from mahout.postgresql.org ([2001:4800:3e1:1::227]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wbPsi-00000001es6-1ilI for pgsql-bugs@lists.postgresql.org; Sun, 21 Jun 2026 21:39:12 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=postgresql.org; s=20171124; h=Message-ID:Date:Reply-To:Cc:From:To:Subject: Content-Transfer-Encoding:MIME-Version:Content-Type:Sender:Content-ID: Content-Description:In-Reply-To:References; bh=SEeO8lFFyVf3Amz9R3pFNXAKJRgHWDyBQzPIHg86Zv4=; b=bjg6L1ySt57P1maiOH5ea/DBBh bnCBtYqQObY/lwe007gWlbUOfH6SN6QdV37zinms0ZIxauryK+8LL/a/mc/v7Out2MCMIv8uByzmv L0vNlwvcx1+qugYinXxwfI8dFBW7U3bbojD5laQoMDGLOWw3DJzaiwDCKbLXDCjLUnTYij3ZY+tHB dnI6DxNeBzo8Bw1XOz7s7dXqA2Bt6BUhFVV2elG9DXbKWabPaZvcV2MYTSGgEPN2kBb2qdRrYDEm5 amasZkcb0OFNlhuhJaE5cLSH98DGIsNU2oxLDEu0ZJn8b5hL7g1jB2wmJEmi0lAGnM4fIDj2e6pex iVDI3Xww==; Received: from wrigleys.postgresql.org ([2a02:16a8:dc51::60]) by mahout.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wbPse-004b4d-17 for pgsql-bugs@lists.postgresql.org; Sun, 21 Jun 2026 21:39:05 +0000 Received: from localhost ([127.0.0.1] helo=wrigleys.postgresql.org) by wrigleys.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wbPsd-00AZ33-0v for pgsql-bugs@lists.postgresql.org; Sun, 21 Jun 2026 21:39:03 +0000 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Subject: BUG #19530: Crash (SIGSEGV/SIGBUS) in parallel B-tree index vacuum during plain VACUUM To: pgsql-bugs@lists.postgresql.org From: PG Bug reporting form Cc: webmaster@algedi.pl Reply-To: webmaster@algedi.pl, pgsql-bugs@lists.postgresql.org Date: Sun, 21 Jun 2026 21:38:09 +0000 Message-ID: <19530-c1575dd3b1c8a286@postgresql.org> X-Auto-Response-Suppress: All Auto-Submitted: auto-generated List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk The following bug has been logged on the website: Bug reference: 19530 Logged by: Maciej Email address: webmaster@algedi.pl PostgreSQL version: 17.7 Operating system: FreeBSD 14.4-RELEASE, x86-64 Description: =20 PostgreSQL 17.7 intermittently crashes a parallel maintenance worker during routine VACUUM, taking the server through automatic crash recovery each time. Summary: Recurring backend / parallel-worker terminations with signal 11 (SIGSEGV) and signal 10 (SIGBUS). Each crash is followed by "terminating any other active server processes" and crash recovery (~5 s). It is intermittent: about 16 process terminations over 5 days, with fully clean days in between; the same nightly maintenance succeeds on most days. Hardware was checked and is clean (no MCE/ECC/I/O errors). Environment: PostgreSQL 17.7, FreeBSD 14.4-RELEASE, x86-64, physical server, 256 GB RAM. dynamic_shared_memory_type=3Dposix, huge_pages=3Dtry. max_parallel_workers=3D8, max_parallel_maintenance_workers=3D4, max_parallel_workers_per_gather=3D4. Extensions: pg_stat_statements, pg_trg= m, unaccent, plpgsql only =E2=80=94 no custom C extensions, no PL/Perl/Python. What the crashing process was doing: The crashing process is a parallel maintenance worker. A preserved core dump shows the process title "parallel worker for PID ", with memory contexts "BTree Vacuum State" and "AutoVacuum Data" present and no executor/query state =E2=80=94 i.e. parallel index vacuum, not parallel que= ry. The trigger is a scheduled VACUUM (SKIP_DATABASE_STATS, VERBOSE, ANALYZE) run via vacuumdb over several large tables, each carrying many (~10=E2=80=9330)= btree indexes, so parallel index vacuuming is engaged. The SIGBUS variant is consistent with a DSM (POSIX shared memory) problem in the parallel path. Expected vs actual: Expected: VACUUM completes normally. Actual: a parallel index-vacuum worker crashes (SIGSEGV/SIGBUS) and the server goes through crash recovery. Possibly related: This appears to reach the same btbulkdelete / btvacuumscan code as the report "Segmentation fault in PostgreSQL 17.7 during REINDEX TABLE CONCURRENTLY" (https://www.postgresql.org/message-id/VI0PR07MB10718A4DC292E068C51404AB297= 4EA@VI0PR07MB10718.eurprd07.prod.outlook.com), but reached via the plain-VACUUM index-vacuum path rather than validate_index / ReindexRelationConcurrently. That suggests the fault is in the (parallel) B-tree index-vacuum code, reachable from both paths. Workaround: Setting max_parallel_maintenance_workers =3D 0 (sequential index vacuumin= g) appears to stop the crashes (observation ongoing).