[pgpool-general: 6601] Pgpool-II + hba + samenet = segfault in libc-2.24.so

.biscuitNinja pgpool at biscuit.ninja
Thu Jun 20 20:52:44 JST 2019


Hello,

We are grateful for anyone who can offer any insight into this issue.

We have two Pgpool-II 4.0.5 nodes under debian setup as a failover 
cluster. There are two PostgreSQL servers in an active/standby 
configuration with streaming replication between them.

We are using Debian Stretch 9.9 (4.9.0-9-amd64 #1 SMP Debian 
4.9.168-1+deb9u3 (2019-06-16) x86_64 GNU/Linux) and libc6:amd64 
2.24-11+deb9u4.

If we enable the pool hba (enable_pool_hba = on) and the pool_hba.conf 
contains only ip addresses in the address column, all seems well.

If we instead use 'samenet' for any of the pool_hba.conf entries, any 
attempts to run a query result in:

psql -U infraweavers --host 192.168.13.17 --dbname draytonmanor -c 
'select * from rides'
psql: server closed the connection unexpectedly
     This probably means the server terminated abnormally
     before or while processing the request.

Here is an excerpt from the log:

Jun 20 11:54:10 dpbdc-pool-1 pgpool[25077]: [70-1] 2019-06-20 11:54:10: 
pid 25077: LOG: new connection received
Jun 20 11:54:10 dpbdc-pool-1 pgpool[25077]: [70-2] 2019-06-20 11:54:10: 
pid 25077: DETAIL: connecting host=dpbdc-pg-hacks.cw.lab port=37500
Jun 20 11:54:10 dpbdc-pool-1 pgpool[24949]: [67-1] 2019-06-20 11:54:10: 
pid 24949: WARNING: child process with pid: 25077 was terminated by 
segmentation fault
Jun 20 11:54:10 dpbdc-pool-1 pgpool[24949]: [68-1] 2019-06-20 11:54:10: 
pid 24949: LOG: fork a new child process with pid: 25087
Jun 20 11:54:10 dpbdc-pool-1 kernel: [75753.670723] pgpool[25077]: 
segfault at 0 ip 00007fb6a21a7cf5 sp 00007ffc71d384b0 error 4 in 
libc-2.24.so[7fb6a2171000+195000]

Working HBA entries:
host    all             postgres 192.168.13.0/24         md5
host    all             infraweavers 192.168.13.0/24         md5
host    all             pgpool 192.168.13.0/24         md5

Broken:
host    all             postgres 192.168.13.0/24         md5
host    all             infraweavers samenet                 md5
host    all             pgpool 192.168.13.0/24         md5

This seems to be an issue for all attempts to run queries via pgpool, 
not just for the infraweavers user. It is also a problem when using 
trust as oppose to md5 authentication.

pgpool.conf:
listen_addresses = '*'
port = 5432
socket_dir = '/var/run/postgresql'
listen_backlog_multiplier = 2
serialize_accept = off
pcp_listen_addresses = '*'
pcp_port = 9898
pcp_socket_dir = '/var/run/postgresql'
backend_hostname0 = 'dpbdc-pg-1'
backend_port0 = 5432
backend_weight0 = 1
backend_data_directory0 = '/var/lib/postgresql/9.5/main/'
backend_flag0 = 'ALLOW_TO_FAILOVER'
backend_hostname1 = 'dpbdc-pg-2'
backend_port1 = 5432
backend_weight1 = 1
backend_data_directory1 = '/var/lib/postgresql/9.5/main/'
backend_flag1 = 'ALLOW_TO_FAILOVER'
enable_pool_hba = on
pool_passwd = 'pool_passwd'
authentication_timeout = 60
allow_clear_text_frontend_auth = off
ssl = off
ssl_ciphers = 'HIGH:MEDIUM:+3DES:!aNULL'
ssl_prefer_server_ciphers = off
num_init_children = 32
max_pool = 4
child_life_time = 300
child_max_connections = 0
connection_life_time = 0
client_idle_limit = 0
log_destination = 'syslog'
log_line_prefix = '%t: pid %p: '   # printf-style string to output at 
beginning of each log line.
log_connections = on
log_hostname = on
log_statement = on
log_per_node_statement = off
log_client_messages = on
log_standby_delay = 'none'
syslog_facility = 'LOCAL0'
syslog_ident = 'pgpool'
pid_file_name = '/var/run/postgresql/pgpool.pid'
logdir = '/var/log/postgresql'
connection_cache = on
reset_query_list = 'ABORT; DISCARD ALL'
replication_mode = off
replicate_select = off
insert_lock = on
replication_stop_on_mismatch = off
failover_if_affected_tuples_mismatch = off
load_balance_mode = off
ignore_leading_white_space = on
black_function_list = 'currval,lastval,nextval,setval'
allow_sql_comments = off
disable_load_balance_on_write = 'transaction'
master_slave_mode = on
master_slave_sub_mode = 'stream'
delay_threshold = 0
health_check_period = 3
health_check_timeout = 20
health_check_user = 'pgpool'
health_check_max_retries = 0
health_check_retry_delay = 1
connect_timeout = 10000
failover_on_backend_error = on
detach_false_primary = off
search_primary_node_timeout = 300
recovery_timeout = 90
client_idle_limit_in_recovery = 0
use_watchdog = on
ping_path = '/bin'
wd_hostname = 'dpbdc-pool-1'
wd_port = 9000
wd_priority = 1
wd_authkey = 'randomlyGeneratedKey'
wd_ipc_socket_dir = '/var/run/postgresql'
delegate_IP = '192.168.13.17'
if_cmd_path = '/usr/bin'
if_up_cmd = 'sudo /sbin/ip addr add 192.168.13.17/21 dev ens18 label 
ens18:0'
if_down_cmd = 'sudo /sbin/ip addr del 192.168.13.17/21 dev ens18'
arping_path = '/usr/bin'
arping_cmd = 'sudo /usr/sbin/arping -U 192.168.13.17 -w 1'
failover_when_quorum_exists = on
failover_require_consensus = on
allow_multiple_failover_requests_from_node = off
wd_monitoring_interfaces_list = 'any'
wd_lifecheck_method = 'query'
wd_interval = 3
wd_life_point = 3
wd_lifecheck_query = 'SELECT 1'
wd_lifecheck_dbname = 'postgres'
wd_lifecheck_user = 'pgpool'
wd_lifecheck_password = ''
other_pgpool_hostname0 = 'dpbdc-pool-2'
other_pgpool_port0 = 5432
other_wd_port0 = 9000
relcache_expire = 0
relcache_size = 256
check_temp_table = on
check_unlogged_table = on
memory_cache_enabled = off



More information about the pgpool-general mailing list