Re: [BUG] PostgreSQL crashes with ThreadSanitizer during early initialization

From: Quan Zongliang <quanzongliang(at)yeah(dot)net>
To: Aleksander Alekseev <aleksander(at)tigerdata(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Cc: Emmanuel Sibi <emmanuelsibi(dot)mec(at)gmail(dot)com>
Subject: Re: [BUG] PostgreSQL crashes with ThreadSanitizer during early initialization
Date: 2025-09-10 00:31:33
Message-ID: 21618d68-56b5-4557-b06d-533cc673ea3b@yeah.net
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 9/9/25 10:37 PM, Aleksander Alekseev wrote:
> Hi Emmanuel,
>
>> Thanks for the reply. Yes, I tested with Meson and confirmed the same
>> issue occurs.
>> [...]
>
> OK, thanks for the details. Please don't forget to register your patch
> on the nearest open commitfest:
>
> https://commitfest.postgresql.org/56/
>
> Otherwise it can be lost.
>
I tested this patch. postgres -V no longer crashes.

There is a minor issue. I'm not sure if it's caused by this patch.

The database can only be shut down using the immediate mode.

2025-09-10 08:29:52.667 CST [53336] LOG: received immediate shutdown
request
2025-09-10 08:29:57.771 CST [53336] LOG: issuing SIGKILL to
recalcitrant children
2025-09-10 08:29:57.897 CST [53336] LOG: database system is shut down

Other modes can only indicate that a shutdown request has been received
but cannot actually stop it.

2025-09-10 08:21:13.445 CST [53280] LOG: received fast shutdown request
2025-09-10 08:21:13.446 CST [53280] LOG: aborting any active transactions
2025-09-10 08:21:13.587 CST [53280] LOG: background worker "logical
replication launcher" (PID 53290) exited with exit code 1
2025-09-10 08:21:13.588 CST [53284] LOG: shutting down
2025-09-10 08:21:13.588 CST [53284] LOG: checkpoint starting: shutdown fast
2025-09-10 08:21:13.607 CST [53284] LOG: checkpoint complete: wrote 0
buffers (0.0%), wrote 3 SLRU buffers; 0 WAL file(s) added, 0 removed, 0
recycled; write=0.017 s, sync=0.001 s, total=0.020 s; sync files=2,
longest=0.001 s, average=0.001 s; distance=0 kB, estimate=0 kB;
lsn=0/0178A340, redo lsn=0/0178A340

The smart mode is the same as well.

Best regards,
Quan Zongliang

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeff Davis 2025-09-10 01:28:55 Re: Checkpointer write combining
Previous Message Alexandra Wang 2025-09-09 23:53:04 Re: SQL:2023 JSON simplified accessor support