Bug#940220: postgresql-common: pg_ctlcluster segfault

2019-09-16 Thread Chidester, Bryce
I just deployed updates to a small fleet of mostly-identical machines and this 
issue (pg_ scripts enter a recursive loop and consume all available memory) 
happened on just one of them. Went through the usual remove & purge and 
reinstall and the issue persisted. Turned out that I had an old Postgres 
directory in /usr/lib/postgresql (/usr/lib/postgresql/9.4-bak). Once I removed 
this and reinstalled (removed, purged, installed) all the postgresql packages, 
no problems! I was then able to recreate the cluster, reload data, everything 
works normally. Seems something in PgCommon.pm's get_versions function didn't 
like /usr/lib/postgresql/9.4-bak existing.

Maybe this helps you, Andrej.

Regards,
Bryce Chidester
bryce.chides...@calyptix.com
Calyptix Security



Bug#940220: postgresql-common: pg_ctlcluster segfault

2019-09-14 Thread Andrej Dolgij
Package: postgresql-common
Version: 206
Severity: important

Dear Maintainer,


Updates package take a long time with errors


Setting up postgresql-common (206) ...
Deep recursion on subroutine "PgCommon::get_versions" at 
/usr/share/perl5/PgCommon.pm line 706.
Deep recursion on subroutine "PgCommon::get_program_path" at 
/usr/share/perl5/PgCommon.pm line 697.
Deep recursion on subroutine "PgCommon::get_newest_version" at 
/usr/share/perl5/PgCommon.pm line 473.
/var/lib/dpkg/info/postgresql-common.postinst: line 119:  5462 Segmentation 
fault  /usr/share/postgresql-common/pg_checksystem

After update package pg_ctlcluster segfault


Sep 14 08:26:12  kernel: [ 3568.336669] pg_ctlcluster[11631]: segfault at 
7f337617a5d8 ip 564511296591 sp 7fffe5789940 error 6 in 
perl[5645111ff000+15d000]
Sep 14 08:26:12  kernel: [ 3568.336675] Code: c0 74 0c 83 c0 01 41 be 01 00 00 
00 89 42 08 48 63 de 4c 89 ef 48 8d 35 ed 01 00 00 f7 d5 48 89 da e8 23 84 05 
00 49 03 5d 28 <4c> 89 23 41 8b 44 24 0c 25 00 00 e1 08 89 43 0c 41 8b 45 30 44 
88



-- System Information:
Debian Release: bullseye/sid
  APT prefers oldoldstable
  APT policy: (500, 'oldoldstable'), (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.2.0-2-amd64 (SMP w/4 CPU cores)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, 
TAINT_UNSIGNED_MODULE
Locale: LANG=lt_LT.utf8, LC_CTYPE=lt_LT.utf8 (charmap=UTF-8), 
LANGUAGE=lt_LT.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Init: systemd (via /run/systemd/system)

Versions of packages postgresql-common depends on:
ii  adduser   3.118
ii  debconf [debconf-2.0] 1.5.73
ii  lsb-base  11.1.0
ii  postgresql-client-common  206
ii  procps2:3.3.15-2+b1
ii  ssl-cert  1.0.39
ii  ucf   3.0038+nmu1

Versions of packages postgresql-common recommends:
ii  e2fsprogs  1.45.3-4
ii  logrotate  3.15.1-1

Versions of packages postgresql-common suggests:
ii  libjson-perl  4.02000-1

-- Configuration Files:
/etc/postgresql-common/createcluster.conf changed:
ssl = on
cluster_name = '%v/%c'
stats_temp_directory = '/var/run/postgresql/%v-%c.pg_stat_tmp'
log_line_prefix = '%%m [%%p] %%q%%u@%%d '
add_include_dir = 'conf.d'
include_dir '/etc/postgresql-common/createcluster.d'


-- debconf information excluded