[pgpool-general: 9067] Re: Segmentation after switchover

Tatsuo Ishii ishii at sraoss.co.jp
Wed Apr 3 19:36:48 JST 2024


> Thank you for testing the patch.  I have been looking into the source
> code and have found more places where "volatile" is lacking. I will
> come up with a new patch tomorrow.

I have checked the source code and the patch and concluded that it
does not fix anything.

> In the second case make_persistent_db_connection() uses longjmp()
> through PG_TRY/PG_CATCH. In this environment, any variable on the
> stack (and later used in PG_CATCH block) needs to be declared with
> "volatile" modifier so that it is not smashed out when an exception
> occurs. The function missed it. Attached is the patch to fix this.

But since the variable in question "slot" is *not* used (referenced)
in the PG_CATCH block, it does nothing wrong here.

> Thank you for testing the patch.  I have been looking into the source
> code and have found more places where "volatile" is lacking. I will
> come up with a new patch tomorrow.

So far, it seems there's no place "volatile" is needed, and I will not
create additional patches. Probably the segfault is caused by other
reasons.

Best reagards,
--
Tatsuo Ishii
SRA OSS LLC
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp



More information about the pgpool-general mailing list