AssertionError in 2.1.5
Hi,
I just hit a bug in 2.1.5 in the 'Confirm subscription request' page.
If you press 'Cancel my subscription request' you just get a crash like the one below.
Just as an experiment I tried the same thing with my subscription to mailman-developers and the Mailman 2.1.5 at mail.python.org promptly crashed with the same Traceback.
Bug in Mailman version 2.1.5
We're sorry, we hit a bug!
If you would like to help us identify the problem, please email a copy of this page to the webmaster for this site with a description of what happened. Thanks! Traceback:
Traceback (most recent call last): File "/export/home/mailman/scripts/driver", line 87, in run_main main() File "/export/home/mailman/Mailman/Cgi/confirm.py", line 114, in main subscription_cancel(mlist, doc, cookie) File "/export/home/mailman/Mailman/Cgi/confirm.py", line 312, in subscription_cancel userdesc = mlist.pend_confirm(cookie)[1] File "/export/home/mailman/Mailman/Pending.py", line 141, in pend_confirm assert self.Locked() AssertionError
Python information:
Variable Value sys.version 2.3.4 (#1, Jun 2 2004, 10:42:24) [GCC 3.3.2] sys.executable /usr/local/bin/python2.3 sys.prefix /usr/local sys.exec_prefix /usr/local sys.path /usr/local sys.platform sunos5
<environment snipped>
-tgc
On Fri, Jul 09, 2004 at 09:48:24AM +0200, Tom G. Christensen wrote:
I just hit a bug in 2.1.5 in the 'Confirm subscription request' page.
If you press 'Cancel my subscription request' you just get a crash like the one below.
Thanks for the report. The subscription_cancel method fails to lock the list before acting on the pending database (the same lock guards both the list configuration and the pending pck). A quick fix would be to wrap it (in Mailman/Cgi/confirm.py): --- confirm.py-2.1.5 2004-02-11 07:50:10.000000000 +0900 +++ confirm.py 2004-07-09 21:48:32.753528352 +0900 @@ -308,8 +308,12 @@ def subscription_cancel(mlist, doc, cookie): - # Discard this cookie - userdesc = mlist.pend_confirm(cookie)[1] + mlist.Lock() + try: + # Discard this cookie + userdesc = mlist.pend_confirm(cookie)[1] + finally: + mlist.Unlock() lang = userdesc.language i18n.set_language(lang) doc.set_language(lang) However in looking at this, I noticed the other _cancel methods fail to use the user's preferred language when reporting their cancel results. If my preferred language is Japanese and I submit an address change, and then cancel that change... the resulting page is in English. So a more complete patch to confirm.py really needs to be developed that addresses both problems. -- Jim Tittsler http://www.OnJapan.net/ GPG: 0x01159DB6 Python Starship http://Starship.Python.net/ Ringo MUG Tokyo http://www.ringo.net/rss.html
Jim Tittsler wrote:
On Fri, Jul 09, 2004 at 09:48:24AM +0200, Tom G. Christensen wrote:
I just hit a bug in 2.1.5 in the 'Confirm subscription request' page.
If you press 'Cancel my subscription request' you just get a crash like the one below.
Thanks for the report. The subscription_cancel method fails to lock the list before acting on the pending database (the same lock guards both the list configuration and the pending pck).
<snip patch>
Your patch seems to do the trick so I'll use that for now. Thanks.
-tgc
participants (2)
-
Jim Tittsler
-
Tom G. Christensen