mailman crashes when doing global alias update

Bug #916649 reported by Robin J
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Systers-mailman
New
Undecided
kanika vats

Bug Description

Here is the trace back

admin(32194): Traceback (most recent call last):
admin(32194): File "/usr/local/mailman/scripts/driver", line 101, in run_main
admin(32194): main()
admin(32194): File "/usr/local/mailman/Mailman/Cgi/options.py", line 690, in main
admin(32194): alias.change_aliases(subscriber_id, oldAliasList, newAliasList)
admin(32194): File "/usr/local/mailman/Mailman/DlistUtils.py", line 43, in inner
admin(32194): result = f(self,*args)
admin(32194): File "/usr/local/mailman/Mailman/DlistUtils.py", line 648, in change_aliases
admin(32194): self.pseudonym = unicode(a,"utf-8")
admin(32194): File "/usr/lib/python2.5/site-packages/storm/properties.py", line 67, in __set__
admin(32194): obj_info.variables[column].set(value)
admin(32194): File "/usr/lib/python2.5/site-packages/storm/variables.py", line 202, in set
admin(32194): self.event.emit("changed", self, old_value, value, from_db)
admin(32194): File "/usr/lib/python2.5/site-packages/storm/event.py", line 64, in emit
admin(32194): if callback(owner, *(args+data)) is False:
admin(32194): File "/usr/lib/python2.5/site-packages/storm/store.py", line 798, in _variable_changed
admin(32194): self._validate_alive(obj_info)
admin(32194): File "/usr/lib/python2.5/site-packages/storm/store.py", line 601, in _validate_alive
admin(32194): result = self._connection.execute(Select(SQLRaw("1"), where))
admin(32194): File "/usr/lib/python2.5/site-packages/storm/databases/postgres.py", line 255, in execute
admin(32194): return Connection.execute(self, statement, params, noresult)
admin(32194): File "/usr/lib/python2.5/site-packages/storm/database.py", line 192, in execute
admin(32194): raise ClosedError("Connection is closed")

I don't know enough about the storm package to make sense of this. I can tell that it was able to set 2 aliases (the completion message is in the info log), and barfed on the 3rd. This is just a set of a variable in an object. Does storm get involved at each variable set, or does it wait till you signal done with a record?

Kanika, I'm assigning this to you, as you are the person most likely to be able to make sense of this.

Revision history for this message
kanika vats (kanika-krikan) wrote : Re: [Bug 916649] [NEW] mailman crashes when doing global alias update
Download full text (6.6 KiB)

Hi ,

I will have to debug what is going wrong and go through the code. From the
trackback Storm seems to be giving connection closed error, this means the
problem is somewhere with the connection getting closed before changes are
committed. We have all the object classes mapped with database tables in
Storm but until we say commit Storm does not interacts with the backend.
From what I remember is that every method that is involved with carrying
out a transaction in DlistUtils.py is associated with a decorator function.
Thus, whenever a method that is decorated is called :

1) The Decorator function will be executed first in which probably it will
get hold of the connection and assign a variable an object via which all
transaction related actions will be carried out. This variable will be used
used by the method.
2) The control will then go back to the method and once the method has been
executed the control will return to the decorator function which will be
in charge of committing the changes and closing the connection. I think the
issue might be with the decorator function(that is defined at top in
DlistUtils.py).

Somewhere when alias is getting changed the third time we need to see if
the variable is getting properly initialized with the connection object. I
do not have the local environment setup with me, also I am very busy this
week. I will definitely debug the issue by next week but if the issue
needs to be fixed immediately hope the above information helps.

Thanks
Kanika

On Sun, Jan 15, 2012 at 6:37 AM, Robin J <email address hidden> wrote:

> Public bug reported:
>
> Here is the trace back
>
>
> admin(32194): Traceback (most recent call last):
> admin(32194): File "/usr/local/mailman/scripts/driver", line 101, in
> run_main
> admin(32194): main()
> admin(32194): File "/usr/local/mailman/Mailman/Cgi/options.py", line
> 690, in main
> admin(32194): alias.change_aliases(subscriber_id, oldAliasList,
> newAliasList)
> admin(32194): File "/usr/local/mailman/Mailman/DlistUtils.py", line 43,
> in inner
> admin(32194): result = f(self,*args)
> admin(32194): File "/usr/local/mailman/Mailman/DlistUtils.py", line 648,
> in change_aliases
> admin(32194): self.pseudonym = unicode(a,"utf-8")
> admin(32194): File
> "/usr/lib/python2.5/site-packages/storm/properties.py", line 67, in __set__
> admin(32194): obj_info.variables[column].set(value)
> admin(32194): File
> "/usr/lib/python2.5/site-packages/storm/variables.py", line 202, in set
> admin(32194): self.event.emit("changed", self, old_value, value,
> from_db)
> admin(32194): File "/usr/lib/python2.5/site-packages/storm/event.py",
> line 64, in emit
> admin(32194): if callback(owner, *(args+data)) is False:
> admin(32194): File "/usr/lib/python2.5/site-packages/storm/store.py",
> line 798, in _variable_changed
> admin(32194): self._validate_alive(obj_info)
> admin(32194): File "/usr/lib/python2.5/site-packages/storm/store.py",
> line 601, in _validate_alive
> admin(32194): result = self._connection.execute(Select(SQLRaw("1"),
> where))
> admin(32194): File
> "/usr/lib/python2.5/site-packages/storm/databases/postgres.py", line 255,
> in e...

Read more...

Revision history for this message
Robin J (robin-jeffries) wrote :

This will definitely wait. Either it doesn't happen all the time or no one who is on at least 3 lists has done a global alias change since we pushed this code change; so I can't argue that it's urgent. I would like to have it before our next testing cycle, which I hope will be in a month or so.

I'm really surprised it is happening on the 3rd list rather than the 2nd. Could a non-existent list get onto the stack? Is there any kind of "off by one" (if connection 2 is causing a problem, it would manifest as connection3?)

I'm happy to help you debug this. Just tell me something specific to do. One thing I would ask if that once you find it, you/we figure out a good test for this (manual is OK for now)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.