Your message dated Mon, 11 Jul 2016 15:56:29 +0000 with message-id <[email protected]> and subject line Bug#828769: fixed in pgpool2 3.5.3-1 has caused the Debian Bug report #828769, regarding pgpool2: stale socket files after systemd kills pgpool processes duringstop to be marked as done.
This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the Bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact [email protected] immediately.) -- 828769: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=828769 Debian Bug Tracking System Contact [email protected] with problems
--- Begin Message ---Package: pgpool2 Version: 3.4.3-1 Severity: minor Dear Maintainer, I'm having an issue with stale pgpool2 socket files if systemd had killed the pgpool processes while in progress of stopping pgpool2. First of all, there is a systemd.service file for pgpool2 in /lib/systemd/system/pgpool2.service. As it does not specify an explicit ExecStop, default systemd.kill is used - first all pgpool processes will receive a SIGTERM signal and, after a timeout of 90s, all remaining processes get a final SIGKILL. In my setups, sometimes stopping pgpool2 takes longer than the above mentioned timeout (maybe long running SQL queries or so) - here SIGKILL kicks in. In (rare) cases where pgpool somehow has locked up it may also refuse to kindly exit cleanly - also here SIGKILL will used when trying to use systemd to stop pgpool2. When the processes get killed hard, they will leave residues in $socket_dir. srwxrwxrwx 1 postgres postgres 0 Jun 23 07:02 /var/run/postgresql/.s.PGSQL.5432 srwxrwxrwx 1 postgres postgres 0 Jun 23 07:02 /var/run/postgresql/.s.PGSQL.9898 (On the next start|during a restart), pgpool2 will finally fail to start claiming that the socket file(s) already exist(s). Like: pgpool[7643]: [5-1] 2016-06-27 16:58:00: pid 7643: FATAL: failed to bind a socket: "/var/run/postgresql/.s.PGSQL.9898" pgpool[7643]: [5-2] 2016-06-27 16:58:00: pid 7643: DETAIL: bind socket failed with error: "Address already in use" As a first-aid I have added two ExecStartPre's to pgpool2.service that will cleanup the sockets - if there is no more running pgpool process - before trying to start pgpool2. ExecStartPre=/bin/bash -c "{ /usr/bin/test -s /var/run/postgresql/pgpool.pid && ! /usr/bin/pgrep --pidfile /var/run/postgresql/pgpool.pid; } || { /usr/bin/test ! -s /var/run/postgresql/pgpool.pid && ! /usr/bin/pgrep pgpool; } && { /usr/bin/test -S /var/run/postgresql/.s.PGSQL.9898 && /bin/rm /var/run/postgresql/.s.PGSQL.9898; } || /usr/bin/test ! -S /var/run/postgresql/.s.PGSQL.9898" ExecStartPre=/bin/bash -c "{ /usr/bin/test -s /var/run/postgresql/pgpool.pid && ! /usr/bin/pgrep --pidfile /var/run/postgresql/pgpool.pid; } || { /usr/bin/test ! -s /var/run/postgresql/pgpool.pid && ! /usr/bin/pgrep pgpool; } && { /usr/bin/test -S /var/run/postgresql/.s.PGSQL.5432 && /bin/rm /var/run/postgresql/.s.PGSQL.5432; } || /usr/bin/test ! -S /var/run/postgresql/.s.PGSQL.5432" Rather hacky with the hardcoded socket filenames. Otherwise IMHO 'port' and 'pcp_port' parameters from pgpool.conf needs to be looked up first to guess the socket names. My question - do you see a cleaner way to handle that situation? -- System Information: Debian Release: 8.5 APT prefers stable APT policy: (500, 'stable') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 3.16.0-4-amd64 (SMP w/3 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system)
--- End Message ---
--- Begin Message ---Source: pgpool2 Source-Version: 3.5.3-1 We believe that the bug you reported is fixed in the latest version of pgpool2, which is due to be installed in the Debian FTP archive. A summary of the changes between this version and the previous one is attached. Thank you for reporting the bug, which will now be closed. If you have further comments please address them to [email protected], and the maintainer will reopen the bug report if appropriate. Debian distribution maintenance software pp. Adrian Vondendriesch <[email protected]> (supplier of updated pgpool2 package) (This message was generated automatically at their request; if you believe that there is a problem with it please contact the archive administrators by mailing [email protected]) -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 Format: 1.8 Date: Sat, 18 Jun 2016 13:01:33 +0200 Source: pgpool2 Binary: pgpool2 pgpool2-dbg libpgpool0 libpgpool-dev postgresql-9.5-pgpool2 Architecture: source amd64 Version: 3.5.3-1 Distribution: unstable Urgency: medium Maintainer: Debian PostgreSQL Maintainers <[email protected]> Changed-By: Adrian Vondendriesch <[email protected]> Description: libpgpool-dev - pgpool control protocol library - headers libpgpool0 - pgpool control protocol library pgpool2 - connection pool server and replication proxy for PostgreSQL pgpool2-dbg - debugging symbols for pgpool2 and libpgpool0 postgresql-9.5-pgpool2 - connection pool server and replication proxy for PostgreSQL - mod Closes: 828769 Changes: pgpool2 (3.5.3-1) unstable; urgency=medium . * Imported Upstream version 3.5.3 (Closes: 828769). * Add myself to uploaders. * Bump standards version to 3.9.8. * Ship empty pool_passwd file to prevent startup failure. * Add flex to B-D. Checksums-Sha1: 7451b1500cd0680f8ee13d9b6e5ef8cf51c2aa78 2431 pgpool2_3.5.3-1.dsc fe731cbe0dc877868676809ff67c90c83533b65f 2232527 pgpool2_3.5.3.orig.tar.gz 6747e8019904b64d958f2f5503d310afec250c82 12068 pgpool2_3.5.3-1.debian.tar.xz ea061c35b70166336363a1cb78c6a1ff0d3069d4 33006 libpgpool-dev_3.5.3-1_amd64.deb 236702aa5720beb9d72ce2139323ee35321935d6 26534 libpgpool0_3.5.3-1_amd64.deb 37a85874cf8fce6ec90c220899f092c08847289d 1475496 pgpool2-dbg_3.5.3-1_amd64.deb 0fe66f8d7c42be52b5572a747ebdd17114445f59 994690 pgpool2_3.5.3-1_amd64.deb 0c81a9bfe596ad5b960d189c02b5f82356eb2efb 16108 postgresql-9.5-pgpool2_3.5.3-1_amd64.deb Checksums-Sha256: 0cb4d44d989417cd2838dfee306e378d2155a76968f6ea1cc07807c07647d46d 2431 pgpool2_3.5.3-1.dsc f99af8830d4f4d1e3defff5b15d8d0d25c549795454dfc4e89d9495d9f597385 2232527 pgpool2_3.5.3.orig.tar.gz 6940632cace5f28a99914548bc8f4b88555c8fa2ae3cde99c559ce63ff7bd6a9 12068 pgpool2_3.5.3-1.debian.tar.xz 9a21c866edf017de319acb0fa19de95dfc8d32fd1fcaeb3f9214a07e5ecd93d1 33006 libpgpool-dev_3.5.3-1_amd64.deb 0ce099d258c187936951f41181f84446fa857a309fd3d2d9615d7d0b6acd373e 26534 libpgpool0_3.5.3-1_amd64.deb 7b70ac1345ff36cdb92fb77bca1bf98d1581ff220765d3750477a80ca7817f1f 1475496 pgpool2-dbg_3.5.3-1_amd64.deb c8a2dea4339dc19c04174ec41bf2afeab993b9f416287023e5c6386986c5ac53 994690 pgpool2_3.5.3-1_amd64.deb 2ee175fbec2a4192c130638d71effbea63fb345f82da1554a871a61f68388073 16108 postgresql-9.5-pgpool2_3.5.3-1_amd64.deb Files: db3df0b23499388f56ff73e1cab077c2 2431 database optional pgpool2_3.5.3-1.dsc 7c3fecc2e3d89a160845b2beb10eac58 2232527 database optional pgpool2_3.5.3.orig.tar.gz ae78a5fd27dee2a72e643460e8d29b77 12068 database optional pgpool2_3.5.3-1.debian.tar.xz e00a8ceb92b60fdf852f1bea7fe86fec 33006 libdevel optional libpgpool-dev_3.5.3-1_amd64.deb ee7b875d1813f8855929caa7ed11fbd0 26534 libs optional libpgpool0_3.5.3-1_amd64.deb 3c4935980667efdb44dd260b3ed52ffe 1475496 debug extra pgpool2-dbg_3.5.3-1_amd64.deb afe22a4c8b03c9b1a45c92c9f45b4e8f 994690 database optional pgpool2_3.5.3-1_amd64.deb 5cb59a8704dd3a82c72a4d36a5753f6f 16108 database optional postgresql-9.5-pgpool2_3.5.3-1_amd64.deb -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJXg6V0AAoJEGH3mF24TgsEVB8P/0mdEZRPZ8ptdbRZ1ZjFzixs /tVFKm1c7XutLBKwv53TH7FeBc2ceV+ObWadgWK+AGIvNhouXwIHrVg0uExFk1wS 5VNwB1eybDNKwn8zpKcdwkpmWddOEVgyQojActNSEiJL707uRSbfCXTnUD3etKPr S+dr3JC9uNF/7zlXWCZa5C3Tu/l7rnqNyEH/meYeVlBdnX7Cq0bsTqpMQysYDqwS 3fNpvott0n1ep/dzEA2ZypfPiI2kuaEeUbAs+Y8/pKCiMulPYvPb/95a1DZfmy68 PTLXhj2avq02PzRKPfpbRpAIoko7/h0beNoCxXpMz5p5lmJiDMdom/YakqChvIXs t50ebij6kWTdfx/w+f+RS+QOB1+ScKyooEFdiuTHS0wMyIPTrAQLhyF58jSC9Xcy vPC6FXHtgpzms8UB27s5E9UMgQWbWHEvNqfro7pHol7g/yaOmp8p2uU+Vfx4SKy2 8cauStpd545l4SL/Q/VwCuOtotUdnljGnW9LljOLdsfMC9gjWjgaiXWOl8JQjg99 zkH5G3PZy9FbbS32I+EJfbq4KJb9vAY7MfLJNIUnf8AkBdT/Iltj1aMRqa0wnhu9 nSIS2cO5CuQ6Wj9FTy8L2Sd9Up/E9faK0nA0iTDu9K59p/CDa+5Yi4rU1WhcpVEn TRUHZFdsHUgYd0n6Z4cu =91e/ -----END PGP SIGNATURE-----
--- End Message ---
_______________________________________________ Pkg-postgresql-public mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-postgresql-public
