Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vQ57D-009F16-1e for pgpool-general@arkaria.postgresql.org; Mon, 01 Dec 2025 14:42:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vQ57A-003Eef-34 for pgpool-general@arkaria.postgresql.org; Mon, 01 Dec 2025 14:42:57 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vQ57A-003EeX-2L for pgpool-general@lists.postgresql.org; Mon, 01 Dec 2025 14:42:57 +0000 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vQ576-002ZOT-2E for pgpool-general@lists.postgresql.org; Mon, 01 Dec 2025 14:42:56 +0000 Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-42e2b90ad22so736521f8f.2 for ; Mon, 01 Dec 2025 06:42:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1764600171; x=1765204971; darn=lists.postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=rZmmdB0Bo8i+0LtPYUk3Lyuzi1U0Bw37GCmPvRYLhIk=; b=eARge5MN0x1u3I2xfxu27wp7D7WvdaJs21zHNMUsdjr1G7AiFLAyXpxNbYkVo8mI3t uJLKbL5TPE7lzuyydS46SVkEFIBpsylz050xprefMshMOdGPExzxtCxDhTkm7xa/IZVW lml/Bk6kwgmIgENekZO0Ks3fMYSfLJcbVunyWpOfaJqc9kwY+gDzKp7Euq3XYU/q0gJR qtpQRVlvl364Ew7RGNx3tUNf4rX/iiBsOebZrL+Si6KtsLyMOMwtcpCfgekQU7Vt76Mp Gnp7hofKWBaHiQCBKhwROuFqCAs64SUGZWx+XQ6Fjn61XF971oq+8i/QVQ02rErm1mBp YT6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764600171; x=1765204971; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=rZmmdB0Bo8i+0LtPYUk3Lyuzi1U0Bw37GCmPvRYLhIk=; b=sKpenpLomJech43YDR41C4YA9B7JXYCd87DdHTJi9PW/kE43uCvKKdH6liXpe/+LmV SDltD+t8ZqAuSa+oO7U4pethcSzl57OfN48VuJNa0IV3zyjA61++tF5OMOhgYnu3JEUw LpEMP05Jb8fR1u6RR2zj9u1TrIFHgH65QBtMFF7wmkXcz0mKhPxKzLpBWaDG2xyqWqVT A9cDYH+Bw+M8y0Ds6Jr88siesvZuXNkl3DkjpwRMb21fQ5gGc2pVbB8OWRsLFJq2hK7v w+llXMpWQqr7bsDOtfCad9x1GuJ6AhMfE+1d8iNpcbIq04B0fPAVczf8khwhDe7+97O3 ckHQ== X-Gm-Message-State: AOJu0Yzx4Mj9WPnFFZWa9R9K26H4igPZ0m2NO33LvCasKTxFgnJrs1A5 SJJ7c9GunfoQsNHkX3kf5LKtRfH0M6t3J0hDTCErt+AZGejDaGW37ECpZdzEh4WcVAJZisMK4yN AvRHauep+KIYu9Qqb6fhkodA8qZEpiak= X-Gm-Gg: ASbGncsEhelgVdfQRhQub6gRya0RUbvBTTLoRnXIpDCiQI7iA/Bk86fEqEdd1o0I9oI Ci9D+QKaKCUFyPolzMZBOTFUQY/yZLz1gpcfR6+u9Oho/Lgqcb8h7tHkcnH/IqcWTBkn+ovDyu3 cxSGFylvJ0nBlI3kyYcd6bKE0c6brzmCKkh/T6j6dFOuuDMvlTPIusDRtXcNM1mtYKpVtzHtC16 DE24kxhYLvoMOg/PFaHoYTzjkfLlCt/3NvQaq2DNbXRlfUHOtxKLMonh0wxiywjznJxmNeAbnu+ NXuk6dk= X-Google-Smtp-Source: AGHT+IHfF0vfMnf6/3Y3776WsogYwLC9kVenSQRkbXbeOfKuUgZ2IOMugGHA2Wmcuws52iYVyUYlS788g9tVOxQJ7x4= X-Received: by 2002:a05:6000:1a8e:b0:429:cf88:f7ac with SMTP id ffacd0b85a97d-42cc1d35d6dmr38878564f8f.44.1764600170744; Mon, 01 Dec 2025 06:42:50 -0800 (PST) MIME-Version: 1.0 References: <20251130.102712.131456481338876013.ishii@postgresql.org> In-Reply-To: <20251130.102712.131456481338876013.ishii@postgresql.org> From: zam bak Date: Mon, 1 Dec 2025 09:42:40 -0500 X-Gm-Features: AWmQ_bnFiT310Sz_2ZZeW8_GLuym1EHBiPB3npdTnpgW9wxDEOFEUQ6l26z_iBA Message-ID: Subject: Re: "buffer overflow detected" when running SHOW POOL_STATUS To: Tatsuo Ishii Cc: pgpool-general@lists.postgresql.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Sat, Nov 29, 2025 at 8:27=E2=80=AFPM Tatsuo Ishii = wrote: > > Hello, > > Thank you for the report! > > Unfortunately, I was not able to reproduce the issue on my Ubuntu 24 > and Rocky Linux 10.1 box (pgpool is compiled from source code). > So there are some questions: > > - Is the issue occurred even when you execute other pgpool command? > (for example "show pool_processes") No. Only getting this issue when running SHOW POOL_STATUS > > - I found a problem with the output of "show pool_status". The value > of "memqcache_stats_start_time" is shown with newline and an empty > item followed. I am not sure if this is related to your issue. If > possible, can you please try the attached patch? I suspect you want me to compile it from source (after applying this patch)= . I don't have the setup for this unfortunately. As I mentioned, I did install from RPMs using Rocky Linux 10.1 (with minimal install option) Is there a way to provide RPM instead of the patch? > > Best regards, > -- > Tatsuo Ishii > SRA OSS K.K. > English: http://www.sraoss.co.jp/index_en/ > Japanese:http://www.sraoss.co.jp > > > Hello > > > > I am using the latest pgpool-II v4.6.4 on Rocky Linux v10.1 > > (installation via RPMs) with PostgreSQL 18 (one primary, one replica, > > streaming replication) > > When attempting to run POOL_STATUS command, either as SQL or via pcp, > > I am getting "buffer overflow detected" in the log. > > Here are the contents of the log from both SQL and pcp commands: > > > > 1) > > sudo -u postgres pcp_pool_status -w -v -h localhost -p 9898 -U postgres > > > > 2025-11-27 13:30:19.298 [4486]: [3-1] user=3D[No Connection],db=3D[No > > Connection],app=3Dpcp_main LOG: forked new pcp worker, pid=3D4495 > > socket=3D7 > > 2025-11-27 13:30:19.298 [4486]: [4-1] user=3D[No Connection],db=3D[No > > Connection],app=3Dpcp_main LOCATION: pcp_child.c:327 > > *** buffer overflow detected ***: terminated > > 2025-11-27 13:30:20.315 [4486]: [5-1] user=3D[No Connection],db=3D[No > > Connection],app=3Dpcp_main LOG: PCP process with pid: 4495 exits with > > status 134 by signal 6 > > 2025-11-27 13:30:20.315 [4486]: [6-1] user=3D[No Connection],db=3D[No > > Connection],app=3Dpcp_main LOCATION: pcp_child.c:394 > > > > 2) > > sudo -u postgres psql -w -h localhost -p 9999 -U postgres -c "SHOW POOL= _STATUS" > > > > 2025-11-27 13:31:34.385 [4390]: [1-1] > > user=3Dpostgres,db=3Dpostgres,app=3Dpsql LOG: DB node id: 0 backend pi= d: > > 10166 statement: SELECT pg_catalog.version() > > 2025-11-27 13:31:34.385 [4390]: [2-1] > > user=3Dpostgres,db=3Dpostgres,app=3Dpsql LOCATION: > > pool_proto_modules.c:3803 > > *** buffer overflow detected ***: terminated > > > > > > > > And here is my pgpool.conf file (only changed lines - diff compared to > > pgpool.conf.sample) > > diff --unchanged-line-format=3D --old-line-format=3D > > --new-line-format=3D'%L' pgpool.conf.sample pgpool.conf > > > > listen_addresses =3D '*' > > unix_socket_directories =3D '/var/run/pgpool' > > pcp_socket_dir =3D '/var/run/pgpool' > > serialize_accept =3D on > > backend_hostname0 =3D '192.168.68.104' > > backend_port0 =3D 5432 > > backend_weight0 =3D 1 > > backend_data_directory0 =3D '/data/pgdata/18' > > backend_flag0 =3D 'ALWAYS_PRIMARY' > > backend_application_name0 =3D 'primary' > > backend_hostname1 =3D '192.168.68.105' > > backend_port1 =3D 5432 > > backend_weight1 =3D 1 > > backend_data_directory1 =3D '/data/pgdata/18' > > backend_flag1 =3D 'DISALLOW_TO_FAILOVER' > > backend_application_name1 =3D 'replica_1' > > num_init_children =3D 96 > > max_pool =3D 2 > > child_life_time =3D 0 > > log_line_prefix =3D '%m [%p]: [%l-1] user=3D%u,db=3D%d,app=3D%a ' # > > printf-style string to output at beginning of each log line. > > log_connections =3D off > > log_disconnections =3D off > > log_per_node_statement =3D on > > log_standby_delay =3D 'always' > > log_error_verbosity =3D verbose # terse, default, or verbose m= essages > > log_filename =3D 'pgpool-01-%a.log' > > write_function_list =3D > > 'currval,lastval,nextval,setval,public.upgrade_.*,upgrade_.*,public.upd= ate_.*,update_.*,public.selsert_.*,selsert_.*,public.purge_.*,purge_.*,publ= ic.process_.*,process_.*,public.move_.*,move_.*,public.merge_.*,merge_.*,pu= blic.mark_.*,mark_.*,billing.can_ahs_claim_charge,billing.can_ahs_apply_.*' > > statement_level_load_balance =3D on > > sr_check_period =3D 5s > > sr_check_user =3D 'pgpool_monitor' > > delay_threshold_by_time =3D 500ms > > health_check_period =3D 10 > > health_check_timeout =3D 30 > > health_check_user =3D 'pgpool_monitor' > > health_check_max_retries =3D 10 > > failover_on_backend_error =3D off > > check_temp_table =3D trace > > > >