From: | Sami Imseih <samimseih(at)gmail(dot)com> |
---|---|
To: | Nathan Bossart <nathandbossart(at)gmail(dot)com> |
Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: GetNamedLWLockTranche crashes on Windows in normal backend |
Date: | 2025-08-25 17:58:08 |
Message-ID: | CAA5RZ0u4BDp4ENjOyZ7NADz+jdQY-=PZFQNsf0jBt1Va4QzoAA@mail.gmail.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> 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?
because the array is valid in postmaster, but it's not for a normal backend,
since it's not getting copied.
Yes, pg_stat_statements was loaded via shared_preload_libraries. Nothing
was done out of the ordinary.
> And is the
> failure a segfault or a "requested tranche is not registered" error?
It's a segfault.
--
Sami
From | Date | Subject | |
---|---|---|---|
Next Message | Mihail Nikalayeu | 2025-08-25 18:18:17 | Re: Adding REPACK [concurrently] |
Previous Message | Peter Geoghegan | 2025-08-25 17:57:43 | Re: index prefetching |