Your message dated Wed, 12 Mar 2025 13:06:53 +0000
with message-id <[email protected]>
and subject line Bug#1082167: fixed in mailman3 3.3.10-1
has caused the Debian Bug report #1082167,
regarding mailman3 fails to (re)start: flawed lock cleanup
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.)


-- 
1082167: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1082167
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: mailman3
Version: 3.3.8-2~deb12u2
Severity: important

Dear Maintainer,

Justification for Severity: important:
o significantly impacts operations (fails to (re)start)
o not readily apparent to many/most how to work around issue:
  work-around: remove lock links, but that's not at all clear from
  diagnostics/logs (fails with exception without indicating where the
  locks are or that the locks prevented the (re)start)
o can be very cleanly/simply/minimally patched to existing stable
o convergent with fix in upstream in 3.3.10, see:
  upstream commit 168e6f55
  https://gitlab.com/mailman/mailman/-/issues/1174

I'd also urge the fix (patch included) be applied to next feasible
stable point release update.

Likewise for other Debian distributions (e.g. sid/unstable, testing,
LTS oldstable, (ELTS oldoldstable)) same or quite similar patch should
be applied unless/until caught up with upstream >=3.3.10 (which includes
fix).

If mailman3 isn't cleanly stopped (e.g. application or system crash),
lock links are left behind.  Though the code apparently intends to
correct this (with start --force), in quite common circumstances,
this will fail with python then throwing an exception, and
diagnostics/logs also not providing sufficient information for many/most
to be able to determine that workaround is to remove the stale lock
links (or even where they are, or that that's what triggered issue).
The code fails to remove the stale lock links in the case where:
PID exists, but is no longer Mailman's (the ID running the mailman3
process).  This is a rather probable event from PID number
reuse/collisions, e.g. system is booted, mailman3 (or host) isn't
stopped cleanly, lock links remain, system is restarted and there's high
probability of PID collision (same PID number, but no longer Mailman's),
and this triggers this bug.  Even in other scenarios there's quite
non-trivial probability of PID collision from reuse triggering the bug.

PATCH recommended for file:
/usr/lib/python3/dist-packages/mailman/bin/master.py
$ diff -u .master.from_mailman3:3.3.8-2~deb12u2.py master.py
--- .master.from_mailman3:3.3.8-2~deb12u2.py    2023-01-04 07:23:41.000000000 
+0000
+++ master.py   2024-09-19 01:21:35.542316427 +0000
@@ -103,8 +103,8 @@
     try:
         os.kill(pid, 0)
         return WatcherState.conflict, lock
-    except ProcessLookupError:
-        # No matching process id.
+    except (ProcessLookupError, PermissionError):
+        # No matching process id or pid not Mailman's.
         return WatcherState.stale_lock, lock
 
 
$ 
I've well tested that the patch fixes the issue for
mailman3 3.3.8-2~deb12u2
In fact it probably applies for all mailman 3.x <3.3.10 that's not been
so patched.  The above patch also corresponds to upstream's fix in
3.3.10 commit 168e6f55:
https://gitlab.com/mailman/mailman/-/commit/168e6f5557c630a733dfc3b51dac47cb6c9c94a9

Much more information is also available on:
https://gitlab.com/mailman/mailman/-/issues/1174
including further analysis and diagnostics, testing and also how to
conveniently reproduce the issue for testing, etc.

-- System Information:
Debian Release: 12.7
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 6.1.0-25-amd64 (SMP w/1 CPU thread; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=ANSI_X3.4-1968) 
(ignored: LC_ALL set to C), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages mailman3 depends on:
ii  cron [cron-daemon]           3.0pl1-162
ii  dbconfig-sqlite3             2.0.24
ii  debconf [debconf-2.0]        1.5.82
ii  init-system-helpers          1.65.2
ii  logrotate                    3.21.0-1
ii  python3                      3.11.2-1+b1
ii  python3-aiosmtpd             1.4.3-1.1+deb12u1
ii  python3-alembic              1.8.1-2
ii  python3-authheaders          0.15.2-1
ii  python3-authres              1.2.0-3
ii  python3-click                8.1.3-2
ii  python3-dateutil             2.8.2-2
ii  python3-dnspython            2.3.0-1
ii  python3-falcon               3.1.1-1+b1
ii  python3-flufl.bounce         4.0-3
ii  python3-flufl.i18n           3.0.1-3
ii  python3-flufl.lock           5.0.1-4
ii  python3-gunicorn             20.1.0-6
ii  python3-importlib-resources  5.1.2-2
ii  python3-lazr.config          2.2.3-3
ii  python3-passlib              1.7.4-3
ii  python3-psycopg2             2.9.5-1+b1
ii  python3-public               2.3-4
ii  python3-requests             2.28.1+dfsg-1
ii  python3-sqlalchemy           1.4.46+ds1-1
ii  python3-zope.component       5.1.0-1
ii  python3-zope.configuration   4.4.1-1
ii  python3-zope.event           4.4-3
ii  python3-zope.interface       5.5.2-1+b1
ii  ucf                          3.0043+nmu1

Versions of packages mailman3 recommends:
ii  exim4-daemon-heavy [mail-transport-agent]  4.96-15+deb12u5

Versions of packages mailman3 suggests:
pn  anacron                                <none>
ii  lynx [www-browser]                     2.9.0dev.12-1
ii  mailman3-doc                           3.3.8-2~deb12u2
ii  mariadb-server [virtual-mysql-server]  1:10.11.6-0+deb12u1

-- debconf information excluded

--- End Message ---
--- Begin Message ---
Source: mailman3
Source-Version: 3.3.10-1
Done: Jordi Mallach <[email protected]>

We believe that the bug you reported is fixed in the latest version of
mailman3, 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.
Jordi Mallach <[email protected]> (supplier of updated mailman3 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: Wed, 12 Mar 2025 13:41:50 +0100
Source: mailman3
Architecture: source
Version: 3.3.10-1
Distribution: unstable
Urgency: medium
Maintainer: Debian Mailman Team <[email protected]>
Changed-By: Jordi Mallach <[email protected]>
Closes: 1042765 1082167 1099335
Changes:
 mailman3 (3.3.10-1) unstable; urgency=medium
 .
   * New upstream release (closes: #1099335).
     - handles stale lockfiles correctly (closes: #1082167)
   * Add missing python-flufl.* dependencies also for autopkgtests.
   * Drop patch 1130.patch, included in 3.3.10.
   * Refresh patches.
   * Build-Depend on python3-pdm, python3-pdm-backend and
     pybuild-plugin-pyproject, which replace setuptools as the build system.
   * Add Swedish translation of the debconf templates (closes: #1042765).
     Thanks Peter Kvillegård <[email protected]>.
   * Apply upstream Python 3.13 compatibility patch after ContextManager
     removal.
   * Move mailman binaries to /usr/lib by hand, as pybuild no longer does it.
   * Complete and update copyright file.
   * Use https for Homepage URL.
   * Add upstream metadata.
   * Add Catalan translation of the debconf templates.
   * Add myself to uploaders.
Checksums-Sha1:
 20959dea15adc02686db271bdfc35b40d2573cc2 3124 mailman3_3.3.10-1.dsc
 3eea56c1735f7d163c8033c9f6323922d2a24957 2294293 mailman3_3.3.10.orig.tar.gz
 6b25a42198a26c09f0486ba4c8796ea700d5d64d 833 mailman3_3.3.10.orig.tar.gz.asc
 3a8c46b6d22c309799c01fc2c080f72541f6c25d 30228 mailman3_3.3.10-1.debian.tar.xz
 995f0838f348c708d8fc98d3225055e4a355fb76 11037 
mailman3_3.3.10-1_amd64.buildinfo
Checksums-Sha256:
 dc43f9858ada5726b445823fd3a8855e9ec7111b6e6ddb3ebefde4e1279d6619 3124 
mailman3_3.3.10-1.dsc
 0de478fcf326f25d931938c3744e61c5cd67596b46e5b1e3bb2abf99d5445632 2294293 
mailman3_3.3.10.orig.tar.gz
 50d941e53cb4a48deb050fb5082f2dd6818bdec9e79f2fd04c92889ba652ce7c 833 
mailman3_3.3.10.orig.tar.gz.asc
 54050f5352035e95677a792e1500477a0aa4dcfb6cea7076b86b0c21c4576d4e 30228 
mailman3_3.3.10-1.debian.tar.xz
 80948d4595ea2eefc91d9daa775c57169459c93099d4bb14c42c94ced40ef0de 11037 
mailman3_3.3.10-1_amd64.buildinfo
Files:
 e6c0a17a1191c3f505dcfd4d6b01775e 3124 mail optional mailman3_3.3.10-1.dsc
 9c9d937b5d9502530bea1cc062065a2b 2294293 mail optional 
mailman3_3.3.10.orig.tar.gz
 e89f36df4b0ea529e15cc83b0f5735fd 833 mail optional 
mailman3_3.3.10.orig.tar.gz.asc
 35cd6c8b83d3936c53eb52b75e069860 30228 mail optional 
mailman3_3.3.10-1.debian.tar.xz
 29b43b46592fd0170c12de4e499c5058 11037 mail optional 
mailman3_3.3.10-1_amd64.buildinfo


-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEE6BdUhsApKYN8KGoWJVAvb8vjywQFAmfRgbsACgkQJVAvb8vj
ywRifw//aZKO0LC0uLolqswZV1+Mg19P9SpnfnEqxteUqv2JBFa2g8RwmkxtHqm1
8MtcxCW49v+ehIlHkazCuy8IVFajloKmhE6o1MixTwPwcrL98je7TGT8bEN5swQv
uglBaDbq8G7/rnyRacqdW5uoyASzDst/wXh9yBKbQYj8P2vIElO9QwGEy1aeZkg6
Xy4CqDmjRI0YineNUazxU1je4tw9wmVubTTg3wB+c4H7TOzIV37An0SmJehI2s9F
MqhzED4FYtK3NLZqbdXkkUCJCLMsWIg0iycHoS4REeAzFP5RZCpJ+20HrHTEQJRI
nkXs9hkjB8PhnDqeSKmjZ2Kuc0jD3zwYcHItSqN5zsStIruc+W1wB5DQDG6VFT6g
MYBEWICMErMO8DMAIsT9sJ57ArEPjwfZDynfHKdoeInfSOQbIwznsSPZ0kP2OFue
9aymu2Wn6pidIS3EYIvttlXKfrasrs0tW84uf+g7kySwy/+WT60c9kSRAgRX2QEI
0al5y8XsSD5D11Py0nzK3z5g8QYWSDMosNWYTW33RqZbmTBwGAbAaElVBzwabskG
Eh//20wdAuMCcxrKDFYVLrx2ymHM8t+uQgQHoo2Y/q6xk8TzBaitbK707MsJ/mZj
kN+T1GcYMIOdbE/rBLyxunWDj8+nMrBge4bF67K6igRi08fDba0=
=70d+
-----END PGP SIGNATURE-----

Attachment: pgpQ8M2_Gwksy.pgp
Description: PGP signature


--- End Message ---

Reply via email to