Comment 1 for bug 916649

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

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 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.
>
> ** Affects: systers
> Importance: Undecided
> Assignee: kanika vats (kanika-krikan)
> Status: New
>
> --
> You received this bug notification because you are a bug assignee.
> https://bugs.launchpad.net/bugs/916649
>
> Title:
> mailman crashes when doing global alias update
>
> Status in Systers Mailman Custom Modifications:
> New
>
> 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.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/systers/+bug/916649/+subscriptions
>

--
Best Regards
Kanika Vats