[pgpool-general: 9380] Re: WARNING: failed to lock semaphore
Maria Nieva
maria.nieva at points.com
Sat Mar 1 06:03:01 JST 2025
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?
Best Regards,
Maria
On Wed, Feb 26, 2025 at 3:19 AM Tatsuo Ishii <ishii at postgresql.org> wrote:
> > Dear Tatsuo,
> >
> > Thank you for your guidance.
> >
> > I followed your instructions and ran gdb on both pgpool 4.1.1 and pgpool
> > 4.4.6. I have the results for your review.
> >
> > *4.4.6*
> >
> > *$ gdb /local/opt/points/pgpool/4.4.6/bin/pgpool*
> >
> > *(gdb) b main.c:363*
> > Breakpoint 1 at 0xf70f: file main/main.c, line 363.
> >
> > *(gdb) run -n -D --config-file=/home/postgres/config/8000/etc/pgpool.conf
> > --hba-file=/home/postgres/config/8000/etc/pool_hba.conf
> > --pcp-file=/home/postgres/config/8000/etc/pcp.conf*
> > Starting program: /local/opt/points/pgpool/4.4.6/bin/pgpool -n -D
> > --config-file=/home/postgres/config/8000/etc/pgpool.conf
> > --hba-file=/home/postgres/config/8000/etc/pool_hba.conf
> > --pcp-file=/home/postgres/config/8000/etc/pcp.conf
> > [Thread debugging using libthread_db enabled]
> > Using host libthread_db library
> "/lib/x86_64-linux-gnu/libthread_db.so.1".
> >
> > Breakpoint 1, main (argc=<optimized out>, argv=<optimized out>) at
> > main/main.c:363
> > 363 pool_semaphore_create(MAX_NUM_SEMAPHORES);
> >
> > *(gdb) s*
> > pool_semaphore_create (numSems=8) at utils/pool_sema.c:79
> > 79 {
> >
> > *(gdb) n*
> > 83 semId = semget(IPC_PRIVATE, numSems, IPC_CREAT |
> IPC_EXCL |
> > IPCProtection);
> >
> > *(gdb) n*
> > 85 if (semId < 0)
> >
> > *(gdb) p semId*
> > $1 = 25
> >
> > *(gdb) p semId*
> > $2 = 25
>
> Pgpool succeeded in acquiring semaphore. Looks good to me. I guess you
> can use Pgpool-II 4.4.6 without the problem you stated.
>
> > (gdb) quit
> >
> > *4.1.1*
> >
> > *$ gdb /local/opt/points/pgpool/4.1.1/bin/pgpool*
> >
> > *(gdb) b main.c:363*
>
> Why line 363? I think you need to set the break point at line 353 in
> case 4.1.1.
>
> 353 pool_semaphore_create(MAX_NUM_SEMAPHORES);
> 354
> 355 PgpoolMain(discard_status, clear_memcache_oidmaps); /* this
> is an infinate
>
> Best reagards,
> --
> Tatsuo Ishii
> SRA OSS K.K.
> English:
> https://protect2.fireeye.com/v1/url?k=31323334-501d2dca-3131568e-454455534531-bbb96eab86ee7dab&q=1&e=ba13bd00-e164-4ab6-b9ad-00eb59fe6d01&u=http%3A%2F%2Fwww.sraoss.co.jp%2Findex_en%2F
> Japanese:http://www.sraoss.co.jp
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.pgpool.net/pipermail/pgpool-general/attachments/20250228/79f9785f/attachment.htm>
More information about the pgpool-general
mailing list