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

Tatsuo Ishii ishii at postgresql.org
Wed Feb 26 17:18:47 JST 2025


> 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: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp


More information about the pgpool-general mailing list