[pgpool-general: 9384] Re: WARNING: failed to lock semaphore

Tatsuo Ishii ishii at postgresql.org
Tue Mar 4 09:26:05 JST 2025


Hi Maria,

Sure.

Assuming you have the patch at /tmp/log_semaphore_removal.patch
and you have the source at /somewhere/pgpool-II-4.4.6:

cd /somewhere/pgpool-II-4.4.6
patch -p1 < ~/log_semaphore_removal.patch

then you can compile and install pgpool as usual.

Let me know if you have further questions.

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

> Dear Tatsuo,
> 
> Thank you for the patch.
> 
> I apologize for the inconvenience, but could you please provide guidance on
> how to apply the patch to our Pgpool installation? As mentioned previously,
> we installed Pgpool from source.
>
> Thank you for your time and assistance.
> 
> Best Regards,
> Maria
> 
> 
> 
> On Sat, Mar 1, 2025 at 6:12 AM Tatsuo Ishii <ishii at postgresql.org> wrote:
> 
>> Hi Maria,
>>
>> > Dear Tatsuo,
>> >
>> > Thank you for your response.
>> >
>> > I understand your point regarding the semaphore acquisition. However, I
>> > would like to clarify that the semaphore error does not occur immediately
>> > after startup. In our experience, the error manifests itself after weeks
>> of
>> > running Pgpool. This behavior has been observed in both our staging and
>> > production environments.
>> >
>> > If the semaphore configuration is established during Pgpool startup, it
>> > seems unusual that it would change weeks later. Could you please
>> elaborate
>> > on what might cause such a delayed configuration change?
>>
>> Ok, the semaphore is definitely created at the start up of pgpool. It
>> should never been removed until pgpool shuts down. If it's removed,
>> that must be a bug of pgpool. There's only 1 place where semaphore is
>> removed (IpcSemaphoreKill). Can you apply attached patch to confirm
>> the function is actually called? If you find semaphore is removed but
>> IpcSemaphoreKill is not called, then the semaphore was removed by
>> someone else.
>>
>> Best reagards,
>> --
>> Tatsuo Ishii
>> SRA OSS K.K.
>> English:
>> https://protect2.fireeye.com/v1/url?k=31323334-501cfaeb-3131568e-454455535732-b2e8c335807c32bc&q=1&e=af34ac69-01a0-4305-af59-968a7ca1f337&u=http%3A%2F%2Fwww.sraoss.co.jp%2Findex_en%2F
>> Japanese:http://www.sraoss.co.jp
>>
>>


More information about the pgpool-general mailing list