Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#1010769: mailman3: Bounce Runner Not Releasing SQLite Database

261 views
Skip to first unread message

Jason Lester

unread,
May 9, 2022, 2:50:03 PM5/9/22
to
Package: mailman3
Version: 3.3.3-1
Severity: important

Dear Maintainer,

*** Reporter, please consider answering these questions, where appropriate ***

* What led up to the situation?

Unable to use CLI commands like "mailman syncmembers" due to database being locked.

* What exactly did you do (or not do) that was effective (or
ineffective)?

Tried to run "mailman syncmembers memberslist.txt list...@domain.com. This results
in a database locked message if there are changes to write to the list.

* What was the outcome of this action?

Python gives a Database Locked message.

* What outcome did you expect instead?

Changes should have been made to the list.

Note that this seems to be bug #850 - https://gitlab.com/mailman/mailman/-/issues/850 in the
upstream package. I added the fix from upstream to /usr/lib/python3/dist-packages/mailman/model/bounce.py
and that fixed the issue. The fix was to add "@transactional" on the line before "@dbconnection" around line 210.

-- System Information:
Debian Release: 11.3
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 5.10.0-14-686-pae (SMP w/4 CPU threads)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /bin/bash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages mailman3 depends on:
ii dbconfig-sqlite3 2.0.19
ii debconf [debconf-2.0] 1.5.77
ii init-system-helpers 1.60
ii logrotate 3.18.0-2
ii lsb-base 11.1.0
ii python3 3.9.2-3
ii python3-aiosmtpd 1.2.2-1
ii python3-alembic 1.4.3-1
ii python3-authheaders 0.13.1-1
ii python3-authres 1.2.0-2
ii python3-click 7.1.2-1
ii python3-dateutil 2.8.1-6
ii python3-dnspython 2.0.0-1
ii python3-falcon 2.0.0-2+b1
ii python3-flufl.bounce 3.0.1-1
ii python3-flufl.i18n 3.0.1-1
ii python3-flufl.lock 5.0.1-1
ii python3-gunicorn 20.1.0-1
ii python3-importlib-resources 5.1.0-1
ii python3-lazr.config 2.2.3-1
ii python3-passlib 1.7.4-1
ii python3-psycopg2 2.8.6-2
ii python3-public 0.5-1.1
ii python3-requests 2.25.1+dfsg-2
ii python3-sqlalchemy 1.3.22+ds1-1
ii python3-zope.component 4.3.0-3
ii python3-zope.configuration 4.4.0-1
ii python3-zope.event 4.4-3
ii python3-zope.interface 5.2.0-1
ii ucf 3.0043

Versions of packages mailman3 recommends:
ii exim4-daemon-heavy [mail-transport-agent] 4.94.2-7

Versions of packages mailman3 suggests:
ii firefox-esr [www-browser] 91.9.0esr-1~deb11u1
ii lynx [www-browser] 2.9.0dev.6-3~deb11u1
pn mailman3-doc <none>
ii postgresql 13+225

-- debconf information:
mailman3/dbconfig-upgrade: true
mailman3/mysql/authplugin: default
mailman3/remove-error: abort
mailman3/upgrade-error: abort
mailman3/init_service_failed:
mailman3/pgsql/method: TCP/IP
mailman3/db/basepath: /var/lib/mailman3/data
mailman3/mysql/method: Unix socket
* mailman3/config_hyperkitty: true
mailman3/pgsql/changeconf: false
mailman3/remote/host: localhost
* mailman3/dbconfig-reinstall: false
mailman3/dbconfig-remove: true
mailman3/db/dbname: mailman.db
mailman3/internal/skip-preseed: false
mailman3/remote/newhost:
* mailman3/dbconfig-install: true
mailman3/install-error: abort
mailman3/upgrade-backup: true
mailman3/pgsql/authmethod-admin: ident
mailman3/passwords-do-not-match:
mailman3/purge: false
mailman3/pgsql/admin-user: postgres
mailman3/internal/reconfiguring: false
mailman3/missing-db-package-error: abort
mailman3/pgsql/manualconf:
mailman3/pgsql/authmethod-user: password
* mailman3/database-type: sqlite3
mailman3/remote/port:
mailman3/db/app-user: mailman3@localhost
mailman3/pgsql/no-empty-passwords:
mailman3/mysql/admin-user:

Florian Schlegel

unread,
Jun 25, 2022, 7:20:03 AM6/25/22
to
Control: tags 1010769 + patch
Control: tags 1010769 + pending

Dear maintainer,

I've prepared an NMU for mailman3 (versioned as 3.3.3-1.1).
I haven't uploaded anything, as I don't know how to do that. Please
consider using my patch and push it towards Debian stable.

Regards
Florian Schlegel

diff -Nru mailman3-3.3.3/debian/changelog mailman3-3.3.3/debian/changelog
--- mailman3-3.3.3/debian/changelog 2021-02-04 22:32:08.000000000 +0100
+++ mailman3-3.3.3/debian/changelog 2022-06-25 02:56:29.000000000 +0200
@@ -1,3 +1,10 @@
+mailman3 (3.3.3-1.1) UNRELEASED; urgency=medium
+
+ * Non-maintainer upload.
+ - backport fix for sqlite db being locked by runner (Closes: #1010769)
+
+ -- Florian Schlegel <fl...@florz.net> Sat, 25 Jun 2022 02:56:29 +0200
+
mailman3 (3.3.3-1) unstable; urgency=medium

* New upstream release 3.3.3.
diff -Nru
mailman3-3.3.3/debian/patches/0004-fix_runner_blocking_sqlite.patch
mailman3-3.3.3/debian/patches/0004-fix_runner_blocking_sqlite.patch
--- mailman3-3.3.3/debian/patches/0004-fix_runner_blocking_sqlite.patch
1970-01-01 01:00:00.000000000 +0100
+++ mailman3-3.3.3/debian/patches/0004-fix_runner_blocking_sqlite.patch
2022-06-25 02:56:29.000000000 +0200
@@ -0,0 +1,12 @@
+Index: mailman3-3.3.3/src/mailman/model/bounce.py
+===================================================================
+--- mailman3-3.3.3.orig/src/mailman/model/bounce.py
++++ mailman3-3.3.3/src/mailman/model/bounce.py
+@@ -206,6 +206,7 @@ class BounceProcessor:
+ mlist.bounce_score_threshold, action)
+ event.processed = True
+
++ @transactional
+ @dbconnection
+ def send_warnings_and_remove(self, store):
+ """Send a warning email to the users who are disabled, if needed.
diff -Nru mailman3-3.3.3/debian/patches/series
mailman3-3.3.3/debian/patches/series
--- mailman3-3.3.3/debian/patches/series 2021-02-04
22:32:08.000000000 +0100
+++ mailman3-3.3.3/debian/patches/series 2022-06-25
02:56:29.000000000 +0200
@@ -1,3 +1,4 @@
0001_README_remove_embedded_images.patch
0002-remove_sphinxcontrib.zopeext_dependency.patch
0003-Remove-failing-test.patch
+0004-fix_runner_blocking_sqlite.patch
OpenPGP_signature
0 new messages