From: Nathan Bossart <nathandbossart@gmail.com>
To: Sami Imseih <samimseih@gmail.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: GetNamedLWLockTranche crashes on Windows in normal backend
Date: Mon, 25 Aug 2025 11:46:35 -0500
Message-ID: <aKyTa-iOdAfKynI1@nathan> (raw)
In-Reply-To: <CAA5RZ0v1_15QPg5Sqd2Qz5rh_qcsyCeHHmRDY89xVHcy2yt5BQ@mail.gmail.com>
References: <CAA5RZ0v1_15QPg5Sqd2Qz5rh_qcsyCeHHmRDY89xVHcy2yt5BQ@mail.gmail.com>
On Fri, Aug 22, 2025 at 02:21:55PM -0500, Sami Imseih wrote:
> While working on [0], I observed that $SUBJECT. I encountered this issue
> while building test cases for [0], and in which GetNamedLWLockTranche is
> called outside of startup.
>
> [...]
>
> I repro'd this on a Windows machine, but one can also enable EXEC_BACKEND
> in pg_config_manual.h and call GetNamedLWLockTranche by a normal backend.
>
> I did this by injecting
> ```
> GetNamedLWLockTranche("pg_stat_statements");
> ```
> inside pgss_ExecutorEnd
If this fails, why doesn't the call in pgss_shmem_startup() also fail? Was
pg_stat_statements not loaded via shared_preload_libraries? And is the
failure a segfault or a "requested tranche is not registered" error?
--
nathan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: nathandbossart@gmail.com, samimseih@gmail.com
Subject: Re: GetNamedLWLockTranche crashes on Windows in normal backend
In-Reply-To: <aKyTa-iOdAfKynI1@nathan>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox